Hello all,
I have redis database where the data is inserted in JSON format:
#Redis Command
JSON.GET Index1J:12345678
#Redis Result
[
{
"SupplierID": "7",
"BCode": "987654",
"Rate": 0.159
},
{
"SupplierID": "7",
"BCode": "765432",
"Rate": 0.159
},
{
"SupplierID": "7",
"BCode": "5432159",
"Rate": 0.159
}
]
When I try to get the result using Lua script in Kamailio like the following:
#kamailio command
if KSR.ndb_redis.redis_cmd("srvN", "JSON.GET pricelistJ:441246890", "ra") then
KSR.xlog.xinfo("array size: $redis(ra=>size)\n");
KSR.xlog.xinfo("Redis Response: " .. tostring(ra) .. "\n")
KSR.xlog.xinfo("first values: $redis(ra=>value[0]) , $redis(ra=>value[1])\n");
end
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: array size: <null>
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: Redis Response: nil
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: first values: <null> , <null>
I'm getting null results.
I don't know what I'm doing wrong here. Can you please assist?
Hello all,
I have a scenario on wich requires sequential fork (up to 30 possible destinations) with different
Call-ID for each leg. I am using topoh module enabled, but it always puts the same Call-ID.
Someone have a solution for this scenario?
Regards
Hello, I encountered such a problem:
An INVITE request comes to Kamailio.
Kamailio finds a location and forwards this INVITE to a device.
The device receives a push notification and registers on a new IP: port.
The tsilo module creates a new branch.
And this branch sends the INVITE.
The device responds with 100 -> 180 -> 302.
100 and 180 are forwarded to the calling subscriber, but anything greater
than 300, such as 302, is not forwarded.
DEBUG: tm [t_reply.c:1363]: t_should_relay_response(): ->>>>>>>>>
T_code=180, new_code=302
DEBUG: tm [t_reply.c:1448]: t_should_relay_response(): store - other
branches still active
DEBUG: tm [t_reply.c:1925]: relay_reply(): reply status=3 branch=1, save=1,
relay=-1 icode=0 msg status=302
Kamailio saves this code and does not pass it to the caller. Is there a way
to immediately pass this 302? It seems like something can be done in
t_on_branch_failure, which is invoked, but I can't figure out what needs to
be done there.
Is there a parameter that can solve my problem?
A similar question has been asked before, but the link in Daniel's response
leads to a non-existent ID:
https://lists.kamailio.org/pipermail/sr-users/2009-March/022447.html
In the config file:
#!define KEYVALUE "key=s:value"
modparam("pv", "varset", KEYVALUE)
works. But if I try to use defexp or defexps the ID KEYVALUE
is not set as expected and the parser complains.
## this doesn't parse
#!defexp KEYVALUE2 "key=s:value"
#!defexps KEYVALUE3 "key=s:value"
# both these lead to syntax error
modparam("pv", "varset", KEYVALUE2)
modparam("pv", "varset", KEYVALUE3)
Any ideas why defexp doesn't behave the same way here?
Shih-Ping
Hello all,
I'm using Kamailio as SIP proxy between session manager and SBC.
I came across an issue in BYE request where the SBC sent in the header list of Routes where first route is Kamailio IP, and the second is SM IP, in addition to other routes (last route is the caller party)
What Kamailio did is to route the BYE to the address set in the Request-URI, which is the caller party.
What should be done instead is that Kamailio should remove the Route header including its own IP, and route the BYE to the next hop which is in this case the SM IP.
How to accomplish that?
Following is the Route header in the BYE request coming from SBC:
[truncated]Route: <sip:KAMAILIO_IP;lr;ftag=xxxxxxxxxxxxxxxxxxxxxxx>,<sip:SM1@SM_IP;transport=udp;lr;av-asset-uid=xxxxxxxxxx>,<sip:127.0.0.2:15060;transport=udp;ibmsid=local.xxxxxxxxxxxx_xxxxxxxxx_xxxxxxxxx;lr;ibmdrr>,sips:127.0.0.2:15061;ibmsid=local.xxxxxxxxxx_xxxxxxxxxx_xxxxxxxx;lr;ibmdrr, sip:SM1@SM_IP;transport=tls;lr;av-asset-uid=xxxxxx, sip:CALLER_PARTY_IP:5061;transport=tls;lr
Regards,