[Home]

Summary:ASTERISK-04576: [patch] No ringback on SIP calls after answer
Reporter:ewieling (ewieling)Labels:
Date Opened:2005-07-13 08:35:16Date Closed:2011-06-07 14:11:56
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) channel.c.diff
( 1) full.2
Description:Local SIP device (SPA-2100, but I think I've seen this with Polycom as well) connected a local 1.0.9 Asterisk server.

; This works, caller hears ringback
exten => 668,1,Dial(SIP/happyuser)

; This does NOT work, caller does NOT hear ringback
exten => 668,1,Answer
exten => 668,2,Dial(SIP/happyuser)

; This does NOT work, caller does NOT hear ringback
exten => 668,1,Answer
exten => 668,2,Dial(SIP/happyuser,,r)

; This does NOT work, caller does NOT hear ringback
exten => 668,1,Answer
exten => 668,2,Ringing
exten => 668,3,Dial(SIP/happyuser)
Comments:By: Michael Jerris (mikej) 2005-07-13 08:39:32

per bug guidelines, can you please test this against head as well.

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-07-13 08:42:48

I doubt this is major, but then...

what about

exten => 668,1,Answer
exten => 668,2,Playtones(ring)
exten => 668,3,Dial(SIP/happyuser)

By: ewieling (ewieling) 2005-07-13 08:49:05

That doesn't even run the Dial statement.

exten => 2199,1,Answer
exten => 2199,2,Playtones(ring)
exten => 2199,3,Dial(SIP/000e08eac9d8-a)

   -- Executing Answer("SIP/000e08eac9d8-b-f791", "") in new stack
   -- Executing Playtones("SIP/000e08eac9d8-b-f791", "ring") in new stack
 == Spawn extension (toll-access, 2199, 2) exited non-zero on 'SIP/000e08eac9d8-b-f791'

By: ewieling (ewieling) 2005-07-13 08:52:00

Testing against CVS-HEAD will take a few days.  I'll have to scrounge up a machine before I can install CVS-HEAD.

By: Michael Jerris (mikej) 2005-07-13 08:54:28

Also can you verify if this is really not sip specific (test with IAX or somthing)..  If this is sip specific, we will need the sip debug and verbose from head.

By: dbruce (dbruce) 2005-07-13 09:01:17

Ringback is a call progress tone. Call Progress tones are sent before the channel is answered. Once the channel is answered, there is no further call progress, hence you no longer hear ringback. This is normal.

The only time you will need to answer the incoming call before executing the dial is in the case of an IVR system, where you need to prompt the caller.

If you remove the answer from the dialplan, you will get the desired result (ringback until the final destination answers the call). If you must have answer the incoming leg of the call, you should add the ringback option to the dial command like this:

exten => 668,3,Dial(SIP/happyuser|r)

This issue is definately a configuration error.

By: Michael Jerris (mikej) 2005-07-13 09:06:30

what caught my eye is that he states it will not work even w/ the r option.

By: ewieling (ewieling) 2005-07-13 09:11:42

Correct, "r" also does not work.

You ALSO have to answer the line before Dial if you are trying to detect an incoming fax in order to route the call to the exten => fax, if the call is a fax.  This is how I discovered the problem.  We are trying to set up support for incoming faxes on the user's DID.  For that we need to something like this (within a macro):

exten => s,1,Answer
exten => s,2,Ringing
exten => s,3,WaitExten(3)
exten => s,4,Dial(SIP/happysip)

exten => fax,1,Dial(Zap/20)
exten => fax,2,Hangup
exten => fax,102,Busy

By: ewieling (ewieling) 2005-07-13 09:17:49

How can I make this clearer?

========================================================
; This does NOT work, caller does NOT hear ringback
exten => 668,1,Answer
exten => 668,2,Dial(SIP/happyuser,,r)
========================================================

Using "r" does NOT make the caller hear ringback.

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-07-13 09:24:32

Excuse my ignorance, but why should you answer a call before forwarding it?

By: ewieling (ewieling) 2005-07-13 09:29:40

How can I make this clearer?  What part of fax detection is not clear?

You have to answer the line before Dial if you are trying to detect an incoming fax (see zapata.conf faxdetect=) in order to route the call to the exten => fax, if the call is a fax. This is how I discovered the problem. We are trying to set up support for incoming faxes on the user's DID. For that we need to something like this (within a macro):

exten => s,1,Answer
exten => s,2,Ringing
exten => s,3,WaitExten(3)
exten => s,4,Dial(SIP/happysip)

exten => fax,1,Dial(Zap/20)
exten => fax,2,Hangup
exten => fax,102,Busy

By: Paul Belanger (pabelanger) 2005-07-13 09:52:31

I just tried this using 1.0.9 with your settings, all worked.  See below:

; Works, caller hears ring back.
exten => 668,1,Answer
exten => 668,2,Dial(SIP/mitel5055)
exten => 668,3,Congestion

-- Executing Answer("SIP/PaulB-4f91", "") in new stack
-- Executing Dial("SIP/PaulB-4f91", "SIP/mitel5055") in new stack
-- Called mitel5055
-- SIP/mitel5055-5aa6 is ringing

; Works, caller hears ring back.
exten => 668,1,Answer
exten => 668,2,Dial(SIP/mitel5055,,r)
exten => 668,3,Congestion

-- Executing Answer("SIP/PaulB-933d", "") in new stack
-- Executing Dial("SIP/PaulB-933d", "SIP/mitel5055||r") in new stack
-- Called mitel5055
-- SIP/mitel5055-6056 is ringing

; Works, caller hears ring back.
exten => 668,1,Answer
exten => 668,2,Ringing
exten => 668,3,Dial(SIP/Mitel5055)
exten => 668,4,Congestion

-- Executing Answer("SIP/PaulB-6509", "") in new stack
-- Executing Ringing("SIP/PaulB-6509", "") in new stack
-- Executing Dial("SIP/PaulB-6509", "SIP/Mitel5055") in new stack
-- Called Mitel5055
-- SIP/Mitel5055-cdd0 is ringing

I called from a Cisco 7960 to a Mitel 5055.

Also just tested from PRI -> Asterisk -> Cisco 7960 and had no problems.

-- Executing Answer("Zap/21-1", "") in new stack
-- Accepting call from '6132550048' to '2718389' on channel 0/21, span 1
-- Executing Dial("Zap/21-1", "SIP/PaulB") in new stack
-- Called PaulB
-- SIP/PaulB-4825 is ringing



By: Michael Jerris (mikej) 2005-07-13 10:11:49

eric-  this is starting to look like a specific issue to the sip ua you are using.  Can you get us the appropriate debug\verbose from head to be reviewed please.

By: ewieling (ewieling) 2005-07-13 10:54:33

It also happens with Polycom IP 300 using 1.5.2 SIP load.  Just tested it.  

I'll test it with CVS-HEAD when I have a chance to build a machine, download, and install CVS-HEAD.  

BTW, the bug report was for 1.0.x, but I'll try to test with CVS-HEAD.

By: ewieling (ewieling) 2005-07-13 11:01:35

sip debug for russell on 1.0.9

   -- Executing Answer("SIP/000e08dafd45-a-e910", "") in new stack
   -- Executing Dial("SIP/000e08dafd45-a-e910", "SIP/000e08eac9d8-a||r") in new stack
We're at 172.17.2.7 port 16390
Answering/Requesting with root capability 0x10 (g726)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 10 lines
Reliably Transmitting:
INVITE sip:000e08eac9d8-a@172.17.2.238:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b;rport
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
To: <sip:000e08eac9d8-a@172.17.2.238:5060>
Contact: <sip:2120@172.17.2.7>
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Wed, 13 Jul 2005 16:01:35 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 213

v=0
o=root 3143 3143 IN IP4 172.17.2.7
s=session
c=IN IP4 172.17.2.7
t=0 0
m=audio 16390 RTP/AVP 2 101
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
(NAT) to 172.17.2.238:5060
   -- Called 000e08eac9d8-a
fs-1*CLI>

Sip read:
SIP/2.0 100 Trying
To: <sip:000e08eac9d8-a@172.17.2.238:5060>
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b
Server: Sipura/SPA2100-3.1.2(b)
Content-Length: 0


8 headers, 0 lines
fs-1*CLI>

Sip read:
SIP/2.0 180 Ringing
To: <sip:000e08eac9d8-a@172.17.2.238:5060>;tag=98349b0dcda7c485i0
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b
Server: Sipura/SPA2100-3.1.2(b)
Content-Length: 0


8 headers, 0 lines
   -- SIP/000e08eac9d8-a-8c61 is ringing
fs-1*CLI>

Sip read:
NOTIFY sip:sip-1.fnords.org SIP/2.0
Via: SIP/2.0/UDP 172.17.2.238:5060;branch=z9hG4bK-38fd2d3b
From: <sip:000e08eac9d8-a@sip-1.fnords.org>;tag=85a9f5d15972d3d6o0
To: <sip:sip-1.fnords.org>
Call-ID: 1b2754a1-f7508346@172.17.2.238
CSeq: 686 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Sipura/SPA2100-3.1.2(b)
Content-Length: 0


10 headers, 0 lines
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.17.2.238:5060;branch=z9hG4bK-38fd2d3b
From: <sip:000e08eac9d8-a@sip-1.fnords.org>;tag=85a9f5d15972d3d6o0
To: <sip:sip-1.fnords.org>;tag=as2693df07
Call-ID: 1b2754a1-f7508346@172.17.2.238
CSeq: 686 NOTIFY
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact:
Content-Length: 0


to 172.17.2.238:5060
Destroying call '1b2754a1-f7508346@172.17.2.238'
Reliably Transmitting:
CANCEL sip:000e08eac9d8-a@172.17.2.238:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b;rport
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
To: <sip:000e08eac9d8-a@172.17.2.238:5060>
Contact: <sip:2120@172.17.2.7>
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 CANCEL
User-Agent: Asterisk PBX
Content-Length: 0

(NAT) to 172.17.2.238:5060
Scheduling destruction of call '3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7' in 15000 ms
 == Spawn extension (toll-access, 2199, 2) exited non-zero on 'SIP/000e08dafd45-a-e910'
fs-1*CLI>

Sip read:
SIP/2.0 487 Request Terminated
To: <sip:000e08eac9d8-a@172.17.2.238:5060>;tag=98349b0dcda7c485i0
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b
Server: Sipura/SPA2100-3.1.2(b)
Content-Length: 0


8 headers, 0 lines
Transmitting:
ACK sip:000e08eac9d8-a@172.17.2.238:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b;rport
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
To: <sip:000e08eac9d8-a@172.17.2.238:5060>;tag=98349b0dcda7c485i0
Contact: <sip:2120@172.17.2.7>
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0

(NAT) to 172.17.2.238:5060
fs-1*CLI>

Sip read:
SIP/2.0 200 OK
To: <sip:000e08eac9d8-a@172.17.2.238:5060>;tag=98349b0dcda7c485i0
From: "Wieling, Eric" <sip:2120@172.17.2.7>;tag=as70b4469d
Call-ID: 3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7
CSeq: 102 CANCEL
Via: SIP/2.0/UDP 172.17.2.7:5060;branch=z9hG4bK0d098d7b
Server: Sipura/SPA2100-3.1.2(b)
Content-Length: 0


8 headers, 0 lines
Destroying call '3b0f95c072a3e6d8073fc2676c4aa412@172.17.2.7'
fs-1*CLI> sip nodebug

By: ewieling (ewieling) 2005-07-13 11:04:37

The previous SIP DEBUG was for the destination SIP device.  Here's one for the source DIP device:

Sip read:
INVITE sip:2199@fs-1.fnords.org SIP/2.0
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-5728b45f
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 101 INVITE
Max-Forwards: 70
Contact: <sip:000e08dafd45-a@172.17.2.240:5060>
Expires: 240
User-Agent: Sipura/SPA841-3.1.1(a)
Content-Length: 399
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Content-Type: application/sdp

v=0
o=- 21387346 21387346 IN IP4 172.17.2.240
s=-
c=IN IP4 172.17.2.240
t=0 0
m=audio 16438 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

13 headers, 18 lines
Using latest request as basis request
Sending to 172.17.2.240 : 5060 (non-NAT)
Reliably Transmitting (NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-5728b45f;received=172.17.2.240;rport=5060
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as5f418216
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2199@172.17.2.7>
Proxy-Authenticate: Digest realm="asterisk", nonce="52b6d8f0"
Content-Length: 0


to 172.17.2.240:5060
Scheduling destruction of call '5bf7fd1b-8984b872@172.17.2.240' in 15000 ms
Found user '000e08dafd45-a'
fs-1*CLI>

Sip read:
ACK sip:2199@fs-1.fnords.org SIP/2.0
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-5728b45f
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as5f418216
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 101 ACK
Max-Forwards: 70
Contact: <sip:000e08dafd45-a@172.17.2.240:5060>
User-Agent: Sipura/SPA841-3.1.1(a)
Content-Length: 0


10 headers, 0 lines
fs-1*CLI>

Sip read:
INVITE sip:2199@fs-1.fnords.org SIP/2.0
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-33c1e0c8
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 102 INVITE
Max-Forwards: 70
Proxy-Authorization: Digest username="000e08dafd45-a",realm="asterisk",nonce="52b6d8f0",uri="sip:2199@fs-1.fnords.org",algorithm=MD5,response="cd3f3aa28194e5b0c64b33d6535970e7"
Contact: <sip:000e08dafd45-a@172.17.2.240:5060>
Expires: 240
User-Agent: Sipura/SPA841-3.1.1(a)
Content-Length: 399
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Content-Type: application/sdp

v=0
o=- 21387346 21387346 IN IP4 172.17.2.240
s=-
c=IN IP4 172.17.2.240
t=0 0
m=audio 16438 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

14 headers, 18 lines
Using latest request as basis request
Sending to 172.17.2.240 : 5060 (NAT)
Found user '000e08dafd45-a'
Found RTP audio format 0
Found RTP audio format 2
Found RTP audio format 4
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 96
Found RTP audio format 97
Found RTP audio format 98
Found RTP audio format 101
Peer audio RTP is at port 172.17.2.240:16438
Found description format PCMU
Found description format G726-32
Found description format G723
Found description format PCMA
Found description format G729a
Found description format G726-40
Found description format G726-24
Found description format G726-16
Found description format telephone-event
Capabilities: us - 0x10 (g726), peer - audio=0x51d (g723|ulaw|alaw|g726|g729|ilbc)/video=0x0 (nothing), combined - 0x10 (g726)
Non-codec capabilities: us - 0x1 (g723), peer - 0x1 (g723), combined - 0x1 (g723)
Looking for 2199 in toll-access
list_route: hop: <sip:000e08dafd45-a@172.17.2.240:5060>
Transmitting (NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-33c1e0c8;received=172.17.2.240;rport=5060
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2199@172.17.2.7>
Content-Length: 0


to 172.17.2.240:5060
   -- Executing Answer("SIP/000e08dafd45-a-ddc0", "") in new stack
We're at 172.17.2.7 port 16388
Answering with preferred capability 0x10 (g726)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting (NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-33c1e0c8;received=172.17.2.240;rport=5060
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as0deddfba
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2199@172.17.2.7>
Content-Type: application/sdp
Content-Length: 213

v=0
o=root 3144 3144 IN IP4 172.17.2.7
s=session
c=IN IP4 172.17.2.7
t=0 0
m=audio 16388 RTP/AVP 2 101
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 172.17.2.240:5060
   -- Executing Dial("SIP/000e08dafd45-a-ddc0", "SIP/000e08eac9d8-a||r") in new stack
   -- Called 000e08eac9d8-a
   -- SIP/000e08eac9d8-a-e2e4 is ringing
fs-1*CLI>

Sip read:
ACK sip:2199@172.17.2.7 SIP/2.0
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-f01e0b0
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as0deddfba
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 102 ACK
Max-Forwards: 70
Proxy-Authorization: Digest username="000e08dafd45-a",realm="asterisk",nonce="52b6d8f0",uri="sip:2199@172.17.2.7",algorithm=MD5,response="c17c6d2c60c43a09c6d7d60e4d7efb59"
Contact: <sip:000e08dafd45-a@172.17.2.240:5060>
User-Agent: Sipura/SPA841-3.1.1(a)
Content-Length: 0


11 headers, 0 lines
fs-1*CLI>

Sip read:
BYE sip:2199@172.17.2.7 SIP/2.0
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-94aba34b
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as0deddfba
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 103 BYE
Max-Forwards: 70
Proxy-Authorization: Digest username="000e08dafd45-a",realm="asterisk",nonce="52b6d8f0",uri="sip:2199@172.17.2.7",algorithm=MD5,response="eefdefe1880648c0c41d670de938b6fe"
User-Agent: Sipura/SPA841-3.1.1(a)
Content-Length: 0


10 headers, 0 lines
Sending to 172.17.2.240 : 5060 (NAT)
Transmitting (NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-94aba34b;received=172.17.2.240;rport=5060
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=70b7dd07bf5e7976o0
To: <sip:2199@fs-1.fnords.org>;tag=as0deddfba
Call-ID: 5bf7fd1b-8984b872@172.17.2.240
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2199@172.17.2.7>
Content-Length: 0


to 172.17.2.240:5060
 == Spawn extension (toll-access, 2199, 2) exited non-zero on 'SIP/000e08dafd45-a-ddc0'
Destroying call '5bf7fd1b-8984b872@172.17.2.240'
fs-1*CLI> sip no debug
SIP Debugging Disabled
fs-1*CLI>

By: ewieling (ewieling) 2005-07-13 11:16:29

If I don't Answer() the line Asterisk I see the following on the console.

Transmitting (NAT):
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.17.2.240:5060;branch=z9hG4bK-6b37465d;received=172.17.2.240;rport=5060
From: <sip:000e08dafd45-a@fs-1.fnords.org>;tag=366b47446a16306do0
To: <sip:2199@fs-1.fnords.org>;tag=as4c2f6d29
Call-ID: b6006550-af5ec9d1@172.17.2.240
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:2199@172.17.2.7>
Content-Length: 0

to 172.17.2.240:5060

 -- SIP/000e08eac9d8-a-af9e is ringing

Notice the console message the the destination device is ringing.  This is not shown if I run Answer() first

By: Paul Belanger (pabelanger) 2005-07-13 12:07:04

Just a shot in the dark, but I can see you are using G.726.  What happens if you change it to G.711?

By: ewieling (ewieling) 2005-07-13 12:35:32

USD$25 bounty for a fix for this issue.

Must be accepted into 1.0.x CVS.  Must happen before Friday July 15 2005.

Paid via paypal or check, your choice.

By: ewieling (ewieling) 2005-07-13 13:31:52

Here are mailing list messages reporting problems with ringing after answer (or playback, which answers by default) and/or the "r" option to Dial.  They may or may not be related.:


http://lists.digium.com/pipermail/asterisk-cvs/2004-November/003983.html
http://lists.digium.com/pipermail/asterisk-cvs/2004-November/003985.html

http://lists.digium.com/pipermail/asterisk-dev/2005-January/008684.html

http://lists.digium.com/pipermail/asterisk-users/2005-April/100666.html
http://lists.digium.com/pipermail/asterisk-users/2004-December/079251.html
http://lists.digium.com/pipermail/asterisk-users/2004-December/075707.html
http://lists.digium.com/pipermail/asterisk-users/2004-May/048600.html
http://lists.digium.com/pipermail/asterisk-users/2003-October/023691.html

By: Michael Jerris (mikej) 2005-07-13 14:32:42

can you please try it without g726 (or g729) and see if it works?

By: twisted (twisted) 2005-07-13 15:21:33

Eric,

 The provisional 18x messages in SIP are ONLY sent PRIOR to an INVITE or REINVITE per the RFC.  The behaviour you seem to desire would break RFC, and most devices would not handle it.   the 200 OK you recieve is because you Answer() the call before dialing an extension.  You *WILL NOT* recieve out-of-band ringing indication once the channel has been answered with a sip 200 OK message.  

 I don't think anything is going to happen in CVS because of this.  ANY ringing that occurs after the 200 OK is either a result  of a REINVITE of the SIP call, or is done in-band.

By: Kevin P. Fleming (kpfleming) 2005-07-13 15:27:08

twisted is correct... the only possible way for the caller to hear ringback after their channel has been answered is for it to happen inband. However, it is possible that app_dial could be modified to always send inband progress indications once the calling channel is in 'up' state.

By: Kevin P. Fleming (kpfleming) 2005-07-13 15:28:05

Actually, that would be chan_sip's responsibility.

By: ewieling (ewieling) 2005-07-13 16:45:42

Sorry, but pabelanger may have figured out the problem.  The server I was testing with did not have /etc/asterisk/indications.conf and that seems to be what was causing the lack of inband ringback.  

I will do further testing this evening to confirm this and let this bug die IF that was the problem.

By: Paul Belanger (pabelanger) 2005-07-13 17:02:42

Patch attached to warn user to check if res_indications.so is loaded.

BTW: Does that mean I get the bounty? *wink* *wink* :D

By: ewieling (ewieling) 2005-07-15 09:55:44

That seems to fixed it.  Bounty sent.  You can close this "bug".

By: Kevin P. Fleming (kpfleming) 2005-07-15 17:12:46

Closed at OP request.