<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun., 22 abr. 2019 a las 1:24, <<a href="mailto:users-request@lists.opensips.org">users-request@lists.opensips.org</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Users mailing list submissions to<br>
        <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:users-request@lists.opensips.org" target="_blank">users-request@lists.opensips.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:users-owner@lists.opensips.org" target="_blank">users-owner@lists.opensips.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Fwd: Opensips SNGTC Module (Liviu Chircu)<br>
   2. Re: WebRTC and mid_registrar issue (Liviu Chircu)<br>
   3. Re: Integrating with Asterisk in the same box (Liviu Chircu)<br>
   4. Re: async() and config actions call stack (Liviu Chircu)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 22 Apr 2019 09:07:00 +0300<br>
From: Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>><br>
To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
Subject: Re: [OpenSIPS-Users] Fwd: Opensips SNGTC Module<br>
Message-ID: <<a href="mailto:137f8a9a-774e-b381-3b20-97dd6a23bb77@opensips.org" target="_blank">137f8a9a-774e-b381-3b20-97dd6a23bb77@opensips.org</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Hi Angel,<br>
<br>
Sorry for missing out on this one -- the sngtc_server daemon should be <br>
aware of all cards present on the network (IIRC, it auto-detects them).  <br>
Similarly, the sngtc library and OpenSIPS module will auto-detect <br>
sngtc_server and make requests to it.<br>
<br>
It may sound like too good to be true, but it's how it actually works -- <br>
that's how I developed/tested the module in the first place.<br>
<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a></blockquote><div><br></div><div>Ok, thanks very much.</div><div> Regarding   the method  <span style="color:rgb(0,0,0);font-family:Helvetica,Arial">sngtc_callee_answer([listen_if_A[, listen_if_B]])</span></div><div><font color="#000000" face="Helvetica, Arial">¿Are listen_if_A and listen_if_B optional parameters?</font></div><div><font color="#000000" face="Helvetica, Arial">If not, what are the values of the IPs to use?</font></div><div><font color="#000000" face="Helvetica, Arial"><br></font></div><div><font color="#000000" face="Helvetica, Arial">Best Regards</font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 05.04.2019 20:15, Angel Fernández Sánchez wrote:<br>
><br>
><br>
> Hello all,<br>
><br>
> I'm trying to test the SNGTC module.<br>
> I have setup an installation of opensips in a machine and a sngtc <br>
> server in the same machine, in port 9000 with a sangoma D150 <br>
> configured in it which is connected to the same LAN via ethernet port.<br>
><br>
> I get no clear idea about how to specify to sngtc module how to <br>
> connect to the sngtc server. ¿Should I hardcode server data in the <br>
> library and compile?<br>
><br>
> Could you help me with this test configuration?<br>
><br>
> Best regards.<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.opensips.org/pipermail/users/attachments/20190422/3e852bab/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20190422/3e852bab/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 22 Apr 2019 09:10:54 +0300<br>
From: Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>><br>
To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
Subject: Re: [OpenSIPS-Users] WebRTC and mid_registrar issue<br>
Message-ID: <<a href="mailto:25c7fc75-c2e9-a768-3976-7db5edd35937@opensips.org" target="_blank">25c7fc75-c2e9-a768-3976-7db5edd35937@opensips.org</a>><br>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"<br>
<br>
Hi Terry,<br>
<br>
<br>
Currently, mid-registrar is incompatible with topology hiding, as they <br>
both attempt to edit the "Contact" header field.<br>
<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 09.04.2019 14:01, Terry Walters wrote:<br>
> I have a working OpenSIPS deployment running as a PSTN proxy and am <br>
> trying to add in support for WebRTC which will forward requests to an <br>
> internal SIP PBX. Currently the registrations appear to be passing <br>
> through the mid_registrar correctly and the initial invite from my PBX <br>
> is correctly routed to the websocket client.<br>
><br>
> The PBX receives messages up to the 180 ringing correctly, but on the <br>
> 200 OK from the websocket client the r.uri contains a <a href="http://d.id" rel="noreferrer" target="_blank">d.id</a> rather than <br>
> the ctid, this then results in the calling timing out and the ACK from <br>
> the PBX not routing to the websocket client. I believe this is the <br>
> script area that is falling over once the has_totag function is checked.<br>
><br>
> if (loose_route())<br>
>   {<br>
>    if (is_method("INVITE"))<br>
>    {<br>
>     # even if in most of the cases is useless, do RR for<br>
>     # re-INVITEs alos, as some buggy clients do change route set<br>
>     # during the dialog.<br>
>     record_route();<br>
>    }<br>
>    else if (is_method("ACK"))<br>
>    {<br>
>     if (has_body("application/sdp"))<br>
>     {<br>
>      # check if destination is WS<br>
>      if ($du != NULL)<br>
>       $var(proto) = $dP;<br>
>      else<br>
>       $var(proto) = $rP;<br>
>      if ($var(proto) == "WS" || $var(proto) == "WSS")<br>
>       setbflag(DST_WS);<br>
><br>
>      route(rtpengine_answer);<br>
>     }<br>
>    }<br>
><br>
>    # route it out to whatever destination was set by loose_route()<br>
>    # in $du (destination URI).<br>
>    route(websocket);<br>
>   }<br>
>   else<br>
>   {<br>
>    if ( is_method("ACK") )<br>
>    {<br>
>     if ( t_check_trans() )<br>
>     {<br>
>      # non loose-route, but stateful ACK; must be an ACK after<br>
>      # a 487 or e.g. 404 from upstream server<br>
>      t_relay();<br>
>      exit;<br>
>     }<br>
>     else<br>
>     {<br>
>      # ACK without matching transaction -><br>
>      # ignore and discard<br>
>      exit;<br>
>     }<br>
>    }<br>
>    sl_send_reply("404","Not here");<br>
><br>
> The route[websocket] is using force send socket to remove the NAT <br>
> address that cannot be accessed internally:<br>
><br>
> route[webscoket]<br>
> {<br>
> xlog("L_INFO","Entered websocket route");<br>
> # for each branch we will call the function below<br>
> t_on_branch("per_branch_ops");<br>
><br>
> # for each reply we will call the function below<br>
> t_on_reply("handle_nat");<br>
> # initial invites from the main registrar - need to look them up!<br>
> if (is_method("INVITE"))<br>
>  if($Ri == "1.1.1.1" and $Rp == 5070)<br>
>  {<br>
>   xlog("L_INFO","Call received for a websocket client");<br>
>   if (!mid_registrar_lookup("location"))<br>
>   {<br>
>    t_reply("404", "Not Found");<br>
>    exit;<br>
>   }<br>
><br>
>  }<br>
>  else  if($Ri=="1.1.1.1" && $Rp == "8080")<br>
>  {<br>
>   xlog("L_INFO","Inbound call received on port 8080");<br>
>   route("ToInternal");<br>
>   t_on_failure("int_invites");<br>
>  }<br>
><br>
> if((is_method("REGISTER"))&&($Ri=="1.1.1.1")&&($Rp =="8080"))<br>
> {<br>
>  xlog("L_INFO","Register received - mid-registrar actions");<br>
>  fix_nated_register();<br>
>  mid_registrar_save("location");<br>
>  switch ($retcode)<br>
>  {<br>
>  case 1:<br>
>   xlog("L_INFO", "forwarding REGISTER to main registrar...\n");<br>
>   $ru = "sip:<a href="http://2.2.2.2:5060" rel="noreferrer" target="_blank">2.2.2.2:5060</a>";<br>
>   force_send_socket(UDP:<a href="http://1.1.1.1:5070" rel="noreferrer" target="_blank">1.1.1.1:5070</a>);<br>
>  if (!t_relay()) {<br>
>   send_reply("500", "Server Internal Error 1");<br>
>  }<br>
>   t_on_failure("int_invites");<br>
>   break;<br>
>  case 2:<br>
>   xlog("L_INFO", "REGISTER has been absorbed!\n");<br>
>   break;<br>
>  default:<br>
>   xlog("L_ERR", "mid-registrar error!\n");<br>
>   send_reply("500", "Server Internal Error 2");<br>
>  }<br>
><br>
>  exit;<br>
> }<br>
><br>
> # removing the rtpproxy session<br>
> if(is_method("CANCEL|BYE"))<br>
> {<br>
>  rtpengine_delete();<br>
> }<br>
><br>
>     # try to send the request on its way, if it fails send back a<br>
>     # stateless error to the requestor<br>
>     if (t_relay())<br>
>     {<br>
>         xlog("L_INFO", "$ci|pass|$rd:$rp");<br>
>     }<br>
>     else<br>
>     {<br>
>         xlog("L_ERR", "$ci|end|unable to relay message");<br>
><br>
>         sl_reply_error();<br>
>     }<br>
><br>
><br>
> }<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.opensips.org/pipermail/users/attachments/20190422/37488446/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20190422/37488446/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 22 Apr 2019 09:15:44 +0300<br>
From: Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>><br>
To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
Subject: Re: [OpenSIPS-Users] Integrating with Asterisk in the same<br>
        box<br>
Message-ID: <<a href="mailto:a2bce359-3139-6258-1375-c2c3beaf851c@opensips.org" target="_blank">a2bce359-3139-6258-1375-c2c3beaf851c@opensips.org</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
> Hi all. I have an installation of opensips 2.4 with control panel, in <br>
> a Debian 8 server.<br>
> I would like to integrate my Opensips installation with an Asterisk <br>
> 16. For the time being it has to be in the same box. So it would <br>
> enhance with Incoming/outgoing Trunks, IVR, Voicemail, Conference,etc.<br>
> The system at the moment has this setup<br>
> <a href="https://www.powerpbx.org/content/opensips-v24-debian-v8-mariadb-apache-v1" rel="noreferrer" target="_blank">https://www.powerpbx.org/content/opensips-v24-debian-v8-mariadb-apache-v1</a><br>
> and i have installed a simple asterisk (Chan_SIP) as simple as <br>
> possible, without anything fancy. As an example of the Asterisk config <br>
> i used the guide<br>
> <a href="https://computingforgeeks.com/how-to-install-asterisk-16-lts-on-ubuntu-18-04-16-04-debian-9/" rel="noreferrer" target="_blank">https://computingforgeeks.com/how-to-install-asterisk-16-lts-on-ubuntu-18-04-16-04-debian-9/</a>.<br>
> I have left the default 5060 port to Opensips and the port 5090 to <br>
> Asterisk.<br>
So far, so good.  OpenSIPS in front, Asterisk in the back -- you're on <br>
the right path.<br>
> I am looking what other config do i have to do, so i could create <br>
> users in the Opensips control panel and created automatically in the <br>
> Asterisk's database to read from.<br>
> Also what other do i have to do to make them interact seamlessly, please?<br>
Here is when it gets dicy -- there is no such software available yet.  <br>
In order to achieve this, one idea would be to fork the Control Panel <br>
and start hacking away at extending it in order to also work with <br>
Asterisk (additional GUI interactions?  additional server-side PHP logic <br>
for the Asterisk DB handling?<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 22 Apr 2019 09:23:30 +0300<br>
From: Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>><br>
To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
Subject: Re: [OpenSIPS-Users] async() and config actions call stack<br>
Message-ID: <<a href="mailto:771806a2-70a4-f8b2-beb0-970475cea13a@opensips.org" target="_blank">771806a2-70a4-f8b2-beb0-970475cea13a@opensips.org</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
Hi Vitalii,<br>
<br>
Indeed - we have thought about this alternative ever since we introduced <br>
"resume route".  However, the amount of work required to make this <br>
happen is immense, and would retard the development of other, <br>
potentially much more useful features.  It is our belief that, for the <br>
moment, having to break down the logic into "before" and "after" <br>
sections is not that much of a deal-breaker (I can personally attest to <br>
that!).  Here are two tips to make your script more readable:<br>
<br>
* try breaking it down into multiple files, grouped by business logic<br>
<br>
* try to have a naming convention for the resume routes, for example: <br>
"resume_lnp_dip"<br>
<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 09.04.2019 18:28, Vitalii Aleksandrov wrote:<br>
> Hi opensips team and community,<br>
><br>
>     Want to share one headache I have which might be converted into a <br>
> feature request. It's about async() implementation. I use it, like <br>
> probably many of us, for db operations and http requests and it's so <br>
> complicated to insert an async() call so some already written and <br>
> tested config. The requirement to set a "resume_route" and continue <br>
> request processing in it forces to break a script into "before async" <br>
> and "after async" parts. If you have only one async() call during <br>
> request processing it's more or less manageable and when it comes to <br>
> many async() operations it becomes a nightmare.<br>
><br>
>     I'm dreaming about the way to just "return" from a "resume_route" <br>
> and continue script execution from the instruction next to the place <br>
> were async() was called. Frankly speaking I didn't check how it's <br>
> implemented and config execution part of opensips is a blackbox for <br>
> me. So I assume there might be some architectural reasons and <br>
> obstacles which don't allow to make it this way.<br>
><br>
>     Haven't found anything related in 3.0 roadmap. I'm sure this would <br>
> be very beneficial for all opensips users.<br>
><br>
> Feedback and comments are appreciated.<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Users Digest, Vol 129, Issue 20<br>
**************************************<br>
</blockquote></div></div>