[Home]

Summary:ASTERISK-15945: [patch] no sound on Playback(<file>,noanswer)
Reporter:Roman Yeryomin (leroi05)Labels:
Date Opened:2010-04-12 12:24:31Date Closed:2010-04-13 18:51:07
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_playback
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_playback_early_media_1.6.2.7-rc1.patch
Description:There is no sound if I try to playback a file without answering the channel (sip, iax). Tried versoins 1.6.2.5, 1.6.2.6, 1.6.2.7-rc1, 1.6.1.19-rc1, 1.6.0.27-rc1.
On sip channel rtp debug gives nothing.
Reproduceable with minimal dialplan:
exten => _X.,1,Playback(demo-congrats,noanswer)


****** ADDITIONAL INFORMATION ******

On production server with 1.4.21.2 version it works fine.
Comments:By: Paul Belanger (pabelanger) 2010-04-12 15:25:09

Lack of information
---
Thank you for taking the time to report this bug and helping to make Asterisk better.

Unfortunately, we cannot work on this bug because your description did not include enough information.

You may find it helpful to read the Asterisk Issue Guidelines http://www.asterisk.org/developers/bug-guidelines.

We'd be grateful if you would then provide a more complete description of the problem.

At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible).

This likely includes output from the console with debug level logging, a SIP trace (if this is SIP related), and configuration information such as dialplan (e.g. extensions.conf) and channel configuration (e.g. sip.conf).

Thanks!

By: Roman Yeryomin (leroi05) 2010-04-12 17:12:34

Well, I thought it's pretty clear what I did and what I've got.. but ok..

1.
 -- download asterisk tarball of any version I've pointed
 -- unpack/configure/make/make install/start
 -- add sip friend in /etc/asterisk/sip.conf which looks like this:

[test]
secret=test
host=dynamic
type=friend
context=noanswer

 -- register sip client with this account (see if it registered with sip show peers)
 -- add context in /etc/asterisk/extensions.conf:

[noanswer]
exten => _X.,1,Playback(demo-congrats,noanswer)

 -- dial something like 55
 -- listen to the silence


2. I expected to hear demo-congrats file (this works on our production server with 1.4.21.2 as I also stated)
3. I hear nothing (no sound)

Console output:

==========================================================================
*CLI> sip set debug peer test
SIP Debugging Enabled for IP: 192.168.1.106:2049
*CLI> rtp set debug on
RTP Debugging Enabled
*CLI>
<--- SIP read from UDP://192.168.1.106:2049 --->
INVITE sip:99@192.168.1.3;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-jks72ma6zncu;rport
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 1 INVITE
Max-Forwards: 70
Contact: <sip:test@192.168.1.106:2049;line=3suaez42>;reg-id=1
X-Serialnumber: 000413291821
P-Key-Flags: resolution="31x13", keys="4"
User-Agent: snom360/8.2.25
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 473

v=0
o=root 259342033 259342033 IN IP4 192.168.1.106
s=call
c=IN IP4 192.168.1.106
t=0 0
m=audio 62414 RTP/AVP 0 8 9 2 3 18 4 101
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:r1+W3cQjCCCZdiCXML6CH/fZ8YbqOuqHRbom/t1/
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 g722/8000
a=rtpmap:2 g726-32/8000
a=rtpmap:3 gsm/8000
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 g723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------->
--- (19 headers 19 lines) ---
 == Using SIP RTP CoS mark 5
Sending to 192.168.1.106 : 2049 (no NAT)
Using INVITE request as basis request - 3c26fca9c35c-jhhgkvo7xql8
Found user 'test' for 'test'
*CLI>
<--- Reliably Transmitting (no NAT) to 192.168.1.106:2049 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-jks72ma6zncu;received=192.168.1.106;rport=2049
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>;tag=as5ab0dc35
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 1 INVITE
User-Agent: Asterisk PBX 1.6.0.27-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="20e481c0"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '3c26fca9c35c-jhhgkvo7xql8' in 32000 ms (Method: INVITE)
*CLI>
<--- SIP read from UDP://192.168.1.106:2049 --->
ACK sip:99@192.168.1.3;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-jks72ma6zncu;rport
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>;tag=as5ab0dc35
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 1 ACK
Max-Forwards: 70
Contact: <sip:test@192.168.1.106:2049;line=3suaez42>;reg-id=1
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
*CLI>
<--- SIP read from UDP://192.168.1.106:2049 --->
INVITE sip:99@192.168.1.3;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;rport
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 INVITE
Max-Forwards: 70
Contact: <sip:test@192.168.1.106:2049;line=3suaez42>;reg-id=1
X-Serialnumber: 000413291821
P-Key-Flags: resolution="31x13", keys="4"
User-Agent: snom360/8.2.25
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Authorization: Digest username="test",realm="asterisk",nonce="20e481c0",uri="sip:99@192.168.1.3;user=phone",response="c1eb36c3a8d275eec431e8ceb051bf77",algorithm=MD5
Content-Type: application/sdp
Content-Length: 473

