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:
http://foo.robotics.net/mediawiki-1.3.10/index.php/Asterisk_Setup

Dialplan updated May/18/2012 for Unlimited World Plus
http://cipher.pe/web/nuestra-experiencia/26-broadvoice-unlimited-world-plus-dialplan-actualizado-18-may-2012.html

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


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


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()



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:%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 */


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




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+

Page Changes | Comments

 

Featured -

Search: