Multiple SIP accounts

Is it possible to registering multiple SIP accounts with one SIP provider in asterisk 1.4 and get the incoming calls to match different peers?

Thanks.

Kim

yes, its possible.
example given here:-
voip-info.org/wiki-Asterisk+config+sip.conf

note: post such queries in user forum

My experience is that when the incoming calls come from the same SIP provider(ip address), they will all match the same peer. I saw that the Olle E. Johanson had some development around this problem.
voip-info.org/wiki/view/Aste … +chan_sip2
Thats why I’am asking in the developers forum, if someone knows if this possibility has been implemented yet?

I have 3 different BroadVoice accounts and while I’m not set up 100% by any means, I think I have found a way around the multiple account issue. This may or may not work for other servers without multiple proxies.

I basically aliased the DNS names of the broadvoice proxies to simulate 3 different providers. I simply picked the 3 closest servers and assigned the closest to the account I used the most, the next closest to the 2nd most used, etc.

[hosts file]

147.135.28.128 L1.sip.broadvoice.com
147.135.0.128 L2.sip.broadvoice.com
147.135.4.128 L3.sip.broadvoice.com

[sip.conf]

(NOTE THE DIFFERENCE OF LX.SIP vs just SIP in the following lines:)
register => 478xxxxxxx@SIP.broadvoice.com:password:478xxxxxxx@L1.SIP.broadvoice.com
register => 404xxxxxxx@SIP.broadvoice.com:password:404xxxxxxx@L2.SIP.broadvoice.com
register => 478xxxxxxx@SIP.broadvoice.com:password:478xxxxxxx@L3.SIP.broadvoice.com

; and then only changed 2 lines in the individual account settings (per account):
host=L1.sip.broadvoice.com
fromdomain=L1.sip.broadvoice.com


Again, I’m not an expert as I’ve only been playing with linux and Asterisk for 3 days… :smile: And I may be totally off base here, but I did try calling into my Asterisk server using the 3 different accounts. Prior to this, they all processed incoming scripts with the same EXT.CONF settings. Now, they process their own individual account settings on incoming calls.

Can anyone see any holes in this method or verify it works for them?

this example is based on my own working config (Asterisk 1.4)

extensions.conf


[incoming]
;
exten => s,1,Set(DN=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${DN}" = "<sip:4733601@domain.tld>"]?15,1)
exten => s,3,GotoIf($["${DN}" = "<sip:4733602@domain.tld>"]?12,1)
;
exten => s,4,Goto(default,11,1)
exten => 15,1,Goto(default,15,1)
exten => 12,1,Goto(default,12,1)
;
exten => t,1,Goto(default,11,1)
exten => i,1,Goto(default,11,1)

All the calls coming to 4733601 will go to ext.15, calls for 4733602 will go ext. 12 and all other calls coming on the same trunk or the same context will go to ext.11