Unable to receive inbound calls (SIP/2.0 401 Unauthorized)

I’m trying to connect to a new SIP trunk provider. I’m able to place outbound calls to the provider, but I’m unable to receive calls from the provider. Here’s the debug output when an attempt is made to place an incoming call -

<— SIP read from UDP:10.65.2.7:5060 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.65.2.7:5060;branch=z9hG4bK992dc6e788384a618af749fae9479551.0
Session-Expires: 14400
Via: SIP/2.0/UDP 10.65.2.7:5060;branch=z9hG4bKdb90904adcf6203bfe479178ae680320.whFEDzzXKE-Y2jWRMRsSfQ__
To: sip:[email protected]
From: “Cell Phone AL” sip:[email protected]:5060;tag=1eef3d4b
Call-ID: [email protected]
CSeq: 270458399 INVITE
User-Agent: SIParator/4.9.1
Contact: sip:[email protected]
Supported: timer, replaces
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, NOTIFY, REFER, INFO, UPDATE, PRACK
Allow-Events: message-summary, refer, dialog, line-seize, presence, call-info, as-feature-event
Max-Forwards: 67
Expires: 180
Organization: MetaSwitch
Content-Type: application/sdp
Content-Length: 189
Record-Route: sip:[email protected];lr

v=0
o=localb2bua1 44 2120836552 IN IP4 10.65.2.7
s=-
c=IN IP4 10.65.2.7
t=0 0
m=audio 58066 RTP/AVP 18 0 101
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=silenceSupp:off - - - -

<------------->
— (19 headers 9 lines) —
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Sending to 10.65.2.7 : 5060 (no NAT)
Using INVITE request as basis request - [email protected]
Found peer ‘Earthlink’ for ‘3348196465’ from 10.65.2.7:5060

<— Reliably Transmitting (no NAT) to 10.65.2.7:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.65.2.7:5060;branch=z9hG4bK992dc6e788384a618af749fae9479551.0;received=10.65.2.7
Via: SIP/2.0/UDP 10.65.2.7:5060;branch=z9hG4bKdb90904adcf6203bfe479178ae680320.whFEDzzXKE-Y2jWRMRsSf
Q__
From: “Cell Phone AL” sip:[email protected]:5060;tag=1eef3d4b
To: sip:[email protected];tag=as7b716014
Call-ID: [email protected]
CSeq: 270458399 INVITE
Server: FPBX-2.8.1(1.6.2.11)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="6a159f62"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (
Method: INVITE)

<— SIP read from UDP:10.65.2.7:5060 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.65.2.7:5060;branch=z9hG4bK992dc6e788384a618af749fae9479551.0
From: “Cell Phone AL” sip:[email protected]:5060;tag=1eef3d4b
To: sip:[email protected];tag=as7b716014
Call-ID: [email protected]
CSeq: 270458399 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: ACK

Here is some relevant (I hope) config from sip_additional.conf -

[3343211170]
type=user
context=from-trunk

[Earthlink]
disallow=all
host=10.65.2.7
type=friend
insecure=port,invite
dtmfmode=rfc2833
allow=ulaw
context=from-trunk-sip-Earthlink

Does anyone have any ideas on things to try?

Thanks!

  • Paul

I am switching over to earthlink and wondered if you had the sip trunk information correct so I could get a head start before they come. Can you help?

No, this was never resolved. I’d love to be able to get this to work. If you have any success, I’d appreciate hearing about it.

  • Paul

In your SIP Trunk try these settings

host=10.65.2.7
type=friend
insecure=port,invite
dissallow=all
allow=ulaw
context=from-trunk