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