SIPcalls getting disconnected

Hi,

 we have configured a sip with our provider, wherein calls will land our server on ip based authentication. we are facing issue while sip call getting disconnected, once reaches at Background application in dialplan.
 
 asterisk version - 1.6.0.6
 asterisk addons - 1.6.0.2 
 Sip Configuration settings as below.

 [general]
 context=default
 bindport=5060
 bindaddr=xx.xx.xx.xx
 srvlookup=yes
 pedantic=no
 qualify=yes
 directrtpsetup=yes
 rtcachefriends=yes
 tcpenable=yes
 allowguest=yes
 callcounter=yes
 allowexternalinvites=yes
 disallow=all
 allow=all
 useragent=xxxxx
 sdpsession=yyyyy
 dtmfmode=rfc2833
 recordhistory=yes
 dumphistory=yes
 externip=xx.xx.xx.xx
 localnet=xx.xx.xx.xx/255.255.255.0
 nat=no

  Please help us to resolve this.

Regards,
Radha Krishnan

Hard to help you without getting proper details.
Provide Asterisk CLI output when call gets disconnected.

–Satish Barot
satish4asterisk@gmail.com

You are using an obsolete version of Asterisk (and not even the latest subversion of that). You also haven’t provided any debugging information.

There is no standard dialplan with Asterisk, so I have no idea what precedes your call to Background.

The most common causes of dropped connections in Asterisk 1.6 (broken peer re-invite implementations) only applies after the call has been connected through.

I believe directrtpsetup is buggy in that verion, but should only apply to the outgoing side.

Hi All,

    Please find the sip debugging output as below. 

     Currently we're using asterisk-11.6.0.

<— SIP read from UDP:10.140.0.2:5068 —>
INVITE sip:35183@10.152.41.4;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bKb395d352754c934cb888ae60e;rport;X-DispCookie=1001;X-DptMsg=1403
Route: sip:10.152.41.4:5060;transport=udp;lr
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone
CSeq: 1 INVITE
Max-Forwards: 70
Contact: sip:10.140.0.2:5060;user=phone
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER,UPDATE
P-Asserted-Identity: tel:8112661243
Supported: 100rel,timer,histinfo,precondition
Min-SE: 90
Session-Expires: 1800;refresher=uac
P-Early-Media: supported
Content-Length: 409
Content-Type: application/sdp

v=0
o=HuaweiSoftx3000 1166125928 1166125929 IN IP4 10.140.0.2
s=SipCall
c=IN IP4 10.140.1.154
t=0 0
m=audio 41900 RTP/AVP 8 108 102 116
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:102 AMR/8000
a=rtpmap:116 telephone-event/8000
a=ptime:5
a=curr:qos local none
a=curr:qos remote none
a=des:qos mandatory local sendrecv
a=des:qos optional remote sendrecv
a=3gOoBTC

<------------->
— (17 headers 17 lines) —
Sending to 10.140.0.2:5068 (no NAT)
Sending to 10.140.0.2:5068 (no NAT)
Using INVITE request as basis request - 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
No matching peer for ‘8112661243’ from ‘10.140.0.2:5068’
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 108
Found RTP audio format 102
Found RTP audio format 116
Found audio description format PCMA for ID 8
Found unknown media description format AMR for ID 108
Found unknown media description format AMR for ID 102
Found audio description format telephone-event for ID 116
Capabilities: us - (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719|speex32|slin12|slin24|slin32|slin44|slin48|slin96|slin192|silk8|silk12|silk16|silk24), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.140.1.154:41900
Looking for 35183 in default (domain 10.152.41.4)
list_route: hop: sip:10.140.0.2:5060;user=phone

<— Transmitting (no NAT) to 10.140.0.2:5068 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bKb395d352754c934cb888ae60e;X-DispCookie=1001;X-DptMsg=1403;received=10.140.0.2;rport=5068
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
CSeq: 1 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: sip:35183@10.152.41.4:5060
Content-Length: 0

<------------>
– Executing [35183@default:1] Goto(“SIP/10.140.0.2-00000009”, “Test,35183,1”) in new stack
– Goto (Test,35183,1)
– Executing [35183@Test:1] BackGround(“SIP/10.140.0.2-00000009”, “WelcomeInfo”) in new stack
Audio is at 10370
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 10.140.0.2:5068 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bKb395d352754c934cb888ae60e;X-DispCookie=1001;X-DptMsg=1403;received=10.140.0.2;rport=5068
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone;tag=as533dde42
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
CSeq: 1 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: sip:35183@10.152.41.4:5060
Content-Type: application/sdp
Require: timer
Content-Length: 227

v=0
o=root 2037566078 2037566078 IN IP4 10.152.41.4
s=Asterisk PBX
c=IN IP4 10.152.41.4
t=0 0
m=audio 10370 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>

<— SIP read from UDP:10.140.0.2:5068 —>
ACK sip:35183@10.152.41.4:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bKa1d15dfe048a5410148661caa;rport;X-DispCookie=1001;X-DptMsg=1403
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone;tag=as533dde42
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
— (8 headers 0 lines) —
– <SIP/10.140.0.2-00000009> Playing ‘WelcomeInfo.ulaw’ (language ‘en’)
Really destroying SIP dialog ‘c49949b16b16275a61ea85219791b65a@10.18.5.64’ Method: BYE

<— SIP read from UDP:10.141.3.2:5071 —>
OPTIONS sip:10.152.41.4:5060 SIP/2.0
Via: SIP/2.0/UDP 10.141.3.2:5071;branch=z9hG4bKf180c7a193a7f841864101087;X-DptMsg=1406
Call-ID: 122ffdf03bce8dda0db6946638cb834f@10.18.5.64
From: sip:10.141.3.2:5060;tag=b443837c
To: sip:10.152.41.4
CSeq: 1 OPTIONS
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER,PUBLISH
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 10.141.3.2:5071 (no NAT)
Looking for s in default (domain 10.152.41.4)

