[OpenSIPS-Users] - topology_hiding and no ACK

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Oct 27 15:34:02 UTC 2022


Hi Nitesh,

Where you have the loose_route() in your script right now, use 
topology_hiding_match()
https://opensips.org/html/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 10/27/22 3:51 PM, Nitesh Divecha wrote:
> Hey Bogdan-Andrei,
>
> Thanks for your feedback.
>
> To be honest - I don't know!
>
> I followed some online tutorials and tried to implement 
> "topology_hiding()" after is_method("INVITE") since the first message 
> sent to Outbound Provider is INVITE.
>
> I never tried topology_hiding_match().
>
> What is the right way to implement topology_hiding module? My scenario 
> is simple, I'm using the default cfg and making ATA register to 
> OpenSIPS to make Outbound PSTN calls.
>
> I guess Bootcamp is the answer :-)
>
> Cheers,
> Nitesh
>
>
> On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Nitesh,
>
>     Do you do topology_hiding_match() for the sequential requests
>     (instead of the typical loose_route()) ?  As it seems you cfg
>     fails to properly handle the in-dialog / sequential requests.
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>        https://www.opensips-solutions.com  <https://www.opensips-solutions.com>
>     OpenSIPS Bootcamp 5-16 Dec 2022, online
>        https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/  <https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/>
>
>     On 10/26/22 9:05 PM, Nitesh Divecha wrote:
>>     Hello All,
>>
>>     I don't know if this is by design or me not implementing
>>     correctly! I'm a newbie to OpenSIPS...
>>
>>     So I generated a new opensips_residential.cfg file and only
>>     edited it with topology_hiding("UC"); under INVITE. Plus all the
>>     extras to make ATA register successfully and SIP trunk.
>>
>>     Every time I make a call two INVITE dialogs are created. One from
>>     ATA to OpenSIPS and second one from OpenSIPS to Outbound
>>     Provider. When a PSTN call is answered, the Outbound Provider
>>     sends 200 OK back to OpenSIPS, and OpenSIPS sends back 200 OK to
>>     ATA. Then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS
>>     fails to send ACK to the Outbound Provider. So Outbound Provider
>>     sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK to ATA
>>     then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS
>>     fails to send back ACK... This dance goes on for 30 secs and
>>     until Outbound Provider drops the call due to no ACK.
>>
>>     On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED"
>>     while OpenSIPS to Outbound Provider "CALL SETUP".
>>
>>     If I comment out topology_hiding("UC"); then everything works
>>     perfectly and sngrep shows only one INVITE dialog from ATA to
>>     OpenSIPS to Outbound Provider except the Outbound Provider can
>>     see everything that is ATA's IP info, etc...
>>
>>     Here is my cfg:
>>
>>     route {
>>     ...
>>     if (dp_translate(10 ,$rU ,$rU) ) {
>>                   xlog("*** Dial plan translate from source $avp(src)
>>     to $rU ***\n");
>>
>>                   $avp(furi) = "sip:xxxxxxxxxx at gothamcity.com
>>     <mailto:sip%3Axxxxxxxxxx at gothamcity.com>";
>>                   uac_replace_from( , "$avp(furi)");
>>                   #strip(1);
>>                   if (!do_routing(0)) {
>>                           send_reply(500,"No PSTN Route found");
>>                           exit;
>>                   }
>>                   # t_on_branch("change_from");
>>                   route(relay);
>>                   exit;
>>           }
>>     ...
>>     }
>>
>>     route[relay] {
>>           # for INVITEs enable some additional helper routes
>>           if (is_method("INVITE")) {
>>                   # create_dialog();
>>                   topology_hiding("UC");
>>                   if(remove_hf("User-Agent")){
>>                           xlog("*** 4. User-Agent found and removed.
>>     ***\n");
>>                   }
>>
>>                   if (isflagset("NAT") && has_body("application/sdp")) {
>>                           rtpproxy_offer("ro");
>>                   }
>>
>>                   t_on_branch("per_branch_ops");
>>                   t_on_reply("handle_nat");
>>                   t_on_failure("missed_call");
>>           }
>>
>>           if (isflagset("NAT")) {
>>                   add_rr_param(";nat=yes");
>>           }
>>
>>           if (!t_relay()) {
>>                   send_reply(500,"Internal Error");
>>           }
>>           exit;
>>     }
>>
>>     My eyes are sore and my head is spinning... Any help will be
>>     highly appreciated... Thanks!
>>
>>     Cheers,
>>     Nitesh
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221027/b575c4d2/attachment-0001.html>


More information about the Users mailing list