Asterisk settings Broadvoice

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:

Dialplan updated May/18/2012 for Unlimited World Plus

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, 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.

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: (Don't miss any instruction when you will configure your Asterisk)


Modify /etc/hosts file:

=>Finding the right proxy
Ping the following hosts and select for the best time:

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:


Insert the IP appropriately



pedantic=no (Version of asterisk 0.9.0 default is pedantic=no)
register =>

type = peer
host =
secret = PASSWORD
user=phone ; I needed this to make it work
fromuser = PHONENUMBER
fromdomain =
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



;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},30)
exten => _1NXXNXXXXXX,2,congestion()
exten => _1NXXNXXXXXX,102,busy()

_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 (slow), or calling them at the support number listed on
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><auth_password>:<auth_id>

;Calls both incoming and outgoing use this definition, so friend
;Also can be, but not all accounts work with each proxy
;auth_id, which is not necessarily your phone_number
;auth_password, assigned by BV
;this is always
;phone_number, which is not necessarily your auth_id
;must set this for calls from BV to *
;the context to dump any incoming calls into
;BV claims rfc2833 support, but this is needed anyways
;Disable canreinvite if you are behind a NAT
;If you're crossing a NAT, qualify will keep the link open


      • 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 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:%s@%s:%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 fromdomain[256];
+ if (!ast_strlen_zero(p->fromdomain)) {
+ strncpy(fromdomain, p->fromdomain, sizeof(fromdomain) -1);
} else {
- snprintf(invite, sizeof(invite), "sip:%s@%s",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:%s@%s:%d",p->username, fromdomain, ntohs(p->sa.sin_port));
+ } else {
+ snprintf(invite, sizeof(invite), "sip:%s@%s",p->username, fromdomain);
+ }
+ } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) {
+ snprintf(invite, sizeof(invite), "sip:%s:%d", 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:%s:%d", 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 */


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

Created by: jjhall, Last modification: Fri 08 of Jun, 2012 (23:06 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+