<div dir="ltr">Hi All,<br><br><br>I am using Opensips 1.8.2 tls, with B2B UserAgent, running the default scenario &quot;top riding&quot;. <br>The idea of this implementation is just to pass the packages between the carrier and the PBX, hiding the topology.<br>
I&#39;m facing a problem to process the ACK requests after 200 OK (answer), and I guess that all the in-dialog requests after first INVITE. The ACK requests are beeing forwarded<br>by t_relay() method, but that is not keeping the previous dialog, nether hiding the topology.<br>
Should I execute b2b_init_request(&quot;top hiding&quot;) to ACK requests as I do to INVITE, or the top hiding scenario was supposed to generate the ACK automaticaly to 200 OK reply, as is described in the <a href="http://www.opensips.org/Resources/B2buaTutorial#toc11">tutorial</a>: &quot;Once you ask b2b to handle a call, you <b>won&#39;t see the future in-dialog request in the normal route</b>.&quot;?<br>
<br>Do someone has an example about how it is supposed to be the processing of the in-dialog requests with b2b top hiding? Am I doing something wrong in the script that follows?<br><br>Thanks in advance!<br><br>Here follows the opensips.cfg:<br>
<br>modparam(&quot;b2b_logic&quot;, &quot;db_mode&quot;, 0)<br>modparam(&quot;b2b_entities&quot;, &quot;db_mode&quot;, 0)<br>modparam(&quot;b2b_entities&quot;, &quot;script_req_route&quot;, &quot;b2b_request&quot;)<br>modparam(&quot;b2b_entities&quot;, &quot;script_reply_route&quot;, &quot;b2b_reply&quot;)<br>
<br><br>route[b2b_request]<br>{<br>  xlog(&quot;b2b_request ($ci)\n&quot;);<br>}<br><br><br>route[b2b_reply]<br>{<br>  xlog(&quot;b2b_reply ($ci)\n&quot;);<br>}<br><br>####### Routing Logic ########<br># main request routing logic<br>
<br>route{<br><br>        xlog(&quot;Processing request [$rm] ...&quot;);<br><br>        if (!mf_process_maxfwd_header(&quot;10&quot;))<br>        {<br>                sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
                exit;<br>        }<br><br>         if($rd == &quot;192.168.191.149&quot;) # RURI is myself, replacing by PBX IP (192.168.194.130)<br>        {<br>                xlog(&quot;request [$rm]: invalid ru:[$ru] replacing it...&quot;);<br>
                avp_printf(&quot;$avp(ruri)&quot;, &quot;$ru&quot;);<br>                avp_subst(&quot;$avp(ruri)&quot;, &quot;/sip:(.*@)?(192.168.191.149:6060)(.*)/sip:$<a href="mailto:tU@192.168.194.130">tU@192.168.194.130</a>\3/&quot;);<br>
                $ru = $avp(ruri);<br>        }<br><br>        if( is_method(&quot;INVITE&quot;) )<br>        {<br>            xlog(&quot;request [$rm]: invoking b2b_init_request...&quot;);<br><br>            b2b_init_request(&quot;top hiding&quot;); <br>
            exit; # do not forward this request, another one will be generated <br>        };<br><br>        route(1);<br>}<br><br><br>route[1] {<br>        # for INVITEs enable some additional helper routes<br>        if (is_method(&quot;INVITE&quot;)) {<br>
                t_on_branch(&quot;2&quot;);<br>                t_on_reply(&quot;2&quot;);<br>                t_on_failure(&quot;1&quot;);<br>        }<br><br>        if (!t_relay()) {<br>                sl_reply_error();<br>
        };<br>        exit;<br>}<br><br>branch_route[2] <br>{<br>        xlog(&quot;new branch at $ru\n&quot;);<br>}<br><br>onreply_route[2]<br>{<br>        xlog(&quot;incoming reply\n&quot;);<br>}<br><br>failure_route[1] <br>
{<br>     if (t_was_cancelled()) <br>     {<br>                exit;<br>     }<br><br>}<br><br><br>Here follows the call flow:<br><br><br><a href="http://204.11.180.165:5080">204.11.180.165:5080</a>  Carrier<br><a href="http://192.168.191.149:6060">192.168.191.149:6060</a> Back to Back with top hiding<br>
<a href="http://192.168.194.130:5060">192.168.194.130:5060</a> PBX<br><br>Carrier to B2B:<br><br>U <a href="http://204.11.180.165:5080">204.11.180.165:5080</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>
INVITE sip:<a href="http://192.168.191.149:6060">192.168.191.149:6060</a> SIP/2.0.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-f011bf3ff42d89f43e0b098e2a96b328.<br>f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>
t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;.<br>i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>CSeq: 1 INVITE.<br>
Max-Forwards: 8.<br>m: &lt;sip:63f4867320cd99c3582432226e5bc53d@204.11.180.165:5080;transport=udp&gt;.<br>Supported: timer.<br>c: application/sdp.<br>l: 350.<br>.<br>v=0.<br>o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.180.165.<br>
s=sip call.<br>c=IN IP4 204.11.180.165.<br>t=0 0.<br>m=audio 64406 RTP/AVP 18 0 8 101.<br>a=fmtp:18 annexb=no.<br>a=fmtp:101 0-15.<br>a=rtpmap:101 telephone-event/8000.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:0 PCMU/8000.<br>
a=rtpmap:18 G729/8000.<br>a=ptime:20.<br>a=sendrecv.<br>a=silenceSupp:off - - - -.<br>a=setup:actpass.<br><br>B2B to Carrier:<br><br>U <a href="http://192.168.191.149:6060">192.168.191.149:6060</a> -&gt; <a href="http://204.11.180.165:5080">204.11.180.165:5080</a><br>
SIP/2.0 100 Trying.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-f011bf3ff42d89f43e0b098e2a96b328.<br>f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>
t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;.<br>i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>CSeq: 1 INVITE.<br>
Server: OpenSIPS (1.8.2-notls (i386/linux)).<br>Content-Length: 0.<br>.<br><br>B2B to PBX:<br><br>U <a href="http://192.168.191.149:6060">192.168.191.149:6060</a> -&gt; <a href="http://192.168.194.130:5060">192.168.194.130:5060</a><br>
INVITE <a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a> SIP/2.0.<br>Via: SIP/2.0/UDP 192.168.191.149:6060;branch=z9hG4bK7a57.11f29ff4.0.<br>To: <a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>.<br>
From: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=57660343c1c69a5eae367f3fe08408b3.<br>CSeq: 2 INVITE.<br>Call-ID: B2B.29.3219810.<br>Max-Forwards: 70.<br>
Content-Length: 350.<br>User-Agent: OpenSIPS (1.8.2-notls (i386/linux)).<br>c: application/sdp.<br>Supported: timer.<br>Contact: &lt;sip:<a href="http://192.168.191.149:6060">192.168.191.149:6060</a>&gt;.<br>Content-Type: application/sdp.<br>
.<br>v=0.<br>o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.180.165.<br>s=sip call.<br>c=IN IP4 204.11.180.165.<br>t=0 0.<br>m=audio 64406 RTP/AVP 18 0 8 101.<br>a=fmtp:18 annexb=no.<br>a=fmtp:101 0-15.<br>a=rtpmap:101 telephone-event/8000.<br>
a=rtpmap:8 PCMA/8000.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:18 G729/8000.<br>a=ptime:20.<br>a=sendrecv.<br>a=silenceSupp:off - - - -.<br>a=setup:actpass.<br><br><br>PBX to B2B:<br><br>U <a href="http://192.168.194.130:5060">192.168.194.130:5060</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>
SIP/2.0 100 Trying.<br>Via: SIP/2.0/UDP 192.168.191.149:6060;rport=6060;branch=z9hG4bK7a57.11f29ff4.0.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;.<br>From: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=57660343c1c69a5eae367f3fe08408b3.<br>
CSeq: 2 INVITE.<br>Call-ID: B2B.29.3219810.<br>Content-Length: 0.<br>.<br><br>PBX to B2B:<br><br>U <a href="http://192.168.194.130:5060">192.168.194.130:5060</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>
SIP/2.0 180 Ringing.<br>Via: SIP/2.0/UDP 192.168.191.149:6060;rport=6060;branch=z9hG4bK7a57.11f29ff4.0.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;;tag=user-agent-6009.<br>
From: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=57660343c1c69a5eae367f3fe08408b3.<br>CSeq: 2 INVITE.<br>Call-ID: B2B.29.3219810.<br>Contact: &lt;sip:15265414613@domain2.tst2.vt.local&gt;.<br>
Content-Length: 0.<br>.<br><br><br>B2B to Carrier:<br><br>U <a href="http://192.168.191.149:6060">192.168.191.149:6060</a> -&gt; <a href="http://204.11.180.165:5080">204.11.180.165:5080</a><br>SIP/2.0 180 Ringing.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-f011bf3ff42d89f43e0b098e2a96b328.<br>
f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;;tag=B2B.470.299.<br>
i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>CSeq: 1 INVITE.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;;tag=user-agent-6009.<br>
Contact: &lt;sip:<a href="http://192.168.191.149:6060">192.168.191.149:6060</a>&gt;.<br>Server: OpenSIPS (1.8.2-notls (i386/linux)).<br>Content-Length: 0.<br>.<br><br>PBX to B2B:<br><br>U <a href="http://192.168.194.130:5060">192.168.194.130:5060</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>
SIP/2.0 200 OK.<br>Record-Route: &lt;sip:192.168.194.130;lr;ftag=57660343c1c69a5eae367f3fe08408b3&gt;.<br>Via: SIP/2.0/UDP 192.168.191.149:6060;rport=6060;branch=z9hG4bK7a57.11f29ff4.0.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;;tag=user-agent-6009.<br>
From: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=57660343c1c69a5eae367f3fe08408b3.<br>CSeq: 2 INVITE.<br>Call-ID: B2B.29.3219810.<br>Contact: &lt;<a href="http://sip:15265414613@192.168.192.32:5050">sip:15265414613@192.168.192.32:5050</a>&gt;.<br>
Content-Type: application/sdp.<br>Content-Length: 224.<br>.<br>v=0.<br>o=NexTone-MSW 17 2147483649 IN IP4 204.11.180.165.<br>s=sip call.<br>c=IN IP4 192.168.192.32.<br>t=0 0.<br>m=audio 47086 RTP/AVP 18 101.<br>a=rtpmap:18 G729/8000/1<br>
a=fmtp:18 annexb=no.<br>a=rtpmap:101 telephone-event/8000/1.<br>a=sendrecv.<br>.<br><br>B2B to Carrier:<br><br>U <a href="http://192.168.191.149:6060">192.168.191.149:6060</a> -&gt; <a href="http://204.11.180.165:5080">204.11.180.165:5080</a><br>
SIP/2.0 200 OK.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-f011bf3ff42d89f43e0b098e2a96b328.<br>f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>
t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;;tag=B2B.470.299.<br>i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>
CSeq: 1 INVITE.<br>Content-Type: application/sdp.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;;tag=user-agent-6009.<br>Contact: &lt;sip:<a href="http://192.168.191.149:6060">192.168.191.149:6060</a>&gt;.<br>
Server: OpenSIPS (1.8.2-notls (i386/linux)).<br>Content-Length: 224.<br>.<br>v=0.<br>o=NexTone-MSW 17 2147483649 IN IP4 204.11.180.165.<br>s=sip call.<br>c=IN IP4 192.168.192.32.<br>t=0 0.<br>m=audio 47086 RTP/AVP 18 101.<br>
a=rtpmap:18 G729/8000/1<br>a=fmtp:18 annexb=no.<br>a=rtpmap:101 telephone-event/8000/1.<br>a=sendrecv.<br><br><br>Carrier to B2B (ACK):<br><br>U <a href="http://204.11.180.165:5080">204.11.180.165:5080</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>
ACK sip:<a href="http://192.168.191.149:6060">192.168.191.149:6060</a> SIP/2.0.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-76e2b629b35210415cfed24dec30ea42.<br>f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>
t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;;tag=user-agent-6009.<br>i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>
CSeq: 1 ACK.<br>Max-Forwards: 8.<br>m: &lt;sip:5dc9157c0a5b6eabfab89b1ddd6ebdff@204.11.180.165:5080;transport=udp&gt;.<br>l: 0.<br>.<br><br>B2B to PBX (routed by t_relay):<br><br>U <a href="http://192.168.191.149:6060">192.168.191.149:6060</a> -&gt; <a href="http://192.168.194.130:5060">192.168.194.130:5060</a><br>
ACK <a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a> SIP/2.0.<br>Via: SIP/2.0/UDP 192.168.191.149:6060;branch=z9hG4bK-76e2b629b35210415cfed24dec30ea42.<br>v: SIP/2.0/UDP 204.11.180.165:5080;branch=z9hG4bK-76e2b629b35210415cfed24dec30ea42.<br>
f: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=3570555794-337860.<br>t: &lt;<a href="mailto:sip%3A15265414613@ss.mydomain.com">sip:15265414613@ss.mydomain.com</a>&gt;;tag=user-agent-6009.<br>
i: <a href="mailto:15070951-3570555794-337826@msw1.telengy.net">15070951-3570555794-337826@msw1.telengy.net</a>.<br>CSeq: 1 ACK.<br>Max-Forwards: 7.<br>m: &lt;sip:5dc9157c0a5b6eabfab89b1ddd6ebdff@204.11.180.165:5080;transport=udp&gt;.<br>
l: 0.<br>.<br><br>PBX to B2B (Retransmition of 200 OK)<br><br>U <a href="http://192.168.194.130:5060">192.168.194.130:5060</a> -&gt; <a href="http://192.168.191.149:6060">192.168.191.149:6060</a><br>SIP/2.0 200 OK.<br>Record-Route: &lt;sip:192.168.194.130;lr;ftag=57660343c1c69a5eae367f3fe08408b3&gt;.<br>
Via: SIP/2.0/UDP 192.168.191.149:6060;rport=6060;branch=z9hG4bK7a57.11f29ff4.0.<br>To: &lt;<a href="mailto:sip%3A15265414613@192.168.194.130">sip:15265414613@192.168.194.130</a>&gt;;tag=user-agent-6009.<br>From: &quot;Anonymous&quot; &lt;<a href="mailto:sip%3Aanonymous@mydomain.com">sip:anonymous@mydomain.com</a>&gt;;tag=57660343c1c69a5eae367f3fe08408b3.<br>
CSeq: 2 INVITE.<br>Call-ID: B2B.29.3219810.<br>Contact: &lt;<a href="http://sip:15265414613@192.168.192.32:5050">sip:15265414613@192.168.192.32:5050</a>&gt;.<br>Content-Type: application/sdp.<br>Content-Length: 224.<br>.<br>
v=0.<br>o=NexTone-MSW 17 2147483649 IN IP4 204.11.180.165.<br>s=sip call.<br>c=IN IP4 192.168.192.32.<br>t=0 0.<br>m=audio 47086 RTP/AVP 18 101.<br>a=rtpmap:18 G729/8000/1<br>a=fmtp:18 annexb=no.<br>a=rtpmap:101 telephone-event/8000/1.<br>
a=sendrecv.<br><br><br><br></div>