<— Transmitting (no NAT) to 10.141.3.2:5071 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.141.3.2:5071;branch=z9hG4bKf180c7a193a7f841864101087;X-DptMsg=1406;received=10.141.3.2
From: sip:10.141.3.2:5060;tag=b443837c
To: sip:10.152.41.4;tag=as53a97cc1
Call-ID: 122ffdf03bce8dda0db6946638cb834f@10.18.5.64
CSeq: 1 OPTIONS
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:10.152.41.4:5060
Accept: application/sdp
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘122ffdf03bce8dda0db6946638cb834f@10.18.5.64’ in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog ‘e8d7e9f1f2b658c23f5804cbed62370c@10.18.5.64’ Method: OPTIONS
– Executing [35183@Test:2] BackGround(“SIP/10.140.0.2-00000009”, “demo-abouttotry”) in new stack
– <SIP/10.140.0.2-00000009> Playing ‘demo-abouttotry.gsm’ (language ‘en’)

<— SIP read from UDP:10.140.0.2:5070 —>
OPTIONS sip:10.152.41.4:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.0.2:5070;branch=z9hG4bKb48324e562e92dea906d6882e;X-DptMsg=1405
Call-ID: 7396469135c1917cea60e23fe9aa315e@10.18.5.64
From: sip:10.140.0.2:5060;tag=f82cc28e
To: sip:10.152.41.4
CSeq: 1 OPTIONS
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER,PUBLISH
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 10.140.0.2:5070 (no NAT)
Looking for s in default (domain 10.152.41.4)

<— Transmitting (no NAT) to 10.140.0.2:5070 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.140.0.2:5070;branch=z9hG4bKb48324e562e92dea906d6882e;X-DptMsg=1405;received=10.140.0.2
From: sip:10.140.0.2:5060;tag=f82cc28e
To: sip:10.152.41.4;tag=as32766b09
Call-ID: 7396469135c1917cea60e23fe9aa315e@10.18.5.64
CSeq: 1 OPTIONS
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:10.152.41.4:5060
Accept: application/sdp
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘7396469135c1917cea60e23fe9aa315e@10.18.5.64’ in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog ‘19dad98678f6ab072370f62415cdda46@10.18.5.64’ Method: OPTIONS

<— SIP read from UDP:10.140.0.2:5068 —>
BYE sip:35183@10.152.41.4:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bK0972593a3f31e9fef9a8c8462;X-DispCookie=1001;X-DptMsg=1403
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone;tag=as533dde42
CSeq: 2 BYE
Max-Forwards: 70
Reason: Q.850;cause=31;text="Normal, unspecified"
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 10.140.0.2:5068 (no NAT)
Scheduling destruction of SIP dialog ‘8007b93cdc210ef7ca860df15469bf2e@10.18.5.64’ in 32000 ms (Method: BYE)

<— Transmitting (no NAT) to 10.140.0.2:5068 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.140.0.2:5068;branch=z9hG4bK0972593a3f31e9fef9a8c8462;X-DispCookie=1001;X-DptMsg=1403;received=10.140.0.2
From: "8112661243"sip:8112661243@10.140.0.2;transport=udp;user=phone;tag=2c90201f-CC-1001
To: "35183"sip:35183@10.152.41.4;transport=udp;user=phone;tag=as533dde42
Call-ID: 8007b93cdc210ef7ca860df15469bf2e@10.18.5.64
CSeq: 2 BYE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
== Spawn extension (Test, 35183, 2) exited non-zero on ‘SIP/10.140.0.2-00000009’
– Executing [h@Test:1] NoOp(“SIP/10.140.0.2-00000009”, “h”) in new stack

<— SIP read from UDP:10.141.3.2:5070 —>
OPTIONS sip:10.152.41.4:5060 SIP/2.0
Via: SIP/2.0/UDP 10.141.3.2:5070;branch=z9hG4bKddf20a016f0bbcebc597afd67;X-DptMsg=1405
Call-ID: 5f1955aa224765adb4b3353ddbded076@10.18.5.64
From: sip:10.141.3.2:5060;tag=99dace21
To: sip:10.152.41.4
CSeq: 1 OPTIONS
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER,PUBLISH
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 10.141.3.2:5070 (no NAT)
Looking for s in default (domain 10.152.41.4)

<— Transmitting (no NAT) to 10.141.3.2:5070 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.141.3.2:5070;branch=z9hG4bKddf20a016f0bbcebc597afd67;X-DptMsg=1405;received=10.141.3.2
From: sip:10.141.3.2:5060;tag=99dace21
To: sip:10.152.41.4;tag=as540e07ca
Call-ID: 5f1955aa224765adb4b3353ddbded076@10.18.5.64
CSeq: 1 OPTIONS
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:10.152.41.4:5060
Accept: application/sdp
Content-Length: 0

Please help us to solve this problem.

The call has been cleared by the other party, as a normal call clearing.

Hi,

  We're unable hear the audio for sip incoming calls.

Regards,
Radha Krishnan

One way audio is normally due to NAT or firewall misconfiguration.

In your case, you seem to be using 10.x.x.x addresses for everything, but the remote media address is considerably different from the remote SIP address, so I suspect that there is routablity between the SIP subsystem and Asterisk, but not between the actual media source and Asterisk.

You are getting SIP from :10.140.0.2 but the remote media end point is 10.140.1.154.