Broadvoice Configuration - Need help!

Ok. I must be an idiot. I just can’t get Asterisk to work at all. Sometimes my extensions work, sometimes they don’t even connect (right now they don’t seem to want to connect) but even worse, I’ve never had inbound / outbound calls working. Hopefully someone can help. I’ve pasted my sip.conf and extensions.conf for reference. Any help would be fantastic! Feel free to email me at m.moogATthemoog.com as well as posting here. I’d love to get this going!

Some notes: When calling the number from an outside line, I get a “your call can not be completed as dialed 2ii”. Right now, none of tthe softphones will connect and I have no idea why. I notice in one of the configs it mentions a broadvoice trunk… I only see a zap trunk in the system and not matter how many times I delete it it won’t go away. Help!!

sip.conf:

[general]
context=sip.broadvoice.com
pedantic=no
type=user
bindport=5060
bindaddr=0.0.0.0
realm=192.168.100.8
srvlookup=yes
tos=reliability
maxexpiry=180
defaultexpiry=160
musicclass=default
;videosupport=no ;some providers such as broadvoice don’t support this, if enabled no outbound calls will go through
outgoinglimit=2
incominglimit=9999
disallow=all
disallow=gsm
allow=ulaw
allow=alaw
allow=all
;qualify=yes
host=dynamic
nat=yes
canreinvite=no
externip=192.168.100.250
localnet=192.168.100.250/255.255.255.0

register => 4149210030@sip.broadvoice.com:ViTGNFDzgD:4149210030@sip.broadvoice.com
register => 4149210030@sip.broadvoice.com:ViTGNFDzgD:4149210030@sip.broadvoice.com

;Definitions of locally connected SIP phones.

[outbound-broadvoice] ;outbound context
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=4149210030
secret=xxxxx
username=4149210030
insecure=very
context=sip.broadvoice.com
authname=4149210030
dtmfmode=inband
dtmf=inband
canreinvite=no ;Disable canreinvite if you are behind a NAT
nat=yes

[sip.broadvoice.com] ;inbound context
type=user
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=4149210030
secret=xxxxx
username=4149210030
insecure=very
context=sip.broadvoice.com
authname=4149210030
dtmfmode=rfc2833
dtmf=rfc2833
canreinvite=no
nat=yes

extensions.conf

[general]

static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[globals]

include=>inbound
include=>outbound

[sip.broadvoice.com] ;This is going to be your inbound trunk, telling all incoming calls where to go

exten=>14149210030 ,1,Goto(extensions|s|1)
exten=>4149210030 ,1,Goto(extensions|s|1)
exten=>9210030 ,1,Goto(extensions|s|1)

[extensions]
include=>international
exten=>s,1,Dial(SIP/6000)
exten=>s,2,Voicemail,u6000@default
exten=>_XXXX,1,Dial(SIP/${EXTEN},30)
exten=>_XXXX,2,Voicemail,u${EXTEN}@default
exten=>*86,1,VoicemailMain,101 ;To check your voicemail by dialing *86
exten=>9999,1,VoicemailMain,101 ;To check your voicemail by dialing 9999

[international]
exten=>_NXXXXXX,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=>_NXXXXXX,3,congestion()
exten=>_NXXXXXX,102, busy()
exten=>_NXXNXXXXXX,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=>_NXXNXXXXXX,3,congestion()
exten=>_NXXNXXXXXX,102, busy()
exten=>_1NXXNXXXXXX,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=>_1NXXNXXXXXX,3,congestion()
exten=>_1NXXNXXXXXX,102, busy()

; This extended Dial Plan will enable International Dialing on The Unlimited World PLUS Plan
; This dial plan enables World Plus countries
; there are no built in ways to prevent calls to cell phone users (except in germany where Cell ;phone prefix’s are
; carried by 1 and has been accounted for)

exten=_01130.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01131.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01132.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01133.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01134.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011351.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011352.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011353.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011378.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01139.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01141.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011420.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01143.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01144.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01145.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01146.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01147.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01148.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01149[2-9].,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01154.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01155.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01156.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01160.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01161.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01164.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01165.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01181.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01182.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011852.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_01186.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011886.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011972.,1,dial(SIP/${EXTEN}@outbound-broadvoice,30)
exten=_011.,2,congestion() ; No answer, nothing
exten=_011.,102,busy() ; Busy

Ok, first off, you should have broadvoice reset your authentication password, as you accidentally left it in the register lines of your file.

I’m by no means an Asterisk expert (I just started using it about a month ago), but I can tell you a few differences when compaired with my setup.

First, you should only need the register line once (delete one), and mine has my full phone number tagged onto the end (with a one) so for you it would be:

register => 49210030@sip.broadvoice.com:secret:4149210030@sip.broadvoice.com/14149210030

Second, the externip line i beleive is the ip address on the general interenet (the address your router received from your isp). The address you have specified is an address on your house network. I’m not sure, but if you don’t know it you shold probably comment it it out as most voip places will deal with it. (Although I have my router register with a dynamic dns service and look up my address via an externhost line)

Third in my outbound settings the user line is set to my phone number as well. So for you it would be:

user=4149210030

Fourth, the [sip.broadvoice.com] section is named broadvoice-in (I’ve had section names being extremely picky, but this may have been more with iax connections, I don’t remember) but on the chance it is an issue mine is named [broadvoice-in] in the sip.conf file.

Fifth the user line in the [sip.broadvoice.com] or [broadvoice-in] section is phonenumber@sip.broadvoice.com so:

user=4149210030@sip.broadvoice.com

Sixth, you may also want to add the incoming context to the [sip.broadvoice.com] or [broadvoice-in] section:

context=sip.broadvoice.com

