Summary: | ASTERISK-17393: RTP Early Media not Passed to Caller | ||
Reporter: | Benoit IMP Panizzon (imp) | Labels: | |
Date Opened: | 2011-02-11 10:44:27.000-0600 | Date Closed: | 2011-07-26 14:28:43 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/RTP |
Versions: | 1.6.2.15 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) sip2.pcap.gz | |
Description: | In Switzerland the price of value added numbers is announced via early audio before the connection is established to allow the caller to hang up without generating costs. This early media is not passed if the call is routed via asterisk. Traces show: Asterisk sends invite with sdp to carrier SIP GW. SIP GW starts sending RTP early media to RTP endpoint specified by invite. SIP GW signals '100 trying' SIP GW signals '180 ringing' No Audio is passed to the client connected to the asterisk. Depending on the 'progressinband' and 'rematuremedia' settings, either the client is told to 'ring' or inband 'ringing' is generated by asterisk, but no media from the carrier forwarded. SIP GW signals '200 OK' + sdp Call is established and two way audio is working. The caller has missed the early media announcement. According my interpretation of RFC3960 asterisk should forward early audio if it is receiving early audio. ****** ADDITIONAL INFORMATION ****** http://www.faqs.org/rfc/rfc3960.txt 1. Unless a 180 (Ringing) response is received, never generate local ringing. 2. If a 180 (Ringing) has been received but there are no incoming media packets, generate local ringing. 3. If a 180 (Ringing) has been received and there are incoming media packets, play them and do not generate local ringing. | ||
Comments: | By: Leif Madsen (lmadsen) 2011-02-11 12:22:51.000-0600 Not enough information provided to proceed. Per the bug guidelines: * SIP trace from the Asterisk console * Enable debug level logging and SIP history via sip.conf * Provide a configuration which can be used to duplicate the situation * What is the topology in use and what piece of equipment The configuration and the SIP trace are the most important. By: Ronald Chan (loloski) 2011-02-11 15:03:23.000-0600 on my test rig/setup both SVN 1.8 i can't replicate this, please see attached snippet diaplan. [from-peer] exten => 11108123232,1,Progress same => n,Ringing same => n,Wait(2) same => n,Playback(early-media,noanswer) same => n,Dial(SIP/100,60,tT) same => n,Voicemail(100@default) of course i can not attest if the other end is not asterisk :D just my 0.002 $ Regards By: Benoit IMP Panizzon (imp) 2011-02-14 02:20:48.000-0600 sip.conf: progressinband=no prematuremedia=no [alcatel] type=peer context=from-alcatel host=157.161.3.19 qualify=yes allow=alaw language=de dtmfmode=RFC2833 canreinvite=no [imp1] type=peer context=from-imp host=157.161.10.10 dtmfmode=auto disallow=all allow=alaw language=de canreinvite=no ---------------------- extensions.conf [from-alcatel] exten => _xx.,1,AGI(screening-customer.agi,alcatel.conf) exten => _xx.,n,AGI(dial-imp-new-emerg.agi,4133,${SIP_HEADER(Privacy)}) exten => _xx.,n,Macro(dundi,${ITUNUM}) exten => _xx.,n,Dial(${IMPDESTINATION}) exten => _xx.,n,HangUp() 'screening-customer.agi' just makes sure the callerID the customer is signaling is realy belonging to the customer if not the caller id is replaced by the main number of the customer. 'dial-imp-new-emerg.agi' checks if the customer has dialed an emergency number which has to be routed to the nearest emergency central according to the postal code passed as argument. I'm ommiting that part. From that AGI the important parts are: $AGI->exec('Progress'); (I did try with and without, no success). if ($privacy eq "user") { $AGI->exec('SIPAddHeader','Privacy: user; header; session'); $AGI->exec('SIPAddHeader','P-Asserted-Identity: "ImproWare AG" <sip:+41618269300@157.161.3.19>'); } else { $AGI->exec('SIPAddHeader','Privacy: none'); } $AGI->set_variable('IMPDESTINATION',"SIP/$exten\@imp1"); if ($exten =~ /^00(.*)/) { $exten = $1; } $AGI->set_variable('ITUNUM',"$exten"); By: Benoit IMP Panizzon (imp) 2011-02-14 02:30:03.000-0600 How trying to copy paste all sip transactions belongig to that call from this very very busy asterisk: <--- SIP read from UDP:157.161.3.19:5060 ---> INVITE sip:0901456056@157.161.10.35;user=phone SIP/2.0 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE Supported: replaces,timer,100rel User-Agent: OmniPCX Enterprise R9.0 h1.301.40 Session-Expires: 1800;refresher=uac Min-SE: 900 Content-Type: application/sdp To: <sip:0901456056@157.161.10.35;user=phone> From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf Contact: <sip:157.161.3.19;transport=UDP> all-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 CSeq: 1349603881 INVITE Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976 Max-Forwards: 70 Content-Length: 393 v=0 o=OXE 1297671866 1297671866 IN IP4 157.161.3.19 s=abs c=IN IP4 157.161.4.223 t=0 0 m=audio 32514 RTP/AVP 8 0 4 18 101 a=sendrecv a=rtpmap:8 PCMA/8000 a=ptime:20 a=maxptime:30 a=rtpmap:0 PCMU/8000 a=ptime:20 a=maxptime:30 a=rtpmap:4 G723/8000 a=ptime:30 a=maxptime:30 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=ptime:20 a=maxptime:40 a=rtpmap:101 telephone-event/8000 <-------------> --- (15 headers 21 lines) --- Sending to 157.161.3.19 : 5060 (no NAT) Using INVITE request as basis request - 5a734204cc6891c34586bd62243f8421@157.161.3.19 Found peer 'alcatel' for '0618269314' from 157.161.3.19:5060 Found RTP audio format 8 Found RTP audio format 0 Found RTP audio format 4 Found RTP audio format 18 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 G723 for ID 4 Found audio description format G729 for ID 18 Found audio description format telephone-event for ID 101 Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x10d (g723|ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event) Peer audio RTP is at port 157.161.4.223:32514 Looking for 0901456056 in from-alcatel (domain 157.161.10.35) list_route: hop: <sip:157.161.3.19;transport=UDP> <--- Transmitting (no NAT) to 157.161.3.19:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976;received=157.161.3.19 From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf To: <sip:0901456056@157.161.10.35;user=phone> Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 CSeq: 1349603881 INVITE Server: Asterisk PBX 1.6.2.15 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Session-Expires: 1800;refresher=uac Contact: <sip:0901456056@157.161.10.35> Content-Length: 0 <------------> -- Executing [0901456056@from-alcatel:1] AGI("SIP/alcatel-0000aad1", "screening-customer.agi,alcatel.conf") in new stack -- Launched AGI Script /usr/local/share/asterisk/agi-bin/screening-customer.agi -- <SIP/alcatel-0000aad1>AGI Script screening-customer.agi completed, returning 0 -- Executing [0901456056@from-alcatel:2] AGI("SIP/alcatel-0000aad1", "dial-imp-new-emerg.agi,4133,") in new stack -- Launched AGI Script /usr/local/share/asterisk/agi-bin/dial-imp-new-emerg.agi -- AGI Script Executing Application: (Progress) Options: () Audio is at 157.161.10.35 port 14216 Adding codec 0x8 (alaw) to SDP Adding codec 0x4 (ulaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP <--- Transmitting (no NAT) to 157.161.3.19:5060 ---> SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976;received=157.161.3.19 From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf To: <sip:0901456056@157.161.10.35;user=phone>;tag=as1017af28 Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 CSeq: 1349603881 INVITE Server: Asterisk PBX 1.6.2.15 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Session-Expires: 1800;refresher=uac Contact: <sip:0901456056@157.161.10.35> Content-Type: application/sdp Content-Length: 288 v=0 o=root 199946624 199946624 IN IP4 157.161.10.35 s=Asterisk PBX 1.6.2.15 c=IN IP4 157.161.10.35 t=0 0 m=audio 14216 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-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv <------------> -- AGI Script Executing Application: (SIPAddHeader) Options: (Privacy: none) -- <SIP/alcatel-0000aad1>AGI Script dial-imp-new-emerg.agi completed, returning 0 -- Executing [0901456056@from-alcatel:3] Macro("SIP/alcatel-0000aad1", "dundi,41901456056") in new stack -- Executing [s@macro-dundi:1] NoOp("SIP/alcatel-0000aad1", "DUNDi Lookup 41901456056") in new stack -- Executing [s@macro-dundi:2] Goto("SIP/alcatel-0000aad1", "41901456056,1") in new stack -- Goto (macro-dundi,41901456056,1) -- Executing [0901456056@from-alcatel:4] Dial("SIP/alcatel-0000aad1", "SIP/41901456056@imp1") in new stack Audio is at 157.161.10.35 port 15708 Adding codec 0x8 (alaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP Reliably Transmitting (no NAT) to 157.161.10.10:5060: INVITE sip:41901456056@157.161.10.10 SIP/2.0 Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;rport Max-Forwards: 70 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10> Contact: <sip:41618269314@157.161.10.35> Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 INVITE User-Agent: Asterisk PBX 1.6.2.15 Date: Mon, 14 Feb 2011 08:24:26 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Privacy: none Content-Type: application/sdp Content-Length: 266 v=0 o=root 1730262329 1730262329 IN IP4 157.161.10.35 s=Asterisk PBX 1.6.2.15 c=IN IP4 157.161.10.35 t=0 0 m=audio 15708 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv --- -- Called 41901456056@imp1 <--- SIP read from UDP:157.161.10.10:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;received=157.161.10.35;rport=5060 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10> Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 INVITE Content-Length: 0 <-------------> --- (7 headers 0 lines) --- <--- SIP read from UDP:157.161.10.10:5060 ---> SIP/2.0 180 Ringing Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;received=157.161.10.35;rport=5060 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10>;tag=f1f26313 Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 INVITE Content-Length: 0 <-------------> --- (7 headers 0 lines) --- -- SIP/imp1-0000aad2 is ringing <--- SIP read from UDP:157.161.3.19:5060 ---> CANCEL sip:0901456056@157.161.10.35;user=phone SIP/2.0 Supported: replaces,timer,100rel User-Agent: OmniPCX Enterprise R9.0 h1.301.40 Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 To: <sip:0901456056@157.161.10.35;user=phone> CSeq: 1349603881 CANCEL From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976 Max-Forwards: 70 Content-Length: 0 <-------------> --- (10 headers 0 lines) --- Sending to 157.161.3.19 : 5060 (no NAT) <--- Reliably Transmitting (no NAT) to 157.161.3.19:5060 ---> SIP/2.0 487 Request Terminated Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976;received=157.161.3.19 From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf To: <sip:0901456056@157.161.10.35;user=phone>;tag=as1017af28 Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 CSeq: 1349603881 INVITE Server: Asterisk PBX 1.6.2.15 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Length: 0 <------------> <--- Transmitting (no NAT) to 157.161.3.19:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976;received=157.161.3.19 From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf To: <sip:0901456056@157.161.10.35;user=phone>;tag=as1017af28 Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 CSeq: 1349603881 CANCEL Server: Asterisk PBX 1.6.2.15 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Length: 0 <------------> Scheduling destruction of SIP dialog '1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35' in 32000 ms (Method: INVITE) Reliably Transmitting (no NAT) to 157.161.10.10:5060: CANCEL sip:41901456056@157.161.10.10 SIP/2.0 Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;rport Max-Forwards: 70 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10> Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 CANCEL User-Agent: Asterisk PBX 1.6.2.15 Content-Length: 0 --- Scheduling destruction of SIP dialog '1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35' in 32000 ms (Method: INVITE) == Spawn extension (from-alcatel, 0901456056, 4) exited non-zero on 'SIP/alcatel-0000aad1' <--- SIP read from UDP:157.161.10.10:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;rport From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10> Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 CANCEL Content-Length: 0 <-------------> --- (7 headers 0 lines) --- <--- SIP read from UDP:157.161.10.10:5060 ---> SIP/2.0 487 Request Cancelled Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;received=157.161.10.35;rport=5060 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10>;tag=f1f26313 Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 INVITE Content-Length: 0 <-------------> --- (7 headers 0 lines) --- Transmitting (no NAT) to 157.161.10.10:5060: ACK sip:41901456056@157.161.10.10 SIP/2.0 Via: SIP/2.0/UDP 157.161.10.35:5060;branch=z9hG4bK130fc3a3;rport Max-Forwards: 70 From: "41618269314" <sip:41618269314@157.161.10.35>;tag=as520dcb3b To: <sip:41901456056@157.161.10.10>;tag=f1f26313 Contact: <sip:41618269314@157.161.10.35> Call-ID: 1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35 CSeq: 102 ACK User-Agent: Asterisk PBX 1.6.2.15 Content-Length: 0 --- Really destroying SIP dialog '1c4ad0e32b89deb832dce3dd4bc50813@157.161.10.35' Method: INVITE <--- SIP read from UDP:157.161.3.19:5060 ---> ACK sip:0901456056@157.161.10.35;user=phone SIP/2.0 Call-ID: 5a734204cc6891c34586bd62243f8421@157.161.3.19 From: sip:0618269314@vl-xm001001.imp.ch;tag=5a20ba5a28f8e172062f83d711ed55cf To: <sip:0901456056@157.161.10.35;user=phone>;tag=as1017af28 Via: SIP/2.0/UDP 157.161.3.19;branch=z9hG4bKf8249c380b529fa322eadb5692305976 CSeq: 1349603881 ACK Content-Length: 0 <-------------> --- (7 headers 0 lines) --- By: Benoit IMP Panizzon (imp) 2011-02-14 02:33:20.000-0600 Best is to check sip2.pcap with the wireshark built-in voip functions which can show a graph of sip and rtp signalling and flows. So you see, that asterisk is receiving early media, but not passing it to the caller. By: Benoit IMP Panizzon (imp) 2011-02-14 02:38:51.000-0600 Equipment used: Asterisk 2.6.2.15 on FreeBSD as SIP Gateway to 'Trunk' Customers for screening and routing purposes which cannot be achived by the Carrier PBX. Alcatel OmniPCX Enterprise R9.0 h1.301.40 as 'Trunk' Client atteched to Asterisk. But problem can also be reproduced with Grandstream, or ZyXEL V2000W or N900 Sip Client (and probaly many more, as the pcap shows asterisk is not sending rtp). Carrier PBX: IPGallery Release: 4.1-15_SS (www.ipgallery.com). PS: I did play around with sending 'Progressing' or not, setting 'progressinboand' to no, never, yes and prematuremedia to 'no' or 'yes'. The resulty I got vary, but none of them cause asterisk to actualy forward the early audio it got from the carrier to the client. Asterisk either generated early audio 'ringing' itself or told the client to generate 'ringing'. By: Russell Bryant (russell) 2011-07-26 14:28:07.133-0500 Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks! |