Hi Giovanni, tsilo module has a parameter to specify if store the transaction with or without the domain part of the ruri: http://www.kamailio.org/docs/modules/devel/modules/tsilo.html#idp45289468. By default is disable so it will use the user part only.
Regards, Federico On Wed, Jul 6, 2016 at 11:59 AM, gmele <giovanni.m...@nagra.com> wrote: > Hello, > > > we are using tsilo to achieve mobile push notification in kamailio. > > In tsilo module documentation, ts_append() function is used with the pseudo > variable “$tU” holding the username of the to-uri. > > Our config looks like : > > route[PUSHJOIN] { > $var(hjoin) = 0; > lock("$tu"); > $var(hjoin) = $sht(vtp=>join::$tu); > $var(hstored) = $sht(vtp=>stored::$tu); > $sht(vtp=>join::$tu) = $null; > unlock("$tu"); > > if ($var(hjoin)==0) { > if ($var(hstored)) { > ts_append("location", "$tU"); > } > return; > } > > $var(id_index) = $(var(hjoin){s.select,0,:}{s.int}); > $var(id_label) = $(var(hjoin){s.select,1,:}{s.int}); > t_continue("$var(id_index)", "$var(id_label)", "INVRESUME"); > } > > > > In ts_append() function code, ts_check_uri() is called on a variable > holding > a username and not a URI causing the failure of the function ts_check_uri() > and resulting in ts_append() to exit. The following line is displayed in > the > log: [tsilo.c:205]: ts_check_uri(): bad uri [giovanni.mele]. > > The function ts_store() stores in the R-URI field the username and not the > request URI. > > route[RELAY] { > # enable additional event routes for forwarded requests > # - serial forking, RTP relaying handling, a.s.o. > if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { > if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); > } > if (is_method("INVITE|SUBSCRIBE|UPDATE")) { > if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY"); > } > if (is_method("INVITE")) { > if(!t_is_set("failure_route")) > t_on_failure("MANAGE_FAILURE"); > } > > if (!t_relay(PROXY_IP, PROXY_PORT)) { > sl_reply_error(); > } > > if (is_method("INVITE")) { > ts_store(); > $sht(vtp=>stored::$tu) = 1; > route(SENDPUSH); > } > > exit; > } > > route[INVRESUME] { > statsd_gauge("SIPRegistrar.InviteResumed", "+1"); > lookup("location"); > t_relay(PROXY_IP, PROXY_PORT); > ts_store(); > $sht(vtp=>stored::$tu) = 1; > } > > > > With the command “kamcmd ts.dump” we can see the following lines: > R-URIs: { > R-URI: giovanni.mele > Hash: 74014921 > Transactions: { > Transaction: { > Tindex: 63704 > Tlabel: 2105932514 > } > } > } > > If we try to use the ts_append() function with the pseudo variable “$tu” > holding the full to-uri address, there is no error returned by > ts_check_uri() (as this is called on a correct URI) but the transaction > corresponding to the to-uri cannot be found (maybe because the R-URI stored > by ts_store() is the username and not the full R-URI). > > How can we make things work ? By storing the full R-URI with ts_store() ? > > Thx for your help > > > Giovanni > > > > > -- > View this message in context: > http://sip-router.1086192.n5.nabble.com/tsilo-ts-append-problem-tp150184.html > Sent from the Users mailing list archive at Nabble.com. > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users