[OpenSIPS-Users] no audio from caller when using nathelper
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Apr 8 14:53:59 CEST 2009
Hi Gabriel,
Gabriel Bermudez wrote:
> Thanks for your answer Bogdan
>
> Bogdan-Andrei Iancu escribió:
>> Hi Gabriel,
>>
>> So you are not using rtpproxy, but rely on the fact that * is all the
>> time public. In this case, audio from caller to * should work all the
>> time as the destination is public (of course, if the caller does send
>> RTP). For the other way around, you can be sure * sends RTP to the
>> public IP of the NAT (of the client) by doing fix_nated_sdp("1") for
>> the invite - this will force the COMEDIA support in *.
> Yes, some phones set their contact header with the correct public IP
> address, that's when rptproxy is not used. In this case they use *
> directly (but using opensips as a proxy). I do use
> fix_nated_sdp("1"), but only when the nat_uac_test("3") gets passed.
maybe the test "3" is not enough to detect all the NAT cases....try to
use more tests to see if makes a difference.
>
>>
>> Anyhow, for RTP nat traversal to work, it is mandatory for the party
>> behind the nat to start sending RTP (to open the NAT). If the natted
>> party will send no RTP, there will be no audio at all.
> And that's exactly what wasn't happening, *sometimes* (the sometimes
> was the one bugging me really). It seemed not a opensips nat issue
> but a asterisk nat issue. So I setted up asterisk's realtime with the
> following view
>
> CREATE OR REPLACE VIEW sipfriends AS
> SELECT subscriber.username AS name, 'friend'::character varying AS
> "type", subscriber.username, subscriber."password" AS secret,
> 'dynamic'::character varying AS host, 'rfc2833'::character varying AS
> dtmfmode, 'all'::character varying AS disallow, 'g729'::character
> varying AS allow, 'no'::character varying AS canreinvite,
> 'yes'::character varying AS nat, 'from-ser'::character varying AS
> context, ''::character varying AS regserver, 0 AS regseconds
> FROM subscriber;
>
> As you can see, nat=yes always. Seems that this solved the problem,
> I'll do some more testing tomorrow ;)
Cool :)
Regards,
Bogdan
> Thanks for your help.
>
> Regards,
>
>>
>> Regard,
>> Bogdan
>>
>> Gabriel Bermudez wrote:
>>> Hi everyone,
>>>
>>> I'm using the nathelper and dispatcher module to send calls to an
>>> Asterisk server. I'm using the Asterisk as a SIP to H.323 converter
>>> because our PSTN gateway only speaks H.323
>>> For some reason *sometimes* the caller does not send RTP traffic to
>>> the opensips (one way audio). The caller's UA is behind a NAT, but
>>> it doesn't gets detected as a nated UA, so the RTP flow is between
>>> the client's public IP and the Asterisk public IP (rtpproxy is not
>>> used). I'm not sure if this problems happens also with UAs that get
>>> NAT detected (not seen it happen). I used tshark to capture the
>>> invite from an undetected NAT UA (changed the UA ip with
>>> *uac_public_ip* and opensip's ip with *opensips_public_ip*)
More information about the Users
mailing list