[OpenSIPS-Users] Opensips as SIP Proxy and WebRTC Media Gateway

Alex Megalokonomos alex at clockwork.gr
Tue Jul 4 12:07:03 EDT 2017


"You have to change a bit the OpenSIPS script to move the offer and answer
on 200 OK and ACK if the INVITE has no SDP attached."

If you could provide some pointers on this that would be great.

I'm guessing the t_on_reply ("handle_nat") stays as is

While the branch_route[handle_nat] logic needs to be moved to ACK. But how
do I differentiate this ACK which is in response to the 200 ok to the
invite compared to a different one?

On Tue, Jul 4, 2017 at 6:57 PM, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> Yeah, sorry, missed that one .
>
> Well, it seems that OmniPCX is doing late SDP negotiation (via 200OK +
> ACK, instead of INVITE+200OK) and the tutorial script does not handle this
> case (for simplicity and clarity reasons).
>
> So, right now the RTPengine interaction (the offer and answer) are done at
> INVITE and 200 OK time.
>
> You have to change a bit the OpenSIPS script to move the offer and answer
> on 200 OK and ACK if the INVITE has no SDP attached.
>
> Let me know if you need any assistance.
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Bootcamp 2017, Houston, US
>   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>
> On 07/04/2017 06:22 PM, Alex Megalokonomos wrote:
>
> As you may have noticed in my last reply, I reached that far as well but
> got stuck later on on what appears to be the rtp engine configuration.
>
> Not strictly an Opensips issue but you might be able to help me.
>
> On Tue, Jul 4, 2017 at 6:07 PM, Bogdan-Andrei Iancu <
> <bogdan at opensips.org>bogdan at opensips.org> wrote:
>
>> Hi Alex,
>>
>> Thank you for the offlist provided data. Shortly, the ACK received by
>> OpenSIPS from OmniPCX is broken as it is missing all the Route headers.
>> According to the pcap, it looks like:
>>
>> ACK sip:udoioiia at 10.0.1.106:49246;transport=ws SIP/2.0
>> Record-Route: <sip:10.0.1.200:5059;ftag=d5de999de446df5165d773dac1f369ec;
>> lr=on>
>> Contact: "Megalokonomos A." <sip:694 at 10.0.1.200:45698>
>> User-Agent: OxO_SPG_103/012.001
>> Content-Type: application/sdp
>> To: sip:694 at 10.0.1.200;tag=4em4m1ah9r
>> From: "Megalokonomos A." <sip:610 at 10.0.1.200>;tag=d5de9
>> 99de446df5165d773dac1f369ec
>> Call-ID: af3cc9085db1c8dd86050eb91d747249 at 10.0.1.200
>> CSeq: 659214613 ACK
>> Via: SIP/2.0/UDP 10.0.1.200:5059;branch=z9hG4bK
>> f3de.2fc1fc65cece765af47f9baf8bf0906e.0;i=c
>> Via: SIP/2.0/TCP 10.0.1.200:5080;rport=45698;br
>> anch=z9hG4bK89fca3417cd4e227b4315145d96657c7
>> Max-Forwards: 69
>> Content-Length: 2960
>>
>> v=0
>> o=default 14
>> .....
>>
>>
>> As OpenSIPS does not find the Route (former Record-Route) it inserted
>> into the dialog, the routing logic in the script does not work as expected.
>> According to RFC3261, the RR headers MUST be mirrored back in 2xx replies.
>>
>> Let's try to hack to cope with the broken SIP stack on OmniPCX. In
>> script you have something like:
>>
>> 				} else {
>> 					# ACK without matching transaction ->
>> 					# ignore and discard
>> 					exit;
>> 				}
>>
>> Try replacing it with
>>
>> 				} else {
>> 					# ACK without matching transaction ->
>> 					# ignore and discard
>> 					t_relay();
>> 					exit;
>> 				}
>>
>> Let's see if this does the trick. If yes, I can suggest a even better way to fix the broken signaling, using the dialog support in OpenSIPS.
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Bootcamp 2017, Houston, US
>>   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>>
>> On 07/03/2017 01:08 PM, Bogdan-Andrei Iancu wrote:
>>
>> Hi Alex, As suspected, the ACK is not properly routed  - see the
>> retransmissions of the 200OK + ACK. SImply based on the logs I cannot see
>> what the problem is - probably some missing fix_nated_contact() for the
>> replies coming from the WS party. Please make a pcap capture + opensips log
>> (level 4) and send them to me *offlist* ! Best regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Bootcamp 2017, Houston, US
>>   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>>
>> On 06/30/2017 05:37 PM, Alex Megalokonomos wrote:
>>
>> I have attached the debug log so you get a fuller picture. I hope that's
>> ok
>> (Incoming call to WS client 694 is the WS extension...610 is my normal
>> desk phone which is connected to OmniPCX) (10.0.1.63-> OpenSIPS
>> ,10.0.1.200-> OmniPCX)
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170704/613c2e64/attachment.html>


More information about the Users mailing list