Hi devs,
We see an issue on two installations of Sail (both ver. 3.1.0-128, asterisk 1.8.5.0). It is a very simple setup, and I have simplified it even more to get to the bottom of the issue. So here is the scenario:
We have a Cisco SPA3102 hooked up to the SAIL server to connect a landline to the system. It all works, can receive calls, make outgoing calls.
Now, the following problem happens:
I call an outgoing number, say a mobile number. The call goes out on the SPA, and is up and running. Now I dial a landline number which is routed to the SPA as well. As expected, the SPA reports that it is busy. NOw something weird happens after we hang up the second call. The asterisk sends an invite to itself via the SPA, and out of the blue we get an inbound call from the SPA.
In some cases this causes the original call (call to the mobile number) to drop, sometimes it leads to conference calls which were not intended, or it goes to voicemail or all sorts of trouble.
Even though it looks like this is coming from the SPA, I think it is triggered from asterisk... but why? Where does the INVITE come from, ie, why does asterisk send it?
Relevant bit in the trace is this (192.168.30.1 is the asterisk server, 192.168.30.10 is the SPA) Also made a few comments in the trace below in regards to the numbers:
== Using SIP RTP CoS mark 5
-- Executing [04xxxxxxxx@internal:1] AGI("SIP/3040-0000008c", "sarkhpe,OutCos,04xxxxxxxx") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- <SIP/3040-0000008c>AGI Script sarkhpe completed, returning 0
-- Executing [04xxxxxxxx@3040opencos:1] AGI("SIP/3040-0000008c", "sarkhpe,OutCluster,04xxxxxxxx") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- AGI Script Executing Application: (Set) Options: (CDR(accountcode)=default)
-- <SIP/3040-0000008c>AGI Script sarkhpe completed, returning 0
-- Executing [04xxxxxxxx@qrxvtmny:1] AGI("SIP/3040-0000008c", "sarkhpe,OutRoute,Optus") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- AGI Script Executing Application: (Set) Options: (TIMEOUT(absolute)=14400)
Channel will hangup at 2013-05-16 21:05:02.869 EST.
-- AGI Script Executing Application: (Dial) Options: (SIP/04xxxxxxxx@peer5030,,T)
== Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x800000000000 (testlaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.30.10:5060:
INVITE sip:04xxxxxxxx@192.168.30.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.30.1:5060;branch=z9hG4bK6eb49bc4
Max-Forwards: 70
From: "3040" <sip:3040@192.168.30.1>;tag=as4e36ee05
To: <sip:04xxxxxxxx@192.168.30.10>
Contact: <sip:3040@192.168.30.1:5060>
Call-ID: 0c44236058a27487433b2c6d5543b06c@192.168.30.1:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.5.0
Date: Thu, 16 May 2013 07:05:02 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 281
v=0
o=root 495148320 495148320 IN IP4 192.168.30.1
s=Asterisk PBX 1.8.5.0
c=IN IP4 192.168.30.1
t=0 0
m=audio 13486 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
---
-- Called SIP/04xxxxxxxx@peer5030
<--- SIP read from UDP:192.168.30.10:5060 --->
SIP/2.0 100 Trying
To: <sip:04xxxxxxxx@192.168.30.10>
From: "3040" <sip:3040@192.168.30.1>;tag=as4e36ee05
Call-ID: 0c44236058a27487433b2c6d5543b06c@192.168.30.1:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.30.1:5060;branch=z9hG4bK6eb49bc4
Server: Linksys/SPA3102-5.2.13(GW002)
Content-Length: 0
<------------->
CALL UP to mobile (04xxxxx)
NOW call to another landline number (07xxxxx):
== Using SIP RTP CoS mark 5
-- Executing [07xxxxxxxx@internal:1] AGI("SIP/3037-0000008f", "sarkhpe,OutCos,07xxxxxxxx") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- <SIP/3037-0000008f>AGI Script sarkhpe completed, returning 0
-- Executing [07xxxxxxxx@3037opencos:1] AGI("SIP/3037-0000008f", "sarkhpe,OutCluster,07xxxxxxxx") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- AGI Script Executing Application: (Set) Options: (CDR(accountcode)=default)
-- <SIP/3037-0000008f>AGI Script sarkhpe completed, returning 0
-- Executing [07xxxxxxxx@qrxvtmny:1] AGI("SIP/3037-0000008f", "sarkhpe,OutRoute,Optus") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
-- AGI Script Executing Application: (Set) Options: (TIMEOUT(absolute)=14400)
Channel will hangup at 2013-05-16 21:05:31.504 EST.
-- AGI Script Executing Application: (Dial) Options: (SIP/07xxxxxxxx@peer5030,,T)
== Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x800000000000 (testlaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.30.10:5060:
INVITE sip:07xxxxxxxx@192.168.30.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.30.1:5060;branch=z9hG4bK3226d026
Max-Forwards: 70
From: "3037" <sip:3037@192.168.30.1>;tag=as25a91317
To: <sip:07xxxxxxxx@192.168.30.10>
Contact: <sip:3037@192.168.30.1:5060>
Call-ID: 46263ad356467d35704b278051aebe39@192.168.30.1:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.5.0
Date: Thu, 16 May 2013 07:05:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 283
This ends up as busy:
-- SIP/peer5030-00000090 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- AGI Script Executing Application: (Playback) Options: (beep)
Really destroying SIP dialog '46263ad356467d35704b278051aebe39@192.168.30.1:5060' Method: INVITE
-- <SIP/3037-0000008f> Playing 'beep.gsm' (language 'en-gb')
-- AGI Script Executing Application: (Playtones) Options: (congestion)
-- AGI Script Executing Application: (Congestion) Options: ()
-- <SIP/3037-0000008f>AGI Script sarkhpe completed, returning 4
== Spawn extension (qrxvtmny, 07xxxxxxxx, 1) exited non-zero on 'SIP/3037-0000008f'
-- Executing [h@qrxvtmny:1] Hangup("SIP/3037-0000008f", "") in new stack
Continued in next post