Inbound calls on SIP trunk work, outbound calls do not

Hi everyone.

We have a working SIP trunk between two Asterisk PBXes that we own. Our hosted PBX handles over a thousand other clients, and incoming and outgoing calls are working fine there.

But suddenly yesterday afternoon after we had an ADSL outage at our office, our outbound calls ceased to work. There was no further intervention on my part, and the configuration hasn’t changed. We’ve checked to make sure that no other ATAs or SIP clients are connecting from our IP address by doing asterisk -rx 'sip show peers' |grep officeIP at the hosted PBX.

When I execute sip show peer <office> in the Asterisk console on our hosted PBX, it shows the status as OK with 9ms of lag. When I execute sip show peer <hostedpbx> in the Asterisk console in the office, it shows the status as “UNAVAILABLE”. When I try to connect to the hosted PBX from the office with Nmap on UDP port 5060, it shows the port as open.

The following is the SIP debug output from an outbound call from our office:

ldinfo*CLI>
[Dec 11 08:45:32] Reliably Transmitting (NAT) to :5060:
OPTIONS sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK05525fd3;rport
Max-Forwards: 70
From: “asterisk” <sip:asterisk@>;tag=as0a964f47
To: <sip:>
Contact: <sip:asterisk@:5060>
Call-ID: 554a34b76478dcce2e3107f92e3e8d16@:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Date: Thu, 11 Dec 2014 16:45:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


ldinfoCLI>
ldinfo
CLI>
[Dec 11 08:45:32] == Using SIP RTP CoS mark 5
[Dec 11 08:45:32] – Executing [6045551234@lightspeedout:1] NoOp(“SIP/TechDesk3-0000023a”, "“Dialled extension: 6045551234”) in new stack
[Dec 11 08:45:32] – Executing [6045551234@lightspeedout:2] Dial(“SIP/TechDesk3-0000023a”, “SIP/dolphintel/6045551234,HR”) in new stack
[Dec 11 08:45:32] WARNING[4993]: app_dial.c:2274 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
[Dec 11 08:45:32] == Everyone is busy/congested at this time (1:0/0/1)
[Dec 11 08:45:32] – Auto fallthrough, channel ‘SIP/TechDesk3-0000023a’ status is ‘CHANUNAVAIL’
[Dec 11 08:45:32] – Executing [h@lightspeedout:1] NoOp(“SIP/TechDesk3-0000023a”, "“Hangup requested. Hangup cause: 20”) in new stack
[Dec 11 08:45:32] – Executing [h@lightspeedout:2] Macro(“SIP/TechDesk3-0000023a”, “handle-hangup,hc-20”) in new stack
[Dec 11 08:45:32] – Executing [s@macro-handle-hangup:1] NoOp(“SIP/TechDesk3-0000023a”, “HANGUPCAUSE is 20 and DIALSTATUS is CHANUNAVAIL”) in new stack
[Dec 11 08:45:32] – Executing [s@macro-handle-hangup:2] GotoIf(“SIP/TechDesk3-0000023a”, “0?s,nohc”) in new stack
[Dec 11 08:45:32] – Executing [s@macro-handle-hangup:3] Goto(“SIP/TechDesk3-0000023a”, “hc-20,1”) in new stack
[Dec 11 08:45:32] – Goto (macro-handle-hangup,hc-20,1)
ldinfoCLI>
ldinfo
CLI>
ldinfo*CLI>
[Dec 11 08:45:33] Retransmitting #1 (NAT) to :5060:
OPTIONS sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK05525fd3;rport
Max-Forwards: 70
From: “asterisk” <sip:asterisk@>;tag=as0a964f47
To: <sip:>
Contact: <sip:asterisk@:5060>
Call-ID: 554a34b76478dcce2e3107f92e3e8d16@:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Date: Thu, 11 Dec 2014 16:45:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


ldinfo*CLI>
[Dec 11 08:45:34] Retransmitting #2 (NAT) to :5060:
OPTIONS sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK05525fd3;rport
Max-Forwards: 70
From: “asterisk” <sip:asterisk@>;tag=as0a964f47
To: <sip:>
Contact: <sip:asterisk@:5060>
Call-ID: 554a34b76478dcce2e3107f92e3e8d16@:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Date: Thu, 11 Dec 2014 16:45:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


ldinfoCLI>
ldinfo
CLI>
[Dec 11 08:45:35] Retransmitting #3 (NAT) to :5060:
OPTIONS sip: SIP/2.0
Via: SIP/2.0/UDP :5060;branch=z9hG4bK05525fd3;rport
Max-Forwards: 70
From: “asterisk” <sip:asterisk@>;tag=as0a964f47
To: <sip:>
Contact: <sip:asterisk@:5060>
Call-ID: 554a34b76478dcce2e3107f92e3e8d16@:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
Date: Thu, 11 Dec 2014 16:45:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


ldinfo*CLI>

I’m out of ideas, and we need this to work ASAP.