[SIP Beyond VoIP] STUN keep-alive

Adrian Georgescu ag at ag-projects.com
Tue Jan 17 14:02:18 CET 2012


Hi Mihai,

You need traffic from both sides to keep the NAT open. Some NAT routers close connection if the server does not answer to client pings.

The most sane configuration that works across all clients is to send SIP messages from the server side like Options method, to which all clients seem to respond so you have traffic both ways so the NAT stays open.

When you have a SIP ALG in the path what you can do is try to bypass it by using different port/protocols in the server than the standardized IANA ones.

Adrian

On Jan 17, 2012, at 1:55 PM, Mihai Richard wrote:

> Hi,
> 
> I've dug a little deeper into this and discovered that there is indeed a
> keep-alive mechanism in pjsua and it uses the ka_data and ka_interval data
> from the pjsua_acc_config struct and I believe sipsimple is not using pjsua
> and that is why I do not see those packets. With those values left to
> default it sends CRLF every 15 seconds.
> 
> And for 
>> You have a nasty intermediary breaking your SIP traffic, most likely is your
>> own router. Disable SIP ALG in your router to make sure it does not interfere.
> I could disable SIP ALG on my router but this application also has to work
> in networks where I can't do any setup/networks that I do not own.
> 
> When you're saying that I should implement support for OPTIONS you mean I
> should do a request = Request("OPTIONS", server_uri,...) and then a
> request.send()?
> 
> Thanks,
> Mihai Richard
> 
> 
> On 1/17/12 1:58 PM, "Saúl Ibarra Corretgé" <saul at ag-projects.com> wrote:
> 
>> Hi,
>> 
>> On Jan 17, 2012, at 9:43 AM, Mihai Richard wrote:
>> 
>>> In this case, from the sipsimple's interface point of view, how do I make it
>>> periodically send that UDP packet to the server? I expect to have some kind
>>> of setting for that but I don't know what it is.
>>> 
>> 
>> There is no such a setting in SIPSIMPLE SDK. If you want client side pinging
>> you'll need to build it yourself. You may have a look at
>> sipsimple/core/_privitives.py, implementing OPTIONS support is not
>> complicated, and then you'd need to send them on a timely basis from within
>> each account.
>> 
>> 
>> Regards,
>> 
>> --
>> Saúl Ibarra Corretgé
>> AG Projects
>> 
>> 
>> 
> 
> 
> _______________________________________________
> SIPBeyondVoIP mailing list
> SIPBeyondVoIP at lists.ag-projects.com
> http://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip
> 



More information about the SIPBeyondVoIP mailing list