Weird ringback problem on incoming calls

For some reason inbound calls do not here any ringback tone. It just sits there in silence. When the call is picked up both sides can hear eachother. Also, if I set the “Asterisk Dial command options:” to tm to play music instead of the ringback it works most of the time. I say most of the time because sometimes it will just sit there in silence. I have no idea what this is and have searched everywhere humanly possible.

Let me know any information you might need to know. Thanks!

Kernel Version 2.6.18-164.11.1.el5 (SMP)
Distro Name CentOS release 5.5 (Final)
Trixbox Version 2.8.03
Polycom sip.cfg Revision: 1.558.2.3.2.19

If this is a SIP call, it sounds like a carrier issue. Do a sip debug from the CLI and look at what the carrier is doing when the call goes out. You should not see “answered” until the other end picks up.

Thanks for the sip debug command. Wow, this is a lot of information. Not sure how to read it all, but this is what happens when I place a sip call to one of the extensions (I do not see answered):

— (14 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
voice-nkr*CLI>
<— SIP read from UDP://10.128.16.2:5060 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122
Max-Forwards: 70
From: sip:[email protected];tag=1c234557063
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]
Supported: em,100rel,timer,replaces,path,resource-priority
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
User-Agent: Audiocodes-Sip-Gateway-Mediant 1000/v.5.00A.024
Content-Type: application/sdp
Content-Length: 285

v=0
o=AudiocodesGW 234533643 234533372 IN IP4 10.128.16.2
s=Phone-Call
c=IN IP4 10.128.16.2
t=0 0
m=audio 6460 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
a=rtcp:6461 IN IP4 10.128.16.2

<------------->
— (13 headers 13 lines) —
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
Sending to 10.128.16.2 : 5060 (no NAT)
Using INVITE request as basis request - [email protected]
No user ‘xxxxxxxxxx’ in SIP users list
Found peer ‘Mediant’ for ‘xxxxxxxxxx’ from 10.128.16.2:5060
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x4 (ulaw), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.128.16.2:6460
Looking for 1133 in from-trunk (domain voice.domain.com)
list_route: hop: sip:[email protected]
voice-nkr*CLI>
<— Transmitting (no NAT) to 10.128.16.2:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122;received=10.128.16.2
From: sip:[email protected];tag=1c234557063
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 1 INVITE
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]
Content-Length: 0

<------------>
– Executing [[email protected]:1] Macro(“SIP/Mediant-00000277”, “exten-vm,novm,1133”) in new stack
– Executing [[email protected]:1] Macro(“SIP/Mediant-00000277”, “user-callerid”) in new stack
– Executing [[email protected]:1] Set(“SIP/Mediant-00000277”, “AMPUSER=xxxxxxxxxx”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/Mediant-00000277”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/Mediant-00000277”, “1?Set(REALCALLERIDNUM=xxxxxxxxxx)”) in new stack
– Executing [[email protected]:4] Set(“SIP/Mediant-00000277”, “AMPUSER=”) in new stack
– Executing [[email protected]:5] Set(“SIP/Mediant-00000277”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/Mediant-00000277”, “1?report”) in new stack
– Goto (macro-user-callerid,s,10)
– Executing [[email protected]:10] GotoIf(“SIP/Mediant-00000277”, “0?continue”) in new stack
– Executing [[email protected]:11] Set(“SIP/Mediant-00000277”, “__TTL=64”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/Mediant-00000277”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [[email protected]:19] NoOp(“SIP/Mediant-00000277”, “Using CallerID “” “) in new stack
– Executing [[email protected]:2] Set(“SIP/Mediant-00000277”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“SIP/Mediant-00000277”, “VMBOX=novm”) in new stack
– Executing [[email protected]:4] Set(“SIP/Mediant-00000277”, “EXTTOCALL=1133”) in new stack
– Executing [[email protected]:5] Set(“SIP/Mediant-00000277”, “CFUEXT=”) in new stack
– Executing [[email protected]:6] Set(“SIP/Mediant-00000277”, “CFBEXT=”) in new stack
– Executing [[email protected]:7] Set(“SIP/Mediant-00000277”, “RT=”””) in new stack
– Executing [[email protected]:8] Macro(“SIP/Mediant-00000277”, “record-enable,1133,IN”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/Mediant-00000277”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“SIP/Mediant-00000277”, “recordingcheck,20100729-140723,1280426843.927”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100729-140723,1280426843.927: Inbound recording not enabled
– <SIP/Mediant-00000277>AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] MacroExit(“SIP/Mediant-00000277”, “”) in new stack
– Executing [[email protected]:9] Macro(“SIP/Mediant-00000277”, “dial,”",tr,1133") in new stack
– Executing [[email protected]:1] GotoIf(“SIP/Mediant-00000277”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [[email protected]:3] AGI(“SIP/Mediant-00000277”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is ‘unknown’ number is ‘xxxxxxxxxx’
> dialparties.agi: USE_CONFIRMATION: ‘FALSE’
> dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 1133 to extension map
– dialparties.agi: Extension 1133 cf is disabled
– dialparties.agi: Extension 1133 do not disturb is disabled
> dialparties.agi: extnum 1133 has: cw: 1; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
– dialparties.agi: dbset CALLTRACE/1133 to xxxxxxxxxx
– dialparties.agi: Filtered ARG3: 1133
– <SIP/Mediant-00000277>AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:7] Dial(“SIP/Mediant-00000277”, “SIP/1133,”",tr") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
Audio is at 10.130.16.34 port 16064
Video is at 10.130.16.34 port 18228
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding video codec 0x80000 (h263) to SDP
Adding video codec 0x200000 (h264) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.130.17.246:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
Max-Forwards: 70
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: sip:[email protected]:5060
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Date: Thu, 29 Jul 2010 18:07:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 396

v=0
o=root 2067755205 2067755205 IN IP4 10.130.16.34
s=Asterisk PBX 1.6.0.22-samy-r60
c=IN IP4 10.130.16.34
b=CT:384
t=0 0
m=audio 16064 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
m=video 18228 RTP/AVP 34 99
a=rtpmap:34 H263/90000
a=rtpmap:99 H264/90000
a=sendrecv


-- Called 1133

voice-nkr*CLI>
<— Transmitting (no NAT) to 10.128.16.2:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122;received=10.128.16.2
From: sip:[email protected];tag=1c234557063
To: sip:[email protected];tag=as6cb057a1
Call-ID: [email protected]
CSeq: 1 INVITE
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]
Content-Length: 0

<------------>
voice-nkr*CLI>
<— SIP read from UDP://10.130.17.246:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: “PBX Room” sip:[email protected]:5060;tag=BED10064-24EE9DBD
CSeq: 102 INVITE
Call-ID: [email protected]
Contact: sip:[email protected]:5060
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.2.3.1734
Accept-Language: en
Content-Length: 0

<------------->
— (10 headers 0 lines) —
voice-nkr*CLI>
<— SIP read from UDP://10.130.17.246:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: “PBX Room” sip:[email protected]:5060;tag=BED10064-24EE9DBD
CSeq: 102 INVITE
Call-ID: [email protected]
Contact: sip:[email protected]:5060
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.2.3.1734
Allow-Events: talk,hold,conference
Accept-Language: en
Content-Length: 0

<------------->
— (11 headers 0 lines) —
– SIP/1133-00000278 is ringing
voice-nkr*CLI>
<— Transmitting (no NAT) to 10.128.16.2:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122;received=10.128.16.2
From: sip:[email protected];tag=1c234557063
To: sip:[email protected];tag=as6cb057a1
Call-ID: [email protected]
CSeq: 1 INVITE
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]
Content-Length: 0

