Problems with Ring tone

Good morning,

In my company we are having some problems with the Ringing on incoming calls as the client call us and he doesn’t listen the ringing sound.

This only ocurred if I use SIP protocol, if I use IAX works correctly. Capturing traffic during the calls I see that we don’t send Ringing packets.
Also in the dialplan, if I use Answer and Wait the Ringing doesn’t works, however if I use Playback with a silence works perfectly:

;exten => s,n,Answer
;exten => s,n,Wait(2)
exten => s,n,Playback(silence/1)
exten => s,n,Queue(100,rTt)
exten => s,n,Hangup

Regards,

Adrian

Which SIP channel driver are you using?

Why are you answering the A side before the B side answers?

I’d suggest providing the actual console output as well as the SIP trace, if using chan_sip that can be enabled using “sip set debug on” or with chan_pjsip “pjsip set logger on”.

Hi!

First of all, thanks for the reply. Then I show you the console output and the sip debug:

<— SIP read from UDP:XX.XX.XX.XX:5060 —>
INVITE sip:pruebas@X.X.X.X SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK620acc45;rport
Max-Forwards: 70
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X
Contact: sip:XXXXXXXXX@XX.XX.XX.XX:5060
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 102 INVITE
User-Agent: PBX
Date: Thu, 06 Jul 2017 09:09:10 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 310

v=0
o=root 168725088 168725088 IN IP4 XX.XX.XX.XX
s=Asterisk PBX 1.8.28-cert5
c=IN IP4 XX.XX.XX.XX
t=0 0
m=audio 15500 RTP/AVP 18 8 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

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

— (14 headers 14 lines) —
Sending to XX.XX.XX.XX:5060 (NAT)
Using INVITE request as basis request - xxxxxxxxxxxxx@xx.xx.xx
Found peer ‘trunk_000107’ for ‘XXXXXXXXX’ from XX.XX.XX.XX:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 18
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format G729 for ID 18
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 - 0x108 (alaw|g729), peer - audio=0x10c (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x108 (alaw|g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port XX.XX.XX.XX:15500
Looking for pruebas in 000001_inbound_custom (domain X.X.X.X)
list_route: hop: sip:XXXXXXXXX@XX.XX.XX.XX:5060

<— Transmitting (NAT) to XX.XX.XX.XX:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK620acc45;received=XX.XX.XX.XX;rport=5060
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 102 INVITE
Server: Asterisk PBX 1.8.15-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:pruebas@X.X.X.X:5060
Content-Length: 0

<------------>
– Executing [pruebas@000001_inbound_custom:1] NoOp(“SIP/trunk_000107-00000424”, “Pruebas”) in new stack
– Executing [pruebas@000001_inbound_custom:2] Answer(“SIP/trunk_000107-00000424”, “”) in new stack
Audio is at 12496
Adding codec 0x100 (g729) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to XX.XX.XX.XX:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK620acc45;received=XX.XX.XX.XX;rport=5060
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X;tag=as7d8c9360
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 102 INVITE
Server: Asterisk PBX 1.8.15-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:pruebas@X.X.X.X:5060
Content-Type: application/sdp
Content-Length: 321

v=0
o=root 1384446940 1384446940 IN IP4 X.X.X.X
s=Asterisk PBX 1.8.15-cert2
c=IN IP4 X.X.X.X
t=0 0
m=audio 12496 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

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

<— SIP read from UDP:XX.XX.XX.XX:5060 —>
ACK sip:pruebas@X.X.X.X:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK01be2b1b;rport
Max-Forwards: 70
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X;tag=as7d8c9360
Contact: sip:XXXXXXXXX@XX.XX.XX.XX:5060
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 102 ACK
User-Agent: PBX
Content-Length: 0

<------------->
— (10 headers 0 lines) —

-- Executing [pruebas@000001_inbound_custom:3] Wait("SIP/trunk_000107-00000424", "2") in new stack
-- Executing [pruebas@000001_inbound_custom:4] Set("SIP/trunk_000107-00000424", "__PICKUPMARK=0000011") in new stack
-- Executing [pruebas@000001_inbound_custom:5] Queue("SIP/trunk_000107-00000424", "pruebas,r") in new stack

<— SIP read from UDP:XX.XX.XX.XX:5060 —>
BYE sip:pruebas@X.X.X.X:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK3055cc22;rport
Max-Forwards: 70
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X;tag=as7d8c9360
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 103 BYE
User-Agent: PBX
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Sending to XX.XX.XX.XX:5060 (NAT)
Scheduling destruction of SIP dialog ‘xxxxxxxxxxxxx@xx.xx.xx’ in 6400 ms (Method: BYE)

<— Transmitting (NAT) to XX.XX.XX.XX:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK3055cc22;received=XX.XX.XX.XX;rport=5060
From: “XXXXXXXXX” sip:XXXXXXXXX@xx.xx.xx;tag=as5581d019
To: sip:pruebas@X.X.X.X;tag=as7d8c9360
Call-ID: xxxxxxxxxxxxx@xx.xx.xx
CSeq: 103 BYE
Server: Asterisk PBX 1.8.15-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

Regards,

Adrian

You are using a very old version of Asterisk. I can’t remember but it may be that media has to be flowing in that version in order to have the ringing tone be generated. Just doing a Wait() doesn’t do that. Doing a Playback() as you said does send out media and would allow it to work.

Hello,

We use Answer for open the channel and then generate the ring tone. Also, We have a similar configuration in older Asterisk and works correctly, as it shouldn’t be a problem.