<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 3, 2018 at 2:09 PM Dan Cropp <<a href="mailto:dan@amtelco.com">dan@amtelco.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_8942154229223123471WordSection1">
<p class="MsoNormal">I’m reaching out to the asterisk users e-mail list in hopes someone there can provide guidance. A couple of Digium’s developers check this e-mail group so they may respond. Unfortunately, they are basically in the get ready for show mode.
Major show is next week and they are also releasing the next major version in a matter of days.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Asking if them…<u></u><u></u></p>
<p class="MsoNormal">What causes asterisk to output the <span style="background:yellow none repeat scroll 0% 0%">
Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match</span><u></u><u></u></p>
<p class="MsoNormal">message?</p></div></div></blockquote><div><br></div><div>Because Asterisk received a G729 RTP packet from the other side and is being accommodating because asymmetric_rtp_codec=no is set.</div><div>In this case the other side is in error by not honoring the negotiation.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8942154229223123471WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal">Is it asterisk detecting rtp stream with g729?<u></u><u></u></p>
<p class="MsoNormal">Why would asterisk change to g729 stream if the codec negotiation is clearly ulaw in the SIP packets?</p></div></div></blockquote><div><br></div><div>This is mostly historical. chan_sip didn't keep track of the truly negotiated codecs in the channel's native capabilities. So if the peer's INVITE<br></div><div>asked for five codecs and Asterisk supported three of them, we would respond with the three and then pick the one we were going to use and put it into the <br></div><div>channel's native capabilities. chan_pjsip has the asymmetric_rtp_codec option to emulate this same behavior which results in the "Oooh"</div><div>message you are seeing. If that option were disabled we would put those three codecs in the channel's native capabilities. Then you would get</div><div> this debug message instead:</div><div> "Oooh, got a frame with format of %s on channel '%s' when it has not been negotiated"</div><div>and the frame would be discarded.</div><div><br></div><div>The primary reason for chan_sip's behavior and chan_pjsip's asymmetric_rtp_codec=no option is because phone DSP's can only handle</div><div>a single codec at a time. Technically if the peer's INVITE offered five and we responded with three the peer should immediately renegotiate to narrow the</div><div>codec choice to one.</div><div><br></div><div>Richard<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8942154229223123471WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:9pt;font-family:"Verdana",sans-serif;color:rgb(31,73,125)">Dan Cropp</span><span style="font-size:9pt;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:rgb(31,73,125)">Senior Software Engineer, R&D Software Dept.</span><b><span style="color:rgb(31,73,125)"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:rgb(31,73,125)">AMTELCO, 4800 Curtin Drive, McFarland, WI 53558-9424</span><b><span style="color:rgb(31,73,125)"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:rgb(31,73,125)">608 838-4197 ext. 291</span><b><span style="color:rgb(31,73,125)"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:rgb(31,73,125)">1-800-238-5275 ext 291</span><b><span style="color:rgb(31,73,125)"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)"><a href="http://www.amtelco.com/" target="_blank"><span style="color:blue">www.amtelco.com</span></a></span><span style="font-size:9pt;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Arial",sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Arial",sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-bottom:6pt"><b><u><span style="font-size:9pt;font-family:"Arial",sans-serif;color:rgb(51,51,51)">Statement of Confidentiality<u></u><u></u></span></u></b></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:"Arial",sans-serif;color:black">The contents of this e-mail message and any attachments are confidential to American Tel-A-Systems, Inc. (AMTELCO), and are intended solely
for the addressee(s). The information contained in this transmission also may be of a legally privileged nature. This transmission is sent in trust and is meant solely for delivery to the intended recipient(s). Receipt of this transmission does not convey
any right to reproduce or disseminate any of the information it contains. If you are not the intended recipient, please immediately notify the sender by reply e-mail or telephone and delete this message and any attachments.<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Dan Cropp <br>
<b>Sent:</b> Wednesday, October 3, 2018 1:57 PM<br>
<b>To:</b> <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>
<b>Subject:</b> Any idea what causes "Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match"<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The PJSIP endpoint is configured for ulaw only. Not sure how or why we are seeing the g729 on calls for this endpoint.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Would this be a case that asterisk detects the rtp stream is g729 even though it’s negotiated as ulaw?
<u></u><u></u></p>
<p class="MsoNormal">Why would asterisk change the format to g729 when disallow = all and allow = ulaw are the endpoint settings?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[121]<u></u><u></u></p>
<p class="MsoNormal">type = endpoint<u></u><u></u></p>
<p class="MsoNormal">context = IS<u></u><u></u></p>
<p class="MsoNormal">transport = transport1<u></u><u></u></p>
<p class="MsoNormal">aors = 121<u></u><u></u></p>
<p class="MsoNormal">accountcode = 2<u></u><u></u></p>
<p class="MsoNormal">dtmf_mode = inband<u></u><u></u></p>
<p class="MsoNormal">device_state_busy_at = 96<u></u><u></u></p>
<p class="MsoNormal">force_rport = no<u></u><u></u></p>
<p class="MsoNormal">identify_by = username,ip<u></u><u></u></p>
<p class="MsoNormal">disallow = all<u></u><u></u></p>
<p class="MsoNormal">allow = ulaw<u></u><u></u></p>
<p class="MsoNormal">from_user = 121<u></u><u></u></p>
<p class="MsoNormal">acl = acl1<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[10/03 11:29:34.240] DEBUG[21414][C-00000226] chan_pjsip.c: <span style="background:yellow none repeat scroll 0% 0%">
Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">INVITE <a>sip:2197@XXX.XXX.XXX.XXX:5060</a> SIP/2.0<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bKxqyYl2Jg84158000<u></u><u></u></p>
<p class="MsoNormal">To: <<a>sip:2197@<span style="color:windowtext;text-decoration:none">
</span>XXX.XXX.XXX.XXX </a>><u></u><u></u></p>
<p class="MsoNormal">From: <<a>sip:STUFF@YYY.YYY.YYY.YYY
</a>>;tag=I0n4X7KK<u></u><u></u></p>
<p class="MsoNormal">Contact: <<a>sip:STUFF @YYY.YYY.YYY.YYY:5060</a>><u></u><u></u></p>
<p class="MsoNormal">Call-ID: <a href="mailto:OlrmFuyOq-0000-@192.168.10.213" target="_blank">OlrmFuyOq-0000-@<span style="color:windowtext;text-decoration:none"> YYY.YYY.YYY.YYY
</span></a><u></u><u></u></p>
<p class="MsoNormal">CSeq: 2223 INVITE<u></u><u></u></p>
<p class="MsoNormal">Max-Forwards: 70<u></u><u></u></p>
<p class="MsoNormal">Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,REFER,NOTIFY<u></u><u></u></p>
<p class="MsoNormal">Supported: replaces<u></u><u></u></p>
<p class="MsoNormal">Content-Type: application/sdp<u></u><u></u></p>
<p class="MsoNormal">Content-Length: 335<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">v=0<u></u><u></u></p>
<p class="MsoNormal">o=- 11264000 11264000 IN IP4 YYY.YYY.YYY.YYY<u></u><u></u></p>
<p class="MsoNormal">s=-<u></u><u></u></p>
<p class="MsoNormal">c=IN IP4 192.168.10.213<u></u><u></u></p>
<p class="MsoNormal">t=0 0<u></u><u></u></p>
<p class="MsoNormal">m=audio 32768 RTP/AVP 0 2 8 18 110 120 100<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:0 PCMU/8000<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:2 G726-32/8000<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:8 PCMA/8000<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:18 G729/8000<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:110 G723/5300<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:120 G723/6300<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:100 telephone-event/8000<u></u><u></u></p>
<p class="MsoNormal">a=fmtp:100 0-15<u></u><u></u></p>
<p class="MsoNormal">a=sendrecv<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Send<u></u><u></u></p>
<p class="MsoNormal">SIP/2.0 200 OK<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bKxqyYl2Jg84158000<u></u><u></u></p>
<p class="MsoNormal">Call-ID: <a href="mailto:OlrmFuyOq-0000-@YYY.YYY.YYY.YYY%20" target="_blank">
OlrmFuyOq-0000-@YYY.YYY.YYY.YYY </a><u></u><u></u></p>
<p class="MsoNormal">From: <<a>sip:STUFF@YYY.YYY.YYY.YYY</a> >;tag=I0n4X7KK<u></u><u></u></p>
<p class="MsoNormal">To: <<a>sip:2197@XXX.XXX.XXX.XXX
</a>>;tag=b4134118-08f4-4dbc-a145-573d04438092<u></u><u></u></p>
<p class="MsoNormal">CSeq: 2223 INVITE<u></u><u></u></p>
<p class="MsoNormal">Server: Asterisk PBX 13.20.0<u></u><u></u></p>
<p class="MsoNormal">Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE<u></u><u></u></p>
<p class="MsoNormal">Contact: <<a>sip:YYY.YYY.YYY.YYY:5060</a>><u></u><u></u></p>
<p class="MsoNormal">Supported: 100rel, timer, replaces, norefersub<u></u><u></u></p>
<p class="MsoNormal">Content-Type: application/sdp<u></u><u></u></p>
<p class="MsoNormal">Content-Length: 181<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">v=0<u></u><u></u></p>
<p class="MsoNormal">o=- 11264000 11264002 IN IP4 YYY.YYY.YYY.YYY<u></u><u></u></p>
<p class="MsoNormal">s=Asterisk<u></u><u></u></p>
<p class="MsoNormal">c=IN IP4 192.168.11.176<u></u><u></u></p>
<p class="MsoNormal">t=0 0<u></u><u></u></p>
<p class="MsoNormal">m=audio 18380 RTP/AVP 0<u></u><u></u></p>
<p class="MsoNormal">a=rtpmap:0 PCMU/8000<u></u><u></u></p>
<p class="MsoNormal">a=ptime:20<u></u><u></u></p>
<p class="MsoNormal">a=maxptime:150<u></u><u></u></p>
<p class="MsoNormal">a=sendrecv<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Receive<u></u><u></u></p>
<p class="MsoNormal">ACK <a>sip:XXX.XXX.XXX.XXX:5060</a> SIP/2.0<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bKCIJuiRuH8415a000<u></u><u></u></p>
<p class="MsoNormal">To: <<a>sip:2197@<span style="color:windowtext;text-decoration:none">
</span>XXX.XXX.XXX.XXX </a>>;tag=b4134118-08f4-4dbc-a145-573d04438092<u></u><u></u></p>
<p class="MsoNormal">From: <<a>sip:STUFF@ YYY.YYY.YYY.YYY
</a>>;tag=I0n4X7KK<u></u><u></u></p>
<p class="MsoNormal">Max-Forwards: 70<u></u><u></u></p>
<p class="MsoNormal">Call-ID: <a href="mailto:OlrmFuyOq-0000-@YYY.YYY.YYY.YYY" target="_blank">OlrmFuyOq-0000-@YYY.YYY.YYY.YYY</a><u></u><u></u></p>
<p class="MsoNormal">CSeq: 2223 ACK<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Asterisk debugging outputs the following.<u></u><u></u></p>
<p class="MsoNormal">[10/03 11:29:34.240] DEBUG[21414][C-00000226] chan_pjsip.c: <span style="background:yellow none repeat scroll 0% 0%">
Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match</span><u></u><u></u></p>
<p class="MsoNormal">[10/03 11:29:34.240] DEBUG[21414][C-00000226] channel.c: Channel PJSIP/121-000001d2 setting write format path: ulaw -> g729<u></u><u></u></p>
<p class="MsoNormal">[10/03 11:29:34.240] DEBUG[21414][C-00000226] channel.c: Channel PJSIP/121-000001d2 setting read format path: ulaw -> g729<u></u><u></u></p>
<p class="MsoNormal">[10/03 11:29:34.240] DEBUG[21414][C-00000226] channel.c: Channel PJSIP/121-000001d2 setting read format path: g729 -> g729<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Astricon is coming up October 9-11! Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">https://www.asterisk.org/community/astricon-user-conference</a><br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div></div></div>