<div dir="ltr"><div><div>Hello!<br><br></div>There are some issue (or not???) in mod_sofia module.<br><br></div>You can reproduce this issue by holding call via 0.0.0.0 SDP:<br><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">v=0 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">o=OneXS 99765105 2 IN IP4 87.237.24.14 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">s=- </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">c=IN IP4 0.0.0.0 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">t=0 0 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">m=audio 49760 RTP/AVP 8 101 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=fmtp:101 0-15 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=rtpmap:101 telephone-event/8000 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=inactive </span></p>
<p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt"><br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt">and unholding via invite without SDP. <br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt"><br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt">In version 7a77e0b (branch v1.6) place of errorneus (as I think) code is near:</p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt"> 7641             if (switch_channel_var_true(channel, "sip_unhold_nosdp")) {<br> 7642                 switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, "sendrecv",<br> 7643                                                 zstr(tech_pvt->mparams.local_sdp_str) || !switch_channel_test_flag(channel, CF_PROXY_MODE));<br> 7644             } else {<br> 7645                 switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL,<br> 7646                                             zstr(tech_pvt->mparams.local_sdp_str) || !switch_channel_test_flag(channel, CF_PROXY_MODE));<br> 7647             }<br> 7648<br> 7649             if (zstr(tech_pvt->mparams.local_sdp_str)) {<br> 7650                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot find a SDP\n");<br> 7651                 switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);<br> 7652             } else {<br> 7653                 if (sofia_use_soa(tech_pvt)) {<br> 7654                 <b>switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, tech_pvt->mparams.local_sdp_str); // This is my add</b><br> 7655                     nua_respond(tech_pvt->nh, SIP_200_OK,<br> 7656                                 SIPTAG_CONTACT_STR(tech_pvt->reply_contact),<br> 7657                                 SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),<br> 7658                                 SOATAG_REUSE_REJECTED(1),<br> 7659                                 SOATAG_AUDIO_AUX("cn telephone-event"),<br> 7660                                 TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());<br> 7661                 } else {<br> 7662                     nua_respond(tech_pvt->nh, SIP_200_OK,<br> 7663                                 NUTAG_MEDIA_ENABLE(0),<br> 7664                                 SIPTAG_CONTACT_STR(tech_pvt->reply_contact),<br> 7665                                 SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());<br> 7666                 }<br> 7667             }<br><br><br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt">In described situation code flow go throw line 7654 and post to nua_respond correct SDP (with correct c=IN IP4 re.al.ip.addr and a=sendrecv):</p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt">2017-07-24 11:00:54.252668 [WARNING] sofia.c:7654 v=0<br>o=Sipean 1500875192 1500875195 IN IP4 x.x.x.x:<br>s=Sipean<br>c=IN IP4 x.x.x.x<br>t=0 0<br>m=audio 11642 RTP/AVP 8 101<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:101 telephone-event/8000<br>a=fmtp:101 0-16<br>a=ptime:20<br>a=sendrecv<br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt"><br></p><p style="margin:0px;text-indent:0px;font-family:"Consolas";font-size:10pt">sofia library sends SDP:</p><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">v=0 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">o=Sipean 1500875192 1500875195 IN IP4 x.x.x.x </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">s=Sipean </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">c=IN IP4 x.x.x.x </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">t=0 0 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">m=audio 11642 RTP/AVP 8 101 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=rtpmap:8 PCMA/8000 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=rtpmap:101 telephone-event/8000 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=fmtp:101 0-16 </span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">a=ptime:20 <br></span></p><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt"><br></span></p><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">On SIP client side call in unholded state, but at FreeSWITCH side it is still in HOLDED state<br></span></p><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt"><br></span></p><p style="margin:0px;text-indent:0px"><span style="font-family:"Consolas";font-size:10pt">I have experimented with nua_respond, but maximum result is a correct call state on SIP client side (holded), but not unholding the line. Where should I search for errors? Or this scenario can't work correct?<br></span></p></div>