[Asterisk-Users] USING TWO ACCOUNTS WITH BROADVOICE

Rich Adamson radamson at routers.com
Mon Sep 5 19:59:26 MST 2005


> I have two accounts with broadvoice.
> Now, I want to be able to distinguish between them.
> 
> I though that this would be simple by adding "/EXTEN" at the end of the
> register statement. For example:
> register => num1:pass at sip.broadvoice.com/1000
> Unfortunately, this is not working.
> When I call into my box I hear busy tone.
> My config looks like this:
> 
> [root at voip asterisk]# cat sip.conf
> [general]
> externip=mydomain
> bindaddr = 0.0.0.0
> port=5060
> localnet=192.168.1.0/255.255.255.0
> disallow=all
> allow=ulaw
> register => num1:pass at sip.broadvoice.com
> register => num2:passsip.broadvoice.com
> tos=0x18
> srvlookup=yes
> nat=never
> insecure=yes
> 
> 
> [sip.broadvoice.com]
> type=peer
> username=NUM1
> fromuser=NUM1
> authuser=NUM1
> secret=SECRET
> host=sip.broadvoice.com
> context=sip
> fromdomain=sip.broadvoice.com
> canreinvite=no
> nat=never
> dtmfmode=inband
> 
> [sip.broadvoice.com.home]
> type=peer
> username=NUM2
> fromuser=NUM2
> authuser=NUM2
> secret=SECRET
> host=sip.broadvoice.com
> context=sip
> fromdomain=sip.broadvoice.com
> canreinvite=no
> nat=never
> dtmfmode=inband
> 
> [broadvoice-incoming]
> type=peer
> host=147.135.8.128
> context=from-broadvoice
> qualify=yes
> canreinvite=no
> disallow=all
> allow=ulaw
> nat=never
> 
> [broadvoice-incoming2]
> type=peer
> host=147.135.0.128
> context=from-broadvoice
> qualify=yes
> canreinvite=no
> disallow=all
> allow=ulaw
> nat=never
> 
> [broadvoice-incoming3]
> type=peer
> host=147.135.4.128
> context=from-broadvoice
> qualify=yes
> canreinvite=no
> disallow=all
> allow=ulaw
> nat=never
> 
> 
> In addition, I have this config in extensions.
> 
> [sip]
> 
> exten => 1000,1,Playback,welcome

You will need to do something like this:

sip.conf
register => num1:pass at sip.broadvoice.com/1234
register => num2:pass at sip.broadvoice.com/4567

extensions.conf
[from-broadvoice]
exten => 1234,1,DoSomething

exten => 4567,1,DoSomething

As I recall (which might be a little out of date), incoming sip
calls (from anywhere) do not match contexts as one might expect.
I believe your contexts broadvoice-incoming2 and broadvoice-incoming3
are identical, and incoming calls likely match on the last context
in sip.conf. (I don't use BV and don't use sip gateways, so I might
be little off base here.)

You will likely want to use a sip context something like this:
; [broadvoice]  ; this is referenced for outgoing calls to Broadvoice.com
 type=friend                                                         
 username=3035391234   ; not needed as its in the Register statement
 secret=x65xv7                                                           
 host=sip.broadvoice.com                            
 insecure=very                                    
 canreinvite=no                                           
 dtmfmode=inband                                
 fromuser=3035391234                                 
 fromdomain=sip.broadvoice.com                   
 context=from-broadvoice                  
 disallow=all                                                         
 allow=ulaw                                                        
 deny=0.0.0.0/0.0.0.0                        
 permit=147.135.8.129/255.255.255.0                                   
 permit=147.135.0.129/255.255.255.0                  
 permit=147.135.4.128/255.255.255.0

Keep in mind that calls to you can come from any one of their servers.
Without some form of deny and permit, hackers can fairly easily
generate calls into your box. (The above was a working BV context
from about a year ago or so.)






More information about the asterisk-users mailing list