<div dir="ltr"><div>Thanks Alex!</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 10 Dec 2020 at 14:09, Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">if(has_body("application/sdp") && search("a=sendonly")) [1]<br>
<br>
It's what comes to mind off the top of my head, anyway.<br>
<br>
-- Alex<br>
<br>
[1] <a href="https://www.kamailio.org/docs/modules/stable/modules/textops.html" rel="noreferrer" target="_blank">https://www.kamailio.org/docs/modules/stable/modules/textops.html</a><br>
<br>
On 12/9/20 7:43 PM, David Cunningham wrote:<br>
> Hi Alex,<br>
> <br>
> Thank you for that. Do you offhand know of an easy way to test if the <br>
> sendonly attribute is set? Presumably we can use <br>
> sdp_remove_line_by_prefix() to remove it.,<br>
> <br>
> <br>
> On Wed, 9 Dec 2020 at 20:52, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a> <br>
> <mailto:<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>>> wrote:<br>
> <br>
>  Â  Â The salient quality of a reinvite is that has_totag() == true; it is<br>
>  Â  Â handled in the loose_route() section of your config. You want to do the<br>
>  Â  Â SDP manipulation in the part below that, where initial INVITEs are<br>
>  Â  Â handled.<br>
> <br>
>  Â  Â On 12/9/20 2:47 AM, David Cunningham wrote:<br>
>  Â  Â  > Hi Daniel,<br>
>  Â  Â  ><br>
>  Â  Â  > Removing the sendonly from the INVITE SDP sounds like the most<br>
>  Â  Â workable<br>
>  Â  Â  > solution in our case. We'd only want to do it for a new INVITE<br>
>  Â  Â though,<br>
>  Â  Â  > not a re-INVITE in a situation where a call is put on hold. Would<br>
>  Â  Â you be<br>
>  Â  Â  > able to give an example of such a configuration?<br>
>  Â  Â  ><br>
>  Â  Â  > Thanks very much for your help!<br>
>  Â  Â  ><br>
>  Â  Â  ><br>
>  Â  Â  > On Tue, 8 Dec 2020 at 21:56, Daniel-Constantin Mierla<br>
>  Â  Â <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>><br>
>  Â  Â  > <mailto:<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>>> wrote:<br>
>  Â  Â  ><br>
>  Â  Â  >  Â  Â Hello,<br>
>  Â  Â  ><br>
>  Â  Â  >  Â  Â if the endpoint is not behind a port forwarding nat/firewall<br>
>  Â  Â (when<br>
>  Â  Â  >  Â  Â one can instruct the rtp relay to use signaling address), then<br>
>  Â  Â  >  Â  Â probably you can try to remove the sendonly from the INVITE SDP.<br>
>  Â  Â  >  Â  Â That will enable rtp from endpoint to doorbell, which may rise<br>
>  Â  Â  >  Â  Â additional concerns (e.g., privacy) if its is explicitly not<br>
>  Â  Â wanted<br>
>  Â  Â  >  Â  Â to happen. But as Alex said in another response, the only way<br>
>  Â  Â to get<br>
>  Â  Â  >  Â  Â it work is to make the endpoint behind nat to send a RTP packet.<br>
>  Â  Â  >  Â  Â Usually the doorbells I encountered so far were accepting<br>
>  Â  Â incoming<br>
>  Â  Â  >  Â  Â traffic as well, to discuss/interact with the person ringing<br>
>  Â  Â on it.<br>
>  Â  Â  ><br>
>  Â  Â  >  Â  Â Cheers,<br>
>  Â  Â  >  Â  Â Daniel<br>
>  Â  Â  ><br>
>  Â  Â  >  Â  Â On 08.12.20 05:01, David Cunningham wrote:<br>
>  Â  Â  >>  Â  Â Hello,<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â We have a problem with a SIP doorbell device which sends<br>
>  Â  Â media one<br>
>  Â  Â  >>  Â  Â way only, and NAT at the receiving device.<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â When the doorbell button is pressed it makes a call to a<br>
>  Â  Â  >>  Â  Â configured destination. Since the doorbell only sends and<br>
>  Â  Â doesn't<br>
>  Â  Â  >>  Â  Â receive it sends the INVITE with sendonly in the SDP, and the<br>
>  Â  Â  >>  Â  Â destination then replies with a 200 OK with recvonly in the SDP.<br>
>  Â  Â  >>  Â  Â The problem is that the destination is behind NAT, and its reply<br>
>  Â  Â  >>  Â  Â contains a private network IP in the SDP.<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â Normally Asterisk when nat=yes works around that by<br>
>  Â  Â adjusting the<br>
>  Â  Â  >>  Â  Â destination for RTP to be the address it actually receives audio<br>
>  Â  Â  >>  Â  Â from, however because this device is recvonly Asterisk never<br>
>  Â  Â  >>  Â  Â receives audio from it. This means Asterisk keeps trying to send<br>
>  Â  Â  >>  Â  Â the doorbell's RTP to the private network IP which of course<br>
>  Â  Â  >>  Â  Â fails, and the destination never gets the RTP from the doorbell.<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â We haven't found a solution in Asterisk to this, so are now<br>
>  Â  Â  >>  Â  Â looking to Kamailio which acts as a load-balancing proxy in<br>
>  Â  Â front<br>
>  Â  Â  >>  Â  Â of Asterisk for one. For example, maybe we could use<br>
>  Â  Â  >>  Â  Â fix_nated_sdp, but only on 200 OK's with recvonly.<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â Has anyone else encountered this, and are there any recommended<br>
>  Â  Â  >>  Â  Â solutions?<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â Thank you in advance!<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â --<br>
>  Â  Â  >>  Â  Â David Cunningham, Voisonics Limited<br>
>  Â  Â  >> <a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a> <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a>><br>
>  Â  Â <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a> <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a>>><br>
>  Â  Â  >>  Â  Â USA: +1 213 221 1092<br>
>  Â  Â  >>  Â  Â New Zealand: +64 (0)28 2558 3782<br>
>  Â  Â  >><br>
>  Â  Â  >>  Â  Â _______________________________________________<br>
>  Â  Â  >>  Â  Â Kamailio (SER) - Users Mailing List<br>
>  Â  Â  >> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>  Â  Â <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>> <br>
>  Â  Â <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>  Â  Â <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>>><br>
>  Â  Â  >> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>  Â  Â <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>> <br>
>  Â  Â <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>  Â  Â <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>>><br>
>  Â  Â  ><br>
>  Â  Â  >  Â  Â --<br>
>  Â  Â  >  Â  Â Daniel-Constantin Mierla --<a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
>  Â  Â <<a href="http://www.asipto.com" rel="noreferrer" target="_blank">http://www.asipto.com</a>>  <<a href="http://www.asipto.com" rel="noreferrer" target="_blank">http://www.asipto.com</a> <<a href="http://www.asipto.com" rel="noreferrer" target="_blank">http://www.asipto.com</a>>><br>
>  Â  Â  > <a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> <<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">http://www.twitter.com/miconda</a>> <br>
>  Â  Â <<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">http://www.twitter.com/miconda</a> <<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">http://www.twitter.com/miconda</a>>> <br>
>  Â  Â --<a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a> <<a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a>> <br>
>  Â  Â <<a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a><br>
>  Â  Â <<a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a>>><br>
>  Â  Â  >  Â  Â Funding:<a href="https://www.paypal.me/dcmierla" rel="noreferrer" target="_blank">https://www.paypal.me/dcmierla</a><br>
>  Â  Â <<a href="https://www.paypal.me/dcmierla" rel="noreferrer" target="_blank">https://www.paypal.me/dcmierla</a>>  <<a href="https://www.paypal.me/dcmierla" rel="noreferrer" target="_blank">https://www.paypal.me/dcmierla</a><br>
>  Â  Â <<a href="https://www.paypal.me/dcmierla" rel="noreferrer" target="_blank">https://www.paypal.me/dcmierla</a>>><br>
>  Â  Â  ><br>
>  Â  Â  ><br>
>  Â  Â  ><br>
>  Â  Â  > --<br>
>  Â  Â  > David Cunningham, Voisonics Limited<br>
>  Â  Â  > <a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a> <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a>><br>
>  Â  Â <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a> <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a>>><br>
>  Â  Â  > USA: +1 213 221 1092<br>
>  Â  Â  > New Zealand: +64 (0)28 2558 3782<br>
>  Â  Â  ><br>
>  Â  Â  > _______________________________________________<br>
>  Â  Â  > Kamailio (SER) - Users Mailing List<br>
>  Â  Â  > <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>  Â  Â  > <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>  Â  Â <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
>  Â  Â  ><br>
> <br>
>  Â  Â -- <br>
>  Â  Â Alex Balashov | Principal | Evariste Systems LLC<br>
> <br>
>  Â  Â Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
>  Â  Â Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a> <<a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>>,<br>
>  Â  Â <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a> <<a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a>><br>
> <br>
>  Â  Â _______________________________________________<br>
>  Â  Â Kamailio (SER) - Users Mailing List<br>
>  Â  Â <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>  Â  Â <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>  Â  Â <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
> <br>
> <br>
> <br>
> -- <br>
> David Cunningham, Voisonics Limited<br>
> <a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a> <<a href="http://voisonics.com/" rel="noreferrer" target="_blank">http://voisonics.com/</a>><br>
> USA: +1 213 221 1092<br>
> New Zealand: +64 (0)28 2558 3782<br>
> <br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>David Cunningham, Voisonics Limited<br><a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>USA: +1 213 221 1092<br>New Zealand: +64 (0)28 2558 3782</div></div></div></div></div></div></div></div></div></div></div>