v=0
o=root 259342033 259342033 IN IP4 192.168.1.106
s=call
c=IN IP4 192.168.1.106
t=0 0
m=audio 62414 RTP/AVP 0 8 9 2 3 18 4 101
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:r1+W3cQjCCCZdiCXML6CH/fZ8YbqOuqHRbom/t1/
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:9 g722/8000
a=rtpmap:2 g726-32/8000
a=rtpmap:3 gsm/8000
a=rtpmap:18 g729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 g723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------->
--- (20 headers 19 lines) ---
Sending to 192.168.1.106 : 2049 (no NAT)
Using INVITE request as basis request - 3c26fca9c35c-jhhgkvo7xql8
Found user 'test' for 'test'
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 9
Found RTP audio format 2
Found RTP audio format 3
Found RTP audio format 18
Found RTP audio format 4
Found RTP audio format 101
Found audio description format pcmu for ID 0
Found audio description format pcma for ID 8
Found audio description format g722 for ID 9
Found audio description format g726-32 for ID 2
Found audio description format gsm for ID 3
Found audio description format g729 for ID 18
Found audio description format g723 for ID 4
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x190f (g723|gsm|ulaw|alaw|g726|g729|g722)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.1.106:62414
Looking for 99 in noanswer (domain 192.168.1.3)
list_route: hop: <sip:test@192.168.1.106:2049;line=3suaez42>
*CLI>
<--- Transmitting (no NAT) to 192.168.1.106:2049 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;received=192.168.1.106;rport=2049
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 INVITE
User-Agent: Asterisk PBX 1.6.0.27-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
ontact: <sip:99@192.168.1.3>
Content-Length: 0


<------------>
   -- Executing [99@noanswer:1] Playback("SIP/test-00000002", "demo-congrats,noanswer") in new stack
   -- <SIP/test-00000002> Playing 'demo-congrats.alaw' (language 'en')
*CLI>
==========================================================================


Here I hangup because there is no point in waiting:

==========================================================================
<--- SIP read from UDP://192.168.1.106:2049 --->
CANCEL sip:99@192.168.1.3;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;rport
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 CANCEL
Max-Forwards: 70
Reason: SIP;cause=487;text="Request terminated by user"
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
Sending to 192.168.1.106 : 2049 (no NAT)
*CLI>
<--- Reliably Transmitting (no NAT) to 192.168.1.106:2049 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;received=192.168.1.106;rport=2049
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>;tag=as4bc69dc6
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 INVITE
User-Agent: Asterisk PBX 1.6.0.27-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>
*CLI>
<--- Transmitting (no NAT) to 192.168.1.106:2049 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;received=192.168.1.106;rport=2049
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>;tag=as4bc69dc6
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 CANCEL
User-Agent: Asterisk PBX 1.6.0.27-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>
 == Spawn extension (noanswer, 99, 1) exited non-zero on 'SIP/test-00000002'
*CLI>
<--- SIP read from UDP://192.168.1.106:2049 --->
ACK sip:99@192.168.1.3;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.106:2049;branch=z9hG4bK-f97pfdqqcm9w;rport
From: "test" <sip:test@192.168.1.3>;tag=i43s1vktnt
To: <sip:99@192.168.1.3;user=phone>;tag=as4bc69dc6
Call-ID: 3c26fca9c35c-jhhgkvo7xql8
CSeq: 2 ACK
Max-Forwards: 70
Contact: <sip:test@192.168.1.106:2049;line=3suaez42>;reg-id=1
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '3c26fca9c35c-jhhgkvo7xql8' Method: ACK
===========================================================================