Seventh: (Don’t think this is related to not being able to receive calls.) But I got the impression it wasn’t a particularly good idea to have your outgoing (especially toll) in the same context that you’re sending your incoming calls to. (Don’t know if it applies in your situation or not though)

I hope some of this helps. If it still doesn’t work I’d launch an asterisk console and see if anything potentially usefull shows up when you try to call in.

Also make sure all soft phones are registering with your asterisk box and not broadvoice directly. Broadvoice really doesn’t like multiple simultanious connections.

  • Ryan

I read your config files and after I went through what I can see you
are going through maybe I could save you the nutso stuff I went through:)

Lets start with the [general] section in sip.conf. Return the comment
from context=your provider back to context = default. I’ll show you why in a minute ! For bindaddr=??? if you assigned a static IP address to
your Asterisk Box like 192.168.1.130 then set bindaddr= to that address.
If you set it to Dynamic, then leave it at bindaddr=0.0.0.0. If your Asterisk Box is behind a router (NAT) then it might be easier to deal with
the NAT issue with a static IP address for Asterisk. Let me know if you
need to know how to make that change. Next, at the realm=???
return the comment to realm=mydomain.tld as it was before.
A realm=??? comment is useful if you have an assigned domain name
like myhomeip.dyn.dns.com. OK, next on the codecs section
change your codec to read disallow=all, allow=ulaw, allow=alaw, allow=gsm and remove the comment allow=all. This sets the codec in the order of preference which Asterisk will follow and the allow=all will not apply. Further on down in the [generals] section remove qualify=yes.
We will deal with that on down sip.conf later.

Now, in the register section, as rwellman commented, get a new password
from Broadvoice if in your post, that in fact was your password.
Then you need only one register comment like this;
yourusername:password@sip.broadvoice.com and Asterisk will
register with Broadvoice. Broadvoice may have the format in
a different syntax (typograghical format) but try this and I bet Asterisk
will like it!!

Next, re-define your sip.conf inbound and outbound context to one context for both like this:
[broadvoice]
type=friend (friend allows both inbound and outbound calls)
your next comments are ok until you come to context=???
set context to
context=from-broadvoice (show you why in a minute)
remove the authname=414… comment
set DTMF to
dtmfmode=rtf2833 (most widely used )
remove dtmf=inband (no need)
under nat=yes, comment “qualify=yes” (no quotes)
This tells Asterisk to repeat a signal through the NAT so calls come in and out as they should be without having to compromise your security.

Next, completely remove your inbound context. We just took care
of that from the above comments.

Ok, you now need an extension in sip.conf to map to the SIP device
of your choice. If its an X-Lite Soft-Phone (good choice) lets set that up.
Label it an extension number like 4001 or 5001. It is recommended
to use 4 or more numbers in an extension numbering beyond 2…
Like 3001 or above. now it would look something like this:
[4001]
type=friend (we are going to make and recieve calls, thats “friend”)
username=4001
fromuser= your phone number with Broadvoice (to recieve calls)
fromdomain=sip.broadvoice.com (thier IP address)
secret=whatever you want
host=dynamic (this allows X-Lite a dynamic IP, its easier)
nat=yes
insecure=invite,port
disallow=all
allow=ulaw (this sets the order to try to follow)
allow=alaw
allow=gsm
context=broadvoice-out (I will show you why in a minute)

Now lets go to extensions.conf. Under [globals] remove the include=>inbound and include=> outbound comments.
Remove your [sip.broadvoice.com] section in its entirety including
the inbound dial plan ie: exten => 141492…
Next, rename your [extensions] to [from-broadvoice]. Remove your
include => international (I will show you why in a minute).

Now, lets go to [international] and rename it [broadvoice-outbound]
This will direct your outbound calls from the “friend” trunk we
set up in sip.conf. Ok, your outbound dial plan has to be directed to
the [broadvoice] sip.conf trunk we made. Heres an easy way to make this happen. it looks like this:

[broadvoice-outbound]
exten => _1yourPhoneNumber,1,SetCallerID(yournumber)
exten => _1yourPhonenumber,2,Dial(SIP/broadvoice/${EXTEN:1},20,r)
exten => _1yourphonenumber,3,Congestion(5)
exten => _1NXXNXXXXXX,1,SetCallerID(yournumber)
exten => _1NXXNXXXXXX,2,Dial(SIP/broadvoice/${EXTEN:1},20,r)
exten => _1NXXNXXXXXX,3,Congestion(5)
Ok, the rest is the same dial format except when making local or
international calls the _1NXXNXXXXXX changes to a local
call which would be _NXXXXXX and you change the {EXTEN:1} to
{EXTEN} leaving off the :1 so Asterisk won’t ingnore the 1st digit
in the dial plan. International calls would be exten => _000NXXNXXXXXX or
the alike whatever country you are calling.

Now, if you are using X-Lite on you notebook computer or a desktop,
It has to “Login”. Here is where the whole “bindaddr=???” thing becomes important. Any remote Phone device has to have an IP to map to.
X-Lite will ask for that IP. again if you need help with the Asterisk IP
assignment, let me know. I’ll show you. Assuming ther is no problem with IP adress with Asterisk, set up the X-Lite per the Counterpath directions
using the extension “4001” settings we set up earlier. Or better yet,
use the asteriskguru directions (excellent help there too ). Try this
and let me know how you do.

Hope its a help to ya !

Under your [from-broadvoice] section
the exten => s,1,Dial(SIP/6000) would need to be (SIP/4001)
if you choose that “4001” extension number. Sorry, last very inportant
incoming call detail.

Thanks for the help everyone. I thought I had removed all the passwords when I pasted the configuration but I was somewhat bleary eyed when doing it. I’ll work through these sugesstions tonight and see where I end up. It’s probably not the end of my problems but a good start none the less.

-Matt