multiple SIP accounts

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

multiple SIP accounts

Postby kstahl » Fri Oct 27, 2006 3:05 pm

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
kstahl
Newsterisk
 
Posts: 2
Joined: Thu Dec 21, 2006 10:56 pm

Re: multiple SIP accounts

Postby vinod.vijayan » Sat Oct 28, 2006 1:31 pm

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

note: post such queries in user forum
Today is a new day.
vinod.vijayan
Oldsterisk
 
Posts: 223
Joined: Thu Dec 21, 2006 10:56 pm

Postby kstahl » Sun Oct 29, 2006 9:57 am

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.
http://www.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?
kstahl
Newsterisk
 
Posts: 2
Joined: Thu Dec 21, 2006 10:56 pm

Postby jjblodg » Sat Jan 13, 2007 5:53 pm

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... :) 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?
jjblodg
Newsterisk
 
Posts: 13
Joined: Wed Jan 10, 2007 9:38 am

Postby AndrewZ » Sun Jan 14, 2007 8:45 am

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

extensions.conf
Code: Select all

[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
AndrewZ
Oldsterisk
 
Posts: 220
Joined: Thu Jan 04, 2007 5:58 pm


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest