I am trying to connect an SPA8000 via it’s Trunking feature to my FreePBX system and I am presented with 403 Forbidden and “Wrong Password” entries in the logs. If anyone has had any experience with this that can shed some light, that would be great. I think my problem is in the trunk config (listed below) but here’s details that I’ve gathered.
System: FreePBX 12.0.38 / Asterisk 13.1
Here is the SPA8000 trying to register. It’s challenged, it replies to the challenge and then the 403 is given.
U spa8000.wan.ip:5080 -> freepbx.wan.ip:5060
REGISTER sip:sip.domain.com SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.145:5080;branch=z9hG4bK-f34d1c5d.
From: <sip:[email protected]>;tag=8316069b39dc0286o2.
To: <sip:[email protected]>.
Call-ID: [email protected].
CSeq: 30343 REGISTER.
Max-Forwards: 70.
Contact: <sip:[email protected]:5080>;expires=3600.
User-Agent: Linksys/SPA8000-6.1.12.
Allow-Events: talk, hold, conference.
Content-Length: 0.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: x-sipura, replaces.
U 2freepbx.wan.ip:5060 -> spa8000.wan.ip:5080
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.1.145:5080;branch=z9hG4bK-f34d1c5d;received=174.137.79.28;rport=5080.
From: <sip:[email protected]>;tag=8316069b39dc0286o2.
To: <sip:[email protected]>;tag=as20159fef.
Call-ID: [email protected].
CSeq: 30343 REGISTER.
Server: FPBX-12.0.38(13.1.0).
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer.
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3a24587a".
Content-Length: 0.
U spa8000.wan.ip:5080 -> freepbx.wan.ip:5060
REGISTER sip:sip.domain.com SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.145:5080;branch=z9hG4bK-56c1dba6.
From: <sip:[email protected]>;tag=8316069b39dc0286o2.
To: <sip:[email protected]>.
Call-ID: [email protected].
CSeq: 30344 REGISTER.
Max-Forwards: 70.
Authorization: Digest username="username",realm="asterisk",nonce="3a24587a",uri="sip:sip.domain.com",algorithm=MD5,response="0cbff8c413d4c0a535bef0dff1aa5c98".
Contact: <sip:[email protected]:5080>;expires=3600.
User-Agent: Linksys/SPA8000-6.1.12.
Allow-Events: talk, hold, conference.
Content-Length: 0.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: x-sipura, replaces.
U freepbx.wan.ip:5060 -> spa8000.wan.ip:5080
SIP/2.0 403 Forbidden.
Via: SIP/2.0/UDP 192.168.1.145:5080;branch=z9hG4bK-56c1dba6;received=174.137.79.28;rport=5080.
From: <sip:[email protected]>;tag=8316069b39dc0286o2.
To: <sip:[email protected]>;tag=as20159fef.
Call-ID: [email protected].
CSeq: 30344 REGISTER.
Server: FPBX-12.0.38(13.1.0).
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer.
Content-Length: 0.
.
And when I look in my Asterisk logs I see this:
[2015-02-26 11:00:46] NOTICE[1342] chan_sip.c: Registration from '<sip:[email protected]>' failed for 'spa8000.wan.ip:5080' - Wrong password
Here is the Trunk config, this is where I think I am having the problem:
host=dynamic
username=username
secret=password
type=peer
dtmfmode=RFC2833
context=from-trunk
canreinvite=yes
nat=yes
qualify=yes
disallow=all
allow=ulaw&alaw