[OpenSIPS-Users] Calling MediaProxy twice for same call results in no voice

Saúl Ibarra Corretgé saul at ag-projects.com
Fri Jun 8 13:50:08 CEST 2012


Hi,

On Jun 8, 2012, at 11:53 AM, Jayesh Nambiar wrote:

> Hi All,
> I have a following scenario:
> 1) I have one opensips proxy(proxy1) where sip endpoints register and sends calls to.
> 2) The calls from proxy1 is sent to another opensips proxy(proxy2) which routes calls to PSTN carriers.
> 3) Both the proxy1 and proxy2 have mediaproxy module loaded and the dispatcher on each server is connected to the same media-relay(Relay1).
> The problem is here:
> 1) When a call comes to Proxy1, I call engage_media_proxy. This allocates media ports from Relay1 and sends the call to Proxy2 for call completion.
> 2) Now the Proxy2 is again calling engage_media_proxy, since the Proxy2 is configured in such a way that it calls engage_media_relay for every call signaled through it.
> 3) Now since the Proxy2 is also configured to use the same media-relay that Proxy1 was using, the Relay1 allocates media ports for same call from the same media-relay again.
> 4) Theoretically, I assumed that this should work but it results in No Audio on both ends.
> 5) But, When I enabled a condition in Proxy2 which says that if the call is initiated from Proxy1, don't call "engage_media_proxy", the voice is good and both parties can hear.
> 
> I understand that it is not right to call media_proxy twice for the same call even if it is from different opensips proxies, I am only curios to know what goes wrong in this scenario.
> These are two different opensips calling "engage_media_proxy", so why and where does the mediaproxy get confused??
> 
> Any ideas in making me understand this concept will be very helpful !!
> 

Even if they are different proxy instances, the call identifiers are the same: call-id, from-tag, to-tag and so on. The relay will be instructed to update the data from the session by both proxies, not a good thing.

Since you probably need to do NAT traversal between users as well I'd remove the NAT traversal handling from proxy2 and keep it just on proxy1.


Regards,

--
Saúl Ibarra Corretgé
AG Projects






More information about the Users mailing list