<HTML><BODY><div>
<div>
<div>Hello everybody!<br>
 <br>
Kamailio works as a Registrar. Additionally, rtpengine is deployed next to it. Using rtpgngine module I proxy media stream via rtpengine(rtpengine_manage()). I change SDP.  SiP2SIP calls work fine. Now I would like to have possibility to "wake up" sip-clients(at the android and ios phones) which are usually not on-line via push notification. Trying to use TSILO module. <br>
 <br>
# User location service<br>
route[LOCATION] {<br>
    lookup("location"); <br>
    $var(rc) = $rc;<br>
    if (is_method("INVITE")) <br>
    {<br>
        if (t_newtran()) <br>
        {<br>
            ts_store(); # if it a new transuction ,it will be store for some time.<br>
        }<br>
    }<br>
    switch ($var(rc)) <br>
    {<br>
    case  1:<br>
         route(RELAY);<br>
         break; <br>
    case -1:<br>
         break;<br>
    case -3:<br>
         send_reply("404", "Not Found");<br>
         exit;<br>
    case -2:<br>
         send_reply("405", "Method Not Allowed");<br>
         exit;<br>
    }<br>
}</div>

<div><br>
# Handle SIP registrations<br>
route[REGISTRAR] {<br>
    if (!is_method("REGISTER")) return;<br>
    if (!save("location")) <br>
    {<br>
        sl_reply_error();<br>
    }<br>
    ts_append("location", "$tu"); # if transuction for this sip-client is exist. The invite will be send. <br>
    exit;<br>
}</div>

<div><br>
If the client is not registered at the kamailio during the call. Then such calls are stored through the "ts_store" function for some time. And if during this time the client send register, kamailio  will be sent INVITE to it. But I have the problem. Such calls after "wake up"go through a special branch route that I don't know how to intercept. As a result, I can't change SDP(using rtpengite_manage commands) and rtp stream do not proxy via rtpengineā€¦ and call failed.</div>

<div> </div>

<div>/usr/sbin/kamailio[9957]: exec: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} *** cfgtrace:request_route=[REGISTRAR] c=[/etc/kamailio/kamailio.cfg] l=428 a=26 n=ts_append<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tsilo [ts_append.c:72]: ts_append(): transaction 36343:92182831 found for 777777777, going to append branches<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_lookup.c:1629]: t_lookup_ident_filter(): transaction found<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} registrar [lookup.c:255]: lookup_helper(): contact for [777777777] found by address<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} registrar [lookup.c:456]: lookup_helper(): instance is<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_append_branches.c:77]: t_append_branches(): transaction 36343:92182831 in status 0<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_append_branches.c:99]: t_append_branches(): Call uvAzTGsEV9N2ReDjmWoo8A..: 0 (1) outgoing branches<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_append_branches.c:126]: t_append_branches(): Current uri sip:77777777@95.165.146.181:63618;transport=TCP;rinstance=8b1865b95767b7ba<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} <core> [core/msg_translator.c:2933]: create_via_hf(): id added: <;i=1>, rcv proto=2<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_append_branches.c:149]: t_append_branches(): added branch [sip:777777777@95.165.146.181:63618;transport=TCP;rinstance=8b1865b95767b7ba] with ruid [uloc-5dd2faa0-26e5-1]<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} tm [t_append_branches.c:163]: t_append_branches(): Call uvAzTGsEV9N2ReDjmWoo8A..: 0 (0) outgoing branches after clear_branches()<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} <core> [core/tcp_main.c:2238]: tcpconn_send_put(): send from reader (9957 (22)), reusing fd<br>
/usr/sbin/kamailio[9957]: DEBUG: {1 2 REGISTER JxPcA9D1hIJ8PmkcnOvI7g..} <core> [core/tcp_main.c:2473]: tcpconn_do_send(): sending...<br>
 </div>
</div>

<div> </div>

<div> </div>

<div data-signature-widget="container">
<div data-signature-widget="content">
<div>--</div>

<div>Oleg Podguyko</div>
</div>
</div>
</div>
</BODY></HTML>