<------------>
voice-nkr*CLI>
<— SIP read from UDP://10.128.16.2:5060 —>
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122
Max-Forwards: 70
From: sip:[email protected];tag=1c234557063
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 1 CANCEL
Supported: em,timer,replaces,path,resource-priority
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
User-Agent: Audiocodes-Sip-Gateway-Mediant 1000/v.5.00A.024
Reason: Q.850 ;cause=16
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Sending to 10.128.16.2 : 5060 (no NAT)

<— Reliably Transmitting (no NAT) to 10.128.16.2:5060 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122;received=10.128.16.2
From: sip:[email protected];tag=1c234557063
To: sip:[email protected];tag=as6cb057a1
Call-ID: [email protected]
CSeq: 1 INVITE
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
voice-nkr*CLI>
<— Transmitting (no NAT) to 10.128.16.2:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122;received=10.128.16.2
From: sip:[email protected];tag=1c234557063
To: sip:[email protected];tag=as6cb057a1
Call-ID: [email protected]
CSeq: 1 CANCEL
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘[email protected]’ in 6400 ms (Method: INVITE)
Reliably Transmitting (NAT) to 10.130.17.246:5060:
CANCEL sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
Max-Forwards: 70
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: sip:[email protected]:5060
Call-ID: [email protected]
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Content-Length: 0


Scheduling destruction of SIP dialog ‘[email protected]’ in 6400 ms (Method: INVITE)
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/Mediant-00000277’ in macro ‘dial’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘SIP/Mediant-00000277’ in macro ‘exten-vm’
== Spawn extension (from-trunk, 1133, 1) exited non-zero on ‘SIP/Mediant-00000277’
– Executing [[email protected]:1] Hangup(“SIP/Mediant-00000277”, “”) in new stack
== Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/Mediant-00000277’
voice-nkr*CLI>
<— SIP read from UDP://10.130.17.246:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: “PBX Room” sip:[email protected]:5060;tag=BED10064-24EE9DBD
CSeq: 102 CANCEL
Call-ID: [email protected]
Contact: sip:[email protected]:5060
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.2.3.1734
Accept-Language: en
Content-Length: 0

<------------->
— (10 headers 0 lines) —
voice-nkr*CLI>
<— SIP read from UDP://10.130.17.246:5060 —>
SIP/2.0 487 Request Cancelled
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: “PBX Room” sip:[email protected]:5060;tag=BED10064-24EE9DBD
CSeq: 102 INVITE
Call-ID: [email protected]
Contact: sip:[email protected]:5060
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.2.3.1734
Accept-Language: en
Content-Length: 0

<------------->
– (10 headers 0 lines) —
Transmitting (NAT) to 10.130.17.246:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.130.16.34:5060;branch=z9hG4bK7b8d12be;rport
Max-Forwards: 70
From: “xxxxxxxxxx” sip:[email protected];tag=as40fea515
To: sip:[email protected]:5060;tag=BED10064-24EE9DBD
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.22-samy-r60
Content-Length: 0


Really destroying SIP dialog ‘[email protected]’ Method: INVITE
voice-nkr*CLI>
<— SIP read from UDP://10.128.16.2:5060 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.128.16.2;branch=z9hG4bKac234565122
Max-Forwards: 70
From: sip:[email protected];tag=1c234557063
To: sip:[email protected];tag=as6cb057a1
Call-ID: [email protected]
CSeq: 1 ACK
Contact: sip:[email protected]
Supported: em,timer,replaces,path,resource-priority
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
User-Agent: Audiocodes-Sip-Gateway-Mediant 1000/v.5.00A.024
Content-Length: 0

I fixed my problem by using progressinband=yes on the sip trunk.

This tells asterisk to send call progress tones inband or via audio from the SIP device itself