login | register
Sat 06 of Sep, 2008 [16:15 UTC]

voip-info.org

Asterisk settings Broadvoice

Created by: jjhall,Last modification on Sat 07 of Apr, 2007 [20:58 UTC] by AlexCeli
The second config below worked for me when none of the others did, make sure you get your auth_password: from "account" tab after you log in to broadvoice. Don't use your website password for your config files.

Broadvoice's official version of the instructions can be found here

A draft copy of the official instructions can be found here:
http://foo.robotics.net/mediawiki-1.3.10/index.php/Asterisk_Setup

This setup is used to dial out from Broadvoice and to ring a SIP extension on incoming calls. The code is made entirely of excerpts of the configuration files, and need the remaining portions of the files to be useful.

Please keep each example in its own separate box in order to keep each example separate.

Replace any host= information and the server portion of the register line if the settings provided to you are different.

Note: If your IP is dynamic (you receive a different IP everytime you logon with your ISP) try working without externip= ... if that does not work, register with a dyndns (DDNS) type service. Many other examples have used IP adresses, however most of these are now obsolete. It is not recommended to point at IP adresses, instead use sip.broadvoice.com, or the proxy host you've been provided with.


A common question is how many concurrent calls can be recieved or placed. I think this says the most about that: Broadvoice Takes The "Limits" Off "Unlimited" .. in addition to monitoring usage patterns to look for suspect activity, which many providers do, BroadVoice will also charge the end-user 3.9 cents per minute if more than one outbound call is active using the same set of SIP credentials (except in the case of a three-way call).


++++++++++++++Workable Bradvoice Configuration with Asterisk+++++++++++++++++

Don't waste your time, read this IMPORTANT message carefully.

==================================IMPORTANT==================================
Note: Currently you can't make outgoing call through your broadvoice account with earlier version of asterisk. But incoming is fine. To make outgoing call, you have to use Asterisk-1.0.6 or later. I used Asterisk-1.0.7 and it works perfectly. But if you don't change your Asterisk version, then you have to use the Patch *** with your Asterisk.

To configure your broadvoice account with Asterisk, follow the instruntion of the URL:

http://www.broadvoice.com/support_install_asterisk.html (Don't miss any instruction when you will configure your Asterisk)

===============================IMPORTANT=====================================

Modify /etc/hosts file:

=>Finding the right proxy
Ping the following hosts and select for the best time:
- proxy.lax.broadvoice.com
- proxy.dca.broadvoice.com
- proxy.mia.broadvoice.com

After you have chosen the one with the best ping time, do a dnslookup by running nslookup on the hostname.

=>Modifying /etc/hosts
Using the IP Address you received from nslookup add a line like this to /etc/hosts:
{ip} sip.broadvoice.com

Insert the IP appropriately


====================begin_of_sip.conf==============================

[general]

context=context
pedantic=no (Version of asterisk 0.9.0 default is pedantic=no)
register => PHONENUMBER:PASSWORD@sip.broadvoice.com

[sip.broadvoice.com]
type = peer
host = sip.broadvoice.com
secret = PASSWORD
user=phone ; I needed this to make it work
fromuser = PHONENUMBER
username= PHONENUMBER
authname= PHONENUMBER
fromdomain = sip.broadvoice.com
context = context
insecure=very ; To allow registered hosts to call without re-authenticating
canreinvite = no
; BV claims they support rfc2833, but for some reason passing digits
; after a connected call only works with inband
dtmfmode = inband
dtmf=inband

====================end_of_sip.conf=============================


===============begin_of_extensions.conf===========================

[context]

;For incoming calls
;This extension line will ring SIP
;extension 2001 for 60 seconds then hang up. Modify as necessary to fit your dialplan
exten => s,1,Dial(SIP/2001,60,tr)
exten => s,2,hangup

For outgoing calls
;Pattern match for local call plan, use appropriate pattern if on nationwide plan.
exten => _1NXXNXXXXXX,1,dial(SIP/${EXTEN}@sip.broadvoice.com,30)
exten => _1NXXNXXXXXX,2,congestion()
exten => _1NXXNXXXXXX,102,busy()

==================end_of_extensions.conf============================

Cheers(:biggrin:)
_Nahid Hossain_
Last Update: May 28, 2005

