Present Location: News >> Blog >> BroadVoice and Asterisk

Blog

> BroadVoice and Asterisk
Posted by prox, from Charlotte, on February 12, 2010 at 22:11 local (server) time

I've been using Asterisk with BroadVoice for a little over six months, now.  Other than occasional network latency, I've been happy with the setup.

However, sometime in the last few weeks, incoming calls stopped working.  I don't rely on inbound calling too much, so it took me awhile to notice it was broken.  Outgoing calls worked just fine, but inbound calls went straight to BV voicemail.  Here's what the SIP traffic looked like:

< INVITE sip:xxxxxxxxxx@10.3.5.1:5060 SIP/2.0
< Call-ID: 97037a-97@147.135.0.128
< CSeq: 1 INVITE
< From: "Unavailable"<sip:147.135.0.128>;tag=479b
< To: "Mark Kamichoff"<sip:s@10.3.5.1>
< Via: SIP/2.0/UDP 147.135.0.128:5060;branch=z9hG4bK-BroadWorks.192.168.0.3-192.168.0.128V5060-0-470344215-1909890038-1265808557101-
< Contact: <sip:147.135.0.128:5060>
< Supported: 100rel
< Max-Forwards: 69
< Content-Length:  309
< Content-Type: application/sdp
<
< v=0
< o=2475098871 10 10 IN IP4 147.135.2.247
< s=-
< c=IN IP4 147.135.2.248
< t=0 0
< m=audio 21338 RTP/AVP 0 8 18 96 97 101
< a=rtpmap:0 PCMU/8000
< a=rtpmap:8 PCMA/8000
< a=rtpmap:18 G729/8000
< a=fmtp:18 annexb=no
< a=rtpmap:96 iLBC/8000
< a=fmtp:96 mode=30
< a=rtpmap:97 t38/8000
< a=rtpmap:101 telephone-event/8000

> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 147.135.0.128:5060;branch=z9hG4bK-BroadWorks.192.168.0.3-192.168.0.128V5060-0-470344215-1909890038-1265808557101-;received=147.135.0.128
> From: "Unavailable"<sip:147.135.0.128>;tag=479b
> To: "Mark Kamichoff"<sip:s@10.3.5.1>;tag=as4c6fddbc
> Call-ID: 97037a-97@147.135.0.128
> CSeq: 1 INVITE
> Server: Asterisk PBX 1.6.2.0~rc7-1
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces, timer
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="758e4a53"
> Content-Length: 0

< ACK sip:xxxxxxxxxx@10.3.5.1:5060 SIP/2.0
< Call-ID: 97037a-97@147.135.0.128
< CSeq: 1 ACK
< From: "Unavailable"<sip:147.135.0.128>;tag=479b
< To: "Mark Kamichoff"<sip:s@10.3.5.1>;tag=as4c6fddbc
< Via: SIP/2.0/UDP 147.135.0.128:5060;branch=z9hG4bK-BroadWorks.192.168.0.3-192.168.0.128V5060-0-470344215-1909890038-1265808557101-
< Max-Forwards: 70
< Content-Length:    0

BV was sending Asterisk an invite, Asterisk was challenging it (expecting a secret), but BV was giving up.

I found this thread back from 2008, which described a similar problem that ultimately was blamed on BV.  However, I'm using Asterisk 1.6 (1.6.2.0-1), not 1.4, so I figured it wasn't really relevant.

Upon closer inspection, it appeared that the insecure option I was using was deprecated:

[Feb 11 11:39:22] WARNING[18106]: chan_sip.c:23160 set_insecure_flags: Unknown insecure mode 'very' on line 1139

I changed that to insecure=port, but that didn't fix the problem, either.  Apparently insecure=very is the equivalent of insecure=port,invite, meaning Asterisk won't try to authenticate incoming calls (invites).

This ended up working, and I have the following as my SIP peer for BV, now:

[sip.broadvoice.com]
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=xxxxxxxxxx
secret=yyyyyyyyyy
username=xxxxxxxxxx
insecure=port,invite
context=external
authname=xxxxxxxxxx
dtmfmode=inband
dtmf=inband
canreinvite=no

I guess it was due to an upgrade I did awhile back.  Note to self: check Asterisk after doing dist-upgrades.

> Add Comment

New comments are currently disabled for this entry.