<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hey all,<div class=""><br class=""></div><div class="">I had got an issue when I tried to bridge FS to Asterisk for a outgoing call. The late negotation had been set as true, but I got a codec error on Asterisk which showed:</div><div class=""><br class=""></div><div class="">[Dec 29 16:16:52] NOTICE[2095][C-00000002]: chan_sip.c:10465 process_sdp: No compatible codecs, not accepting this offer!</div><div class=""><br class=""></div><div class="">After this I checked the codec negotiation, like this:</div><div class=""><br class=""></div><div class="">SDP message from softphone:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:46.677190 [DEBUG] sofia.c:7094 Remote SDP:401e6cb7-3c4d-43ca-9bc9-a5055ad52485 v=0</div></div><div class=""><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:46.677190 [DEBUG] sofia.c:7094 Remote SDP:</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de v=0</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de o=52bf0a8a88c515081c124a49cf6ce7bc 2651 2264 IN IP4 192.168.254.65</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de s=Talk</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de c=IN IP4 192.168.254.65</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de t=0 0</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de m=audio 7076 RTP/AVP 96 97 98 99 0 8 101 100 102</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:96 opus/48000/2</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=fmtp:96 useinbandfec=1</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:97 SILK/16000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:98 speex/16000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=fmtp:98 vbr=on</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:99 speex/8000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=fmtp:99 vbr=on</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:101 telephone-event/48000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:100 telephone-event/16000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:102 telephone-event/8000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtcp-fb:* trr-int 5000</div></div><div class=""><br class=""></div></blockquote>Negotiation steps:<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [opus:96:48000:20:0:1]/[PCMU:0:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [opus:96:48000:20:0:1]/[PCMA:8:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [opus:96:48000:20:0:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [opus:96:48000:20:0:1]/[SPEEX:99:8000:20:24600:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [opus:96:48000:20:0:1]/[SPEEX:99:16000:20:42200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SILK:97:16000:20:0:1]/[PCMU:0:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SILK:97:16000:20:0:1]/[PCMA:8:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SILK:97:16000:20:0:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SILK:97:16000:20:0:1]/[SPEEX:99:8000:20:24600:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SILK:97:16000:20:0:1]/[SPEEX:99:16000:20:42200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:98:16000:20:0:1]/[PCMU:0:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:98:16000:20:0:1]/[PCMA:8:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:98:16000:20:0:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:98:16000:20:0:1]/[SPEEX:99:8000:20:24600:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:98:16000:20:0:1]/[SPEEX:99:16000:20:42200:1]</div><div class=""><b class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [SPEEX:99:16000:20:42200:1] ++++ is saved as a match</b></div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:99:8000:20:0:1]/[PCMU:0:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:99:8000:20:0:1]/[PCMA:8:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:99:8000:20:0:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:99:8000:20:0:1]/[SPEEX:99:8000:20:24600:1]</div><div class=""><b class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [SPEEX:99:8000:20:24600:1] ++++ is saved as a match</b></div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:99:8000:20:0:1]/[SPEEX:99:16000:20:42200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]</div><div class=""><b class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match</b></div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[SPEEX:99:8000:20:24600:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[SPEEX:99:16000:20:42200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]</div><div class=""><b class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match</b></div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[GSM:3:8000:20:13200:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[SPEEX:99:8000:20:24600:1]</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[SPEEX:99:16000:20:42200:1]</div></div></div></blockquote><div class="">Returned SDP message:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de 2017-12-29 16:35:47.277188 [DEBUG] mod_sofia.c:2364 Ring SDP:</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de v=0</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de o=FreeSWITCH 1514482587 1514482588 IN IP4 172.16.25.25</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de s=FreeSWITCH</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de c=IN IP4 210.148.155.42</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de t=0 0</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de m=audio 50360 RTP/AVP 98 100</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:98 speex/16000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=rtpmap:100 telephone-event/16000</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=fmtp:100 0-16</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=ptime:20</div><div class="">43e110bf-0dd2-4518-a5d8-3b3afd52f6de a=sendrecv</div><div class=""><br class=""></div></blockquote><div class="">I’m not clear what happened, but PCMU and PCMA codecs are gone even it passed the check. Next the SDP had sent to Asterisk:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 Local SDP:</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 v=0</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 o=FreeSWITCH 1514482871 1514482872 IN IP4 172.16.25.24</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 s=FreeSWITCH</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 c=IN IP4 172.16.25.24</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 t=0 0</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 m=audio 50076 RTP/AVP 102 101 13</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=rtpmap:102 SPEEX/16000</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=rtpmap:101 telephone-event/16000</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=fmtp:101 0-16</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=rtpmap:13 CN/16000</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=ptime:20</div></div><div class=""><div class="">c5439be6-10e0-431b-b5e3-7904a14a37c0 a=sendrecv</div></div></blockquote><div class=""><br class=""></div><div class="">Asterisk can’t recognize these codecs, and it turned into a failure.</div><div class=""><br class=""></div><div class="">So what happened in the codec negotiation, and how could I let PCMU enabled?</div><div class=""><br class=""></div><div class="">PS. I had pasted some setting file and hope it helps.</div><div class=""><br class=""></div><div class="">Vars.xml:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">…</div><div class=""><div class=""> <X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA,GSM,speex@8000h@20i,speex@16000h@20i,VP8,H264,H263-1998"/></div></div><div class=""><div class=""> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM,speex@8000h@20i,speex@16000h@20i”/></div></div><div class="">…</div></blockquote><div class=""><br class=""></div><div class="">Sip_profiles/external.xml:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">…</div><div class=""><div class=""> <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/></div></div><div class=""><div class=""> <param name="outbound-codec-prefs" value="$${outbound_codec_prefs}”/></div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class=""> <param name="inbound-codec-negotiation" value=“generous"/></div></div><div class=""><div class=""> <param name="nonce-ttl" value="60"/></div></div><div class=""><div class=""> <param name="auth-calls" value="false"/></div></div><div class=""><div class=""> <param name="inbound-late-negotiation" value="true"/></div></div><div class=""><div class=""> <param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) --></div></div><div class="">…</div></blockquote><div class=""><br class=""></div><div class="">Regards.</div></body></html>