It's very clear and easy to reproduce - I don't understand your "Lack of information".



By: Tilghman Lesher (tilghman) 2010-04-12 17:57:33

You filed this under a 1.6.2 version, yet your trace shows that you're actually running 1.6.0.  In that version, you need to set "prematuremedia=yes" in the [general] section of sip.conf in order to get early media.  This is otherwise working as expected (that is, early media is turned off by default, which explains why you hear nothing when you don't answer the channel first).

By: Roman Yeryomin (leroi05) 2010-04-12 18:09:59

Yes, now I'm on 1.6.0.27-rc1, but 1.6.2.7-rc1 is the las version I've tried. How do I point that all 1.6 versions are affected?
Well, according to documentation comments in sip.conf "Default is "yes"" for prematuremedia, but that doesn't matted because explicitly setting prematuremedia=yes gives no result.

Did you try reproducing this?

By: Paul Belanger (pabelanger) 2010-04-12 21:19:53

Thanks for the information, to follow up on your 'lack of information' question, you failed to provided enough debug logs to actually see what if going on.  We cannot fix an issue without first seeing what is happening.

As for reproducing the issue, no, I have not had a chance to reproduce it as your post did not list the type of phones or specific asterisk revision to use.

Remember, when posting information to the issue tracker, more information is better then less.

By: Roman Yeryomin (leroi05) 2010-04-13 01:17:15

If you'd read my description you'd notice that I stated exactly on which versions I can reproduce this:
1.6.2.5, 1.6.2.6, 1.6.2.7-rc1, 1.6.1.19-rc1, 1.6.0.27-rc1
Sip clients (what doesn't matter in this issue):
ekiga 2.0.12
Snom 360 (fw version 8.2.25)
Siemens C470IP (fw version 022230000000 / 043.00)

Once again - all three work with production server just fine.

I can't understand what you don't undestand. What kind of debug information do you need? Or I have to provide SIP/RTP trace for any combination of sip client and asterisk version I've tried?



By: Roman Yeryomin (leroi05) 2010-04-13 01:22:04

This is VERY easy to reproduce - just take the steps I've described.
It can't be that I'm the only one with this issue.

Here people have the same issue:
http://www.freepbx.org/forum/freepbx/users/problem-hearing-prompts
Which they "solved" by answering the channel. That is, 'noanswer' option to Playback() doesn't work for them also!

By: Paul Belanger (pabelanger) 2010-04-13 11:41:18

This is not an issue. It is a problem with you dial plan and is documented in UPGRADE.txt

---
* SIP no longer sends the 183 progress message for early media by
 default.  Applications requiring early media should use the
 progress() dialplan app to generate the progress message.
--
IE:
exten => _X,1,Progress()
exten => _X,n,Playback(demo-congrats,noanswer)

Also, in the future please try #asterisk on IRC or asterisk-users mailing list for support.

By: Roman Yeryomin (leroi05) 2010-04-13 18:25:45

Sorry for reopening this but I should leave a note on this in case someone will search the tracker for this.
You are mostly right - I missed that note, but..

1. That note is listed under changes "From 1.6.1 to 1.6.2", what assumes that under 1.6.0 and 1.6.1 Progress() should not be executed to get early media which is not true. If this change is from 1.4 to 1.6 then this note should be placed in UPGRADE-1.6.txt.

2. If we give 'noanswer' option to Playback() it's obvious that we want early media, otherwise 'noanswer' is useless in Playback().

So, still seems to me like an issue and lack of documentation.

By: Roman Yeryomin (leroi05) 2010-04-13 18:32:46

I've attached patch to app_playback so asterisk sends progress before playing a file if channel is not answered and we have 'noanswer' set.
It's definetly useful to me, so maybe to others also.
I suggest making this change in trunk also.

By: Paul Belanger (pabelanger) 2010-04-13 18:39:37

Without look at your patch, it is my understanding this logic was added into Asterisk, but later reverted.

I recommend you read http://lists.digium.com/pipermail/asterisk-dev/2009-September/039897.html

The correct solution is to add Progress() into your dial plan.

By: Paul Belanger (pabelanger) 2010-04-13 18:51:07

Confirmed with #asterisk-dev.