++++++++++++++Workable Bradvoice Configuration with Asterisk+++++++++++++++++


The important thing, is - PASSWORD is a SIP authentication password, you can get it either by emailing support@broadvoice.com (slow), or calling them at the support number listed on http://www.broadvoice.com/.
A third and easiest way is to login to your online account, click on the "Account" tab, then at the bottom right click the "Show Settings" link. Your password is the auth_password value.

Alternative Example:
I've tried to nail down each value more specifically, and remove any unneeded values. This is the sip.conf I came up with. I *am* behind a NAT, but I have externip and localnet set in sip.conf, as well as 5060 and all my ports in rtp.conf forwarded to the Asterisk machine, as well as no firewalling.

Anything in <> is found in the configuration information available under your account page on the broadvoice website.

It's worth mentioning that your auth_id and phone_number are not ALWAYS the same (if you change your number, for example), but they usually are.

Update: Added "insecure=very". If you remove 'insecure' calls from BV to * will continue to work for a while but eventually stop (in my experience).

register => <phone_number>@sip.broadvoice.com:<auth_password>:<auth_id>@sip.broadvoice.com

[sip.broadvoice.com]
;Calls both incoming and outgoing use this definition, so friend
type=friend
;Also can be proxy.xxx.broadvoice.com, but not all accounts work with each proxy
host=sip.broadvoice.com
;auth_id, which is not necessarily your phone_number
username=<auth_id>
;auth_password, assigned by BV
secret=<auth_password>
;this is always sip.broadvoice.com
fromdomain=sip.broadvoice.com
;phone_number, which is not necessarily your auth_id
fromuser=<phone_number>
;must set this for calls from BV to *
insecure=very
;the context to dump any incoming calls into
context=from-broadvoice
;BV claims rfc2833 support, but this is needed anyways
dtmfmode=inband
;Disable canreinvite if you are behind a NAT
canreinvite=no
;If you're crossing a NAT, qualify will keep the link open
qualify=yes



      • The Patch:

With version 1.0.5 of Asterisk, if it registers but you can not make nor receive calls, try to patch the following part of the patch that comes from http://edvina.net/broadvoice/. It seems that it is needed to work.
Version 1.0.6 seems to function unpatched.

@@ -3728,16 +3738,28 @@
/* If we have full contact, trust it */
strncpy(invite, p->fullcontact, sizeof(invite) - 1);
/* Otherwise, use the username while waiting for registration */
- } else if (!ast_strlen_zero(p->username)) {
- if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) {
- snprintf(invite, sizeof(invite), "sip:NaVs:%d",p->username, p->tohost, ntohs(p->sa.sin_port));
+ } else { + /* If we have set the fromdomain, this is also used + as the to domain for SIP calls to a peer. Fromdomain + is used for calls to SIP proxys mostly + */ + char fromdomain256; + if (!ast_strlen_zero(p->fromdomain)) { + strncpy(fromdomain, p->fromdomain, sizeof(fromdomain) -1); } else {
- snprintf(invite, sizeof(invite), "sip:NaVs",p->username, p->tohost);
+ strncpy(fromdomain, p->tohost, sizeof(fromdomain) -1); + } + if (!ast_strlen_zero(p->username)) { + if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { + snprintf(invite, sizeof(invite), "sip:NaVs:%d",p->username, fromdomain, ntohs(p->sa.sin_port)); + } else { + snprintf(invite, sizeof(invite), "sip:NaVs",p->username, fromdomain); + } + } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { + snprintf(invite, sizeof(invite), "sip:NaVd", fromdomain, ntohs(p->sa.sin_port)); + } else { + snprintf(invite, sizeof(invite), "sip:%s", fromdomain); }
- } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) {
- snprintf(invite, sizeof(invite), "sip:NaVd", p->tohost, ntohs(p->sa.sin_port));
- } else {
- snprintf(invite, sizeof(invite), "sip:%s", p->tohost);
}
strncpy(p->uri, invite, sizeof(p->uri) - 1);
/* If there is a VXML URL append it to the SIP URL */

^

Important


Asterisk users of broadvoice may have noticed a problem with not recieving inbound calls today. It appears that something changed in the way Broadvoice sends their SIP packets, but we have the solution: Just make the following change to your extensions.conf file:

