Asterisk sip client SER

Connecting from Asterisk over NAT to IPtel.org

Jan Janak of iptel.org writes:

I am using asterisk@iptel.org, all the SIP traffic will be sent to iptel.org proxy and the proxy will take care of NAT traversal. Currently I forward all numbers begining with 3 to iptel.org 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 asterisk@iptel.org 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 iptel.org, From header field must contain iptel.org so fromdomain parameter is necesarry in [iptel] section.

Testing scenario was as follows:

[Caller]----[*]---[NAT]----[iptel.org (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 iptel.org proxy asterisk looks like a normal SIP user agent behind NAT. iptel.org is running SER with extended nathelper and RTP proxy.



sip.conf

;
; SIP Configuration for Asterisk
;
[general]
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0 ; Address to bind to
context = from-sip ; Default for incoming calls
;
register => asterisk:password@iptel.org/jan ; Register with a SIP provider

[iptel]
type=friend
username=asterisk
secret=password
fromdomain=iptel.org
host=iptel.org

[jan]
type=friend
username=jan
host=dynamic
canreinvite=no


extensions.conf:


[from-sip]
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





Connecting from Asterisk over NAT to IPtel.org

Jan Janak of iptel.org writes:

I am using asterisk@iptel.org, all the SIP traffic will be sent to iptel.org proxy and the proxy will take care of NAT traversal. Currently I forward all numbers begining with 3 to iptel.org 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 asterisk@iptel.org 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 iptel.org, From header field must contain iptel.org so fromdomain parameter is necesarry in [iptel] section.

Testing scenario was as follows:

[Caller]----[*]---[NAT]----[iptel.org (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 iptel.org proxy asterisk looks like a normal SIP user agent behind NAT. iptel.org is running SER with extended nathelper and RTP proxy.



sip.conf

;
; SIP Configuration for Asterisk
;
[general]
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0 ; Address to bind to
context = from-sip ; Default for incoming calls
;
register => asterisk:password@iptel.org/jan ; Register with a SIP provider

[iptel]
type=friend
username=asterisk
secret=password
fromdomain=iptel.org
host=iptel.org

[jan]
type=friend
username=jan
host=dynamic
canreinvite=no


extensions.conf:


[from-sip]
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+