Bartosz Wegrzyn - asterisk
2005-Sep-05 17:16 UTC
[Asterisk-Users] USING TWO ACCOUNTS WITH BROADVOICE
Hi, 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@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@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@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 Thanks in advance. Bart
> 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@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@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@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,welcomeYou will need to do something like this: sip.conf register => num1:pass@sip.broadvoice.com/1234 register => num2:pass@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.)
for taking calls on broadvoice numbers, you need to put insecure=very and need a context in extensions.conf to handle incoming calls on the EXTEN you put in register statement in sip.conf also in sip.conf, put user or friend instead of peer. regards, Umair bari On 9/6/05, Bartosz Wegrzyn - asterisk <junk@lexoncom.com> wrote:> > Hi, > > 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@sip.broadvoice.com/1000<http://num1:pass@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@voip asterisk]# cat sip.conf > [general] > externip=mydomain > bindaddr = 0.0.0.0 <http://0.0.0.0> > port=5060 > localnet=192.168.1.0/255.255.255.0 <http://192.168.1.0/255.255.255.0> > disallow=all > allow=ulaw > register => num1:pass@sip.broadvoice.com > register => num2:passsip.broadvoice.com <http://passsip.broadvoice.com> > tos=0x18 > srvlookup=yes > nat=never > insecure=yes > > > [sip.broadvoice.com <http://sip.broadvoice.com>] > type=peer > username=NUM1 > fromuser=NUM1 > authuser=NUM1 > secret=SECRET > host=sip.broadvoice.com <http://sip.broadvoice.com> > context=sip > fromdomain=sip.broadvoice.com <http://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 <http://sip.broadvoice.com> > context=sip > fromdomain=sip.broadvoice.com <http://sip.broadvoice.com> > canreinvite=no > nat=never > dtmfmode=inband > > [broadvoice-incoming] > type=peer > host=147.135.8.128 <http://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 <http://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 <http://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 > > > Thanks in advance. > > Bart > > > > > > > > > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com <http://Easynews.com>-- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050906/7b39a9d7/attachment.htm