[HELP] Multiple BroadVoice Accounts

I’m really having issues with my multiple BroadVoice accounts. It seems that no matter what line a call comes in on, the channel (according to * and, by extension, the flash operator panel, is always the same line). DID routing, however, works just fine as one line goes directly to an extension instead of the main menu.

I’m running Asterisk@Home 1.5 with AMP upgraded to the 009 release.

Here’s part of what I’ve got in the sip_aditional.conf file (slightly censored so as to not give away account info; XXXXXX is the areacode and exchange for my numbers and YYYYYYYYYY is the password for the accounts):

[code]register=XXXXXX1026@sip.broadvoice.com:YYYYYYYYYY:XXXXXX1026@sip.broadvoice.com/XXXXXX1026
register=XXXXXX1027@sip.broadvoice.com:YYYYYYYYYY:XXXXXX1027@sip.broadvoice.com/XXXXXX1027
register=XXXXXX1028@sip.broadvoice.com:YYYYYYYYYY:XXXXXX1028@sip.broadvoice.com/XXXXXX1028

[XXXXXX1026]
username=XXXXXX1026
user=phone
type=peer
secret=YYYYYYYYYY
Qualify=yes
pedantic=no
nat=yes
insecure=very
host=sip.broadvoice.com
fromuser=XXXXXX1026
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn
canreinvite=no
authname=XXXXXX1026

[XXXXXX1026_IN]
username=XXXXXX1026
user=XXXXXX1026
type=user
secret=YYYYYYYYYY
nat=yes
insecure=very
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn

[XXXXXX1027]
username=XXXXXX1027
user=phone
type=peer
secret=YYYYYYYYYY
Qualify=yes
pedantic=no
nat=yes
insecure=very
host=sip.broadvoice.com
fromuser=XXXXXX1027
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn
canreinvite=no
authname=XXXXXX1027

[XXXXXX1027_IN]
username=XXXXXX1027
user=XXXXXX1027
type=user
secret=YYYYYYYYYY
nat=yes
insecure=very
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn

[XXXXXX1028]
username=XXXXXX1028
user=phone
type=peer
secret=YYYYYYYYYY
Qualify=yes
pedantic=no
nat=yes
insecure=very
host=sip.broadvoice.com
fromuser=XXXXXX1028
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn
canreinvite=no
authname=XXXXXX1028

[XXXXXX1028_IN]
username=XXXXXX1028
user=XXXXXX1028
type=user
secret=YYYYYYYYYY
nat=yes
insecure=very
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
dtmfmode=rfc2833
dtmf=rfc2833
context=from-pstn[/code]

The above info I got from http://voipspeak.net/index.php?option=com_content&task=view&id=18 but I slightly modified it to “work” for my multiple lines.

Making an outgoing call selects the correct channel. But all incoming calls appear on “[XXXXXX1028]” and not the ones ending in “_IN” as I would have expected. I have duplicated this behavior on two systems here in my office (I have 6 broadvoice business accounts in total). Can anyone make any suggestions?[/url]

I have the same problem with multiple Sipgate numbers.

I suspect that the number does not actually get supplied by Broadvoice
but that Asterisk determines it by means of the “register” entry; and since
it uses the same server, it just uses the last one to register for all calls coming from that server.

This might work differently if Broadvoice supports using a different port number – don’t know if they do.

Well, what would happen if I made entries in /etc/hosts that all point to the same IP but have different names? Then perhaps they would register to a different “server”. Maybe I’ll try that some time…

Don’t bother trying this, I just did. They still all come in on the same line. I even tried pointing them at different proxies, figuring that maybe it was resolving to the same IP and still causing problems but they still aren’t working correctly.

As I said though, it’s odd because inbound routing works just fine. It’s detecting what line it’s coming in on, it just isn’t reporting it correctly in the channel name.

Does anyone have any ideas on my issue?

I just tried installing A@H 2.0 (Final) on a test box and I moved one of my Broadvoice accounts over to it. It isn’t even reporting that single line correctly in the Flash Operator Panel. Both incoming and outgoing calls appear on “XXXXXX1028” instead of the outgoing on that one and the incoming on “XXXXXX1028_IN”.

Does anyone have the Flash Operator Panel correctly reporting whether a SIP call is incoming or outgoing? Does anyone have the panel correctly displaying which line is being used if you have more than one SIP account with the same provider? If so, please post your config details from sip.conf. Thanks.

EDIT: I just moved a second line over and the very first console line I get when calling XXXXXX1028 is below (censored). Again, the DID is coming in correctly, it’s just the channel name that gets hosed. My outgoing calls are registered under a correct channel name.

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?

suggestion-

get rid of the extension at the end of the register line and also have it register by peername

IE instead of
register => user:pass:authuser@sip.broadvoice.com/destinationext
do
register => user:pass:authuser@broadvoice-line1

[broadvoice-line1]
blah blah blah

then it will use the host= line from the peer definition

put them all in the same context and do:

exten => YOURfirstBROADVOICENUMBER,1,Goto(somewhere)
exten => YOURsecondBROADVOICENUMBER,1,Goto(somewhere)
exten => YOURthirdBROADVOICENUMBER,1,Goto(somewhere)

hope that helps

just want to point to 100% working solution
forums.digium.com/viewtopic.php?p=41192#41192