[OpenSIPS-Users] multiple use_media_proxy() calls

Saúl Ibarra Corretgé saul at ag-projects.com
Tue Jan 25 16:21:38 CET 2011


Hi Jeff,

>>
>> Then there is some misunderstanding somewhere. Before the first 183
>> arrives, mediaproxy cannot lock onto anything as it doesn't yet have
>> information about both endpoints. It needs a request (INVITE) and a reply
>> that carries media (183/200), before it can even begin to listen to
>> packets. So how can it lock to media before even allocating the ports and
>> listening is beyond me.
>
> Interesting.  I will re-verify the leaky media has stopped before the 183
> arrives.  A plausible explanation is that I am incorrect, and it is still
> flowing after the 183.
>

I also thought there were two 183 responses involved, but now that you 
clarified I understood and could reproduce the issue with a SIPp scenario.

This is what happens:

1. A calls B. (MediaProxy allocates ports for A)
2. B sends 100 trying reply.
3. B sends RTP. (MediaProxy *saves* this information as the real source 
of RTP for B)
4. MediaProxy does not insert a conntrack rule now, because it doesn't 
have all the required data (no real source port for A).
5. B sends 183. The SDP data is saved.
6. When the conntrack rule is created the information saved in point 3 
will be used, because it wasn't changed since then (even if we got the 
SDP in point 5).

This is a bug and will be fixed by relaying all packets that happen 
before we get an SDP in userland. That is, MediaProxy will not start 
'learning' the remote endpoint data until it receives the SDP. I can't 
tell you if this will be fixed tomorrow, but it will happen shortly.

Please do test latest MediaProxy and see if the log you get looks like 
the one I pasted here: http://pastebin.com/B83reJk7

You need to check if you the the 'Got traffic information for...' line 
*before* the 'Received updated SDP answer' line. You may send me the log 
privately if you like.

Thanks for helping us understand what was happening :-)


Regards,

-- 
Saúl Ibarra Corretgé
AG Projects



More information about the Users mailing list