Asterisk sip client SER

Connecting from Asterisk over NAT to

Jan Janak of writes:

I am using, all the SIP traffic will be sent to proxy and the proxy will take care of NAT traversal. Currently I forward all numbers begining with 3 to beucase I don't know how to create "fall-back" rule that will match when there are no other rules (neither i nor _. works for me).

In the other direction, calls to get translated to jan@my_asterisk_box and user jan registered at the asterisk box will receive them.

To able able to call anywhere through, From header field must contain so fromdomain parameter is necesarry in [iptel] section.

Testing scenario was as follows:

[Caller]----[*]---[NAT]----[ (public inet)]----[NAT]---[Callee]

and vice versa.

sip.conf and extensions.conf follow. I have no previous experience in configuriing asterisk so maybe the config files are not the best ones, I simply took John Todd's config files and tweaked them a bit, it seems to work for me.

To proxy asterisk looks like a normal SIP user agent behind NAT. is running SER with extended nathelper and RTP proxy.


; SIP Configuration for Asterisk
port = 5060 ; Port to bind to
bindaddr = ; Address to bind to
context = from-sip ; Default for incoming calls
register => ; Register with a SIP provider




exten => jan,1,Dial(SIP/jan)
exten => jan,2,Hangup
exten => _3.,1,SetCallerID(jan)
exten => _3.,2,SetCIDName(Jan Janak)
exten => _3.,3,Dial(SIP/${EXTEN:1}@iptel)
exten => _3.,4,Playback(invalid)
exten => _3.,5,Hangup

Created by: oej, Last modification: Wed 07 of Apr, 2004 (19:26 UTC) by chuljin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+