Look for the extensions.conf context for your incoming calls, in our case, its from-broadvoice, and add this line at the end of your context:

exten => YOURPHONENUMBER,1,Goto(from-broadvoice,1,1)

Make sure you change the "from-broadvoice" to the name of your incoming calls context.


See also





Comments

Comments Filter
222

333Need Help with Asterisk-Broadvoice connection

by HHB, Wednesday 20 of September, 2006 [19:01:00 UTC]
Hello,
<br><br>
Sure could use some, help. Am trying to get an Asterisk (standard version - 1.2.8 running on remote server) to
register/connect to a BV World account so I can use the BV account from Asterisk. When testing the config
example, I turn off the BV phone here in the office for at least an hour before I try the Asterisk
registration/connection.
<br><br>
Am trying the configuration from broadvoice (http://www.broadvoice.com/support_install_asterisk.html):
<br><br>

sip.conf:<br>

Under general I have
<br>
context=default<br><br>

as instructed by bv, I have
<br>
pedantic=no<br><br>

;registration, using the account phone number minus the initial "1"<br>
;registration fails using 1xxxxxxxxxx<p>

register => xxxxxxxxxx@sip.broadvoice.com:password:xxxxxxxxxx@sip.broadvoice.com/33333
<p>
broadvoice peer
<p>

sip.broadvoice.com <br>
type=peer<br>
user=phone<br>
host=sip.broadvoice.com<br>
fromdomain=sip.broadvoice.com<br>
fromuser=xxxxxxxxxx<br>
secret=password<br>
username=xxxxxxxxxx<br>
insecure=very<br>
context=from-broadvoice<br>
authname=xxxxxxxxxx<br>
dtmfmode=inband<br>
dtmf=inband<br>
canreinvite=no<br><br>


In /etc/hosts, IP for dca proxy:<br>

147.135.0.128 sip.broadvoice.com<br><br>


In extensions.conf:<br>

default <br>
exten => _1NXXNXXXXXX, 1, dial(SIP/${EXTEN}@sip.broadvoice.com,30) <br>
exten => _1NXXNXXXXXX, 2, congestion() <br>
exten => _1NXXNXXXXXX, 102, busy()<br>
=================================================================================================<br><br>
Have tried variations on this config found on the web, some from here at voip-info.org. The Asterisk can register with the BV World account if username is phone number without the initial "1" — but any calls attempted end immediately with 404 Not Found.
<br><br>
Have asked BV tech support for help, their reply:
<br><br>
"We have many subscribers using Asterisk with success; however, we have not certified technical support
for Asterisk's many configuration requirements and leave that for the open source community."
<br><br>
Also, am confused about why the BV config example lists in the bv peer data "context=from-broadvoice" yet the bv dialplan is
added to default in extensions.conf.
<br><br>
Could someone who has succeeded in making this work please offer suggestions? This Asterisk can register and use accounts
on both fwd and on my own SER with no problems. Thank you for any help.
<br><br>
HHB
222

333Broadvoice, multiple numbers -- how to tell which one was called

by TaneliOtala, Saturday 26 of August, 2006 [00:20:51 UTC]
I have Broadvoice service, and generally I'm quite pleased with their performance.
I have three phone numbers; one called primary (408 area code), and two others called Alternate (530 and 773 area codes).
I wanted to know which number one was called...
The answer lies in the Alert-info, here is the snippet of code I use to find out the number called.


exten => 408992xxx,n,Set(DN=${SIP_HEADER(Alert-Info)})
; 408
; 530; Alert-Info: <http://127.0.0.1/Bellcore-dr4>
; 773; Alert-Info: <http://127.0.0.1/Bellcore-dr3>
exten => 408992xxxx,n,Set(ac773=${IF($["${DN}" = "<http://127.0.0.1/Bellcore-dr3>"]?"TRUE":"FALSE")})
exten => 408992xxxx,n,Set(ac530=${IF($["${DN}" = "<http://127.0.0.1/Bellcore-dr4>"]?"TRUE":"FALSE")})
exten => 408992xxxx,n,NoOp(Lake Tahoe = ${ac530}, Chicago = ${ac773})


More info on this on my web site: http://pointyhair.com


222

333call quality drops down after 5 min of conversation

by dmitriyivanov, Tuesday 21 of March, 2006 [15:27:19 UTC]
Hi!

Quality of any call drops down after 5-10 minutes of conversation.
Very often calls breaks (no audio or croaking).
Before used vonage- everything was fine, but was unable to connect it to asterisk.
right now use 2 trunks- one via Voipjet and another one via brodvoice- voipjet- no problems,
broadvoice- as described above. Calls to Germany and UK- awful.
Tried to call to BV support- 30 minutes on hold- to much.
Network part is Ok- just for sure. Connection- cable/broadband.

Any suggestions/advice?
Thank you!


just some additional info:

1)Asterisk 1.2.5 built by root @ myhost on a i386 running FreeBSD on 2006-03-13 15:59:53 UTC

sip.conf

general
disallow=all
allow=gsm
allow=ulaw
allow=alaw
allow=g729
maxexpirey=180
defaultexpirey=160
tos=reliability
nat=no
externip=my_external_ip
localnet=192.168.2.0/255.255.255.0
musiconhold = default



register => XXXXXX@sip.broadvoice.com:password:XXXXXXX@sip.broadvoice.com/XXXXXXX


sip.broadvoice.com
user=phone
reinvite=no
canreinvite=no
pedantic=no
type=friend
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=XXXXXX
secret=mypass
username=XXXXXXXXX
insecure=very
context=default
authname=XXXXXXXXXXX
dtfmode=inband
dtmf = inband
;qualify if RTT less than 200 msec
qualify = 200
nat = no
;permit = 147.135.0.0/255.255.0.0
disallow=all
allow=ulaw
Mailbox=5555
language=en

PING sip.broadvoice.com (147.135.32.128): 56 data bytes
64 bytes from 147.135.32.128: icmp_seq=0 ttl=245 time=23.536 ms
64 bytes from 147.135.32.128: icmp_seq=1 ttl=245 time=23.884 ms
64 bytes from 147.135.32.128: icmp_seq=2 ttl=245 time=23.722 ms
64 bytes from 147.135.32.128: icmp_seq=3 ttl=245 time=23.950 ms
64 bytes from 147.135.32.128: icmp_seq=4 ttl=245 time=23.203 ms
64 bytes from 147.135.32.128: icmp_seq=5 ttl=245 time=23.537 ms

Bandwidth test:

Download Speed: 3183 kbps (397.9 KB/sec transfer rate)
Upload Speed: 1826 kbps (228.3 KB/sec transfer rate)


2) router WRT54GC Linksys, portforwarding 10000-20000/UDP, 5060-5063UDP/TCP

UPNP - disabled

3) as additional sip trunk i'm using proxy01.sipphone.com - no problems-
works perfect- from this folows that SIP is Ok.


222

333dtmfmode changes based on # dialed

by edelbrp, Thursday 09 of February, 2006 [21:52:25 UTC]
Our primary # uses inband dtmf just fine (rfc2833 won't work). On the other hand, our alternate # which is an 800 won't work unless it gets set to rfc2833. I had to split out the dial plan for the 800 and set it's dtmfmode:

incoming_calls
exten => 1231231234,1,Gotoif($"${SIP_HEADER(Alert-Info)}" = "<http://127.0.0.1/Bellcore-dr3>"?broadvoice800,s,1)
exten => 1231231234,2,Goto(mainmenu,s,1)
<br />
; dtmfmode 'inband' doesn't work for 800 # for some reason!
broadvoice800
exten => s,1,SIPDtmfMode(rfc2833)
...

I hope this helps others avoid the confusion and wasted time troubleshooting.
222

333Problems dialing out with BV.

by kevin922, Sunday 01 of January, 2006 [21:32:27 UTC]
I'm having problems dialing out with Asterisk@home & BV,

error i get is that the number i have dialed is not in service, excerpt of log shows: i replaced the phone # with "<number>" any ideas?

- Executing SetVar("SIP/200-795e", "OUTNUM=91703<number>") in new stack
   — Executing Cut("SIP/200-795e", "custom=OUT_2|:|1") in new stack
   — Executing GotoIf("SIP/200-795e", "0?16") in new stack
   — Executing Dial("SIP/200-795e", "SIP/BroadVoice/917036522554") in new stack
   — Called BroadVoice/91703<number>    — SIP/BroadVoice-fa76 is ringing
   — SIP/BroadVoice-fa76 answered SIP/200-795e
   — Attempting native bridge of SIP/200-795e and SIP/BroadVoice-fa76
 == Spawn extension (macro-dialout-trunk, s, 14) exited non-zero on 'SIP/200-795e' in macro 'dialout-trunk'
 == Spawn extension (from-internal, 91703<number>, 1) exited non-zero on 'SIP/200-795e'
   — Executing Macro("SIP/200-795e", "hangupcall") in new stack
   — Executing ResetCDR("SIP/200-795e", "w") in new stack
   — Executing NoCDR("SIP/200-795e", "") in new stack
   — Executing Wait("SIP/200-795e", "5") in new stack
 == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/200-795e' in macro 'hangupcall'
 == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/200-795e'

222

333Congestion or busy signal

by LukeSkyNery, Wednesday 19 of October, 2005 [10:19:03 UTC]
I am trying to make asterisk give me a congestion signal or busy or anything else if someone is already using BV. But no I always can call and never get a congestion. Now I am trying using this:

broadvoice
;check for an available channel at BV, and hangup if no
exten => _.,1,ChanIsAvail(SIP/broadvoice1)
exten => _.,2,noop(${AVAILCHAN})
exten => _.,10,dial(SIP/broadvoice1/${EXTEN},40,r)
exten => _.,13,hangup

exten => _.,104,noop('Can't Call on broadvoice to ${EXTEN} No Lines avaliable')
exten => _.,110,Playback(all-outgoing-lines-unavailable)
exten => _.,120,hangup

and the results are:
Executing ChanIsAvail("SIP/510-0c6e", "SIP/broadvoice1") in new stack
   — Executing NoOp("SIP/510-0c6e", "SIP/broadvoice1-c075") in new stack

When I try to use another sip extension to call the results are:
Executing ChanIsAvail("SIP/502-0d3a", "SIP/broadvoice1") in new stack
   — Executing NoOp("SIP/510-0d3a", "SIP/broadvoice1-0b74") in new stack
and the asterisk complete both calls at same time.
My account in Broadvoice only allow me to use one line at a time.

Can someone help me how can I prevent asterisk to use 2 lines of broadvoice at same time?

LukeSkyNery

222

333Re: Failover

by souren, Monday 04 of July, 2005 [13:19:42 UTC]
Yes, use something like this for this to achieve least-cost routing/ failover:

exten => _91NXXNXXXXXX, 1,Dial(SIP/${EXTEN:${TRUNKMSD}}@sip.broadvoice.com,30)
exten => _91NXXNXXXXXX,2,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91NXXNXXXXXX,3,Congestion

222

333Outgoing CallerID problem...

by bjornta, Saturday 05 of March, 2005 [23:56:53 UTC]
After getting Broadvoice working, outgoing CallerID was not working.
Called them 3-4 times about it. The one time they actually responded, the rep. didn't know what I was talking about at first. After explaining it in detail and forcing the rep to look at it, he entered my number in the "Outgoing CallerID" field in their system, but it still didn't work.
Cancelled the whole thing. Customer service is slow, not helpful or knowledgeable.
222

333Authentication change for outbound calls 5 March 05

by glomph, Saturday 05 of March, 2005 [22:33:03 UTC]
(:arrow:) Date: Sat, 5 Mar 2005 12:13:08 -0500 (EST)
From: Dan Weber
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
To: asterisk-users@lists.digium.com
Subject: Asterisk-Users BroadVoice configuration changes for Outbound

Today, We have added INVITE Authentication. This seems to bring a large amount of problems to people in the way
since they can't make outbound calls. Here's what needs to be done. You need to add three variables to your
peers or friends, username, authuser, and secret.

username=
authuser=
secret=

Dan

222

333The device you are using is not registered to place calls on the network.

by mlr263, Tuesday 01 of March, 2005 [21:29:38 UTC]
I have tried every configuration file I could find on the net to get Broadvoice working. I have called Broadvoice and gotten a password twice. Yet I cannot get Asterisk to place a call. I keep getting a recording saying "The device you are using is not registered to place calls on the network. Please contact your administrator for assistance." I am using the latest cvs. Has anyone else had this problem and resolved it?