<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Since your asterisk server is in the cloud, make sure the relevant udp audio port range is open to the telecoms carrier.<div class=""><br class=""></div><div class="">It is possible that your firewall/security group setup allows an incoming reply on a port when something first goes out on that port which can explain why audio works in one direction but not the other.</div><div class=""><br class=""></div><div class="">Blessings,</div><div class="">—</div><div class="">Daniel</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 11 May 2021, at 10:14, Kashish Raheja <<a href="mailto:kashishraheja1809@gmail.com" class="">kashishraheja1809@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><span class="gmail-im" style="color:rgb(80,0,80)">This is how it looks:<br class=""><br class=""><ul class=""><li style="margin-left:15px" class="">Asterisk is running on Cloud having a public IP (3.236.X.X)</li><li style="margin-left:15px" class="">Kamailio is running on a Physical server having 2 NIC ports.</li><ul class=""><li style="margin-left:15px" class="">One of them is connected to the SIP trunk and this NIC port local IP is 10.0.87.X. We register to the SBC server (10.0.76.X) of telecom operator carrier through this port.</li><li style="margin-left:15px" class="">Second NIC port is connected to ILL for internet connection having local IP as 192.168.0.192 and public IP as 14.X.X.X</li></ul><li style="margin-left:15px" class="">To make an outbound call, Asterisk Server (3.236.X.X) sends the call to Kamailio server on public IP (14.X.X.X) and in turn Kamailio server sends the call to telecom operator SBC (10.0.76.X) through 10.0.87.X port.</li></ul></span><div class="">Here is the diagram:</div><div class=""><br class=""></div></div><div dir="ltr" class=""><div class=""><div class="gmail-adm" style="margin:5px 0px"><div id="gmail-q_1619" class="gmail-ajR gmail-h4" style="background-color:rgb(232,234,237);border:none;clear:both;line-height:6px;outline:none;width:24px;color:rgb(80,0,80);font-size:11px;border-radius:5.5px"><div class="gmail-ajT" style="background:url("https://www.gstatic.com/images/icons/material/system/2x/more_horiz_black_20dp.png") 50% 50%/20px no-repeat;height:11px;opacity:0.7;width:24px"></div></div></div><div class="gmail-im" style="color:rgb(80,0,80)"><pre style="white-space:pre-wrap;color:rgb(51,51,51);margin-top:0px;margin-bottom:0px;line-height:16.25px" class="">              <a href="http://3.236.72.101:5060/" target="_blank" class="">3.236.72.101:5060</a>             <a href="http://192.168.0.192:5060/" target="_blank" class="">192.168.0.192:5060</a>             <a href="http://10.0.87.230:5060/" target="_blank" class="">10.0.87.230:5060</a>               <a href="http://10.0.76.9:5060/" target="_blank" class="">10.0.76.9:5060</a>  
            ──────────┬─────────          ──────────┬─────────          ──────────┬─────────          ──────────┬─────────
    20:24:11.644416   │        INVITE (SDP)         │                             │                             │         
          +0.000585   │ ──────────────────────────> │                             │                             │         
    20:24:11.645001   │  100 trying -- your call is │                             │                             │         
          +0.000235   │ <────────────────────────── │                             │                             │         
    20:24:11.645236   │                             │                             │        INVITE (SDP)         │         
          +0.005768   │                             │                             │ ──────────────────────────> │         
    20:24:11.651004   │                             │                             │         100 Trying          │         
          +0.580627   │                             │                             │ <────────────────────────── │         
    20:24:12.231631   │                             │                             │  183 Session Progress (SDP) │         
          +0.000159   │                             │                             │ <────────────────────────── │         
    20:24:12.231790   │  183 Session Progress (SDP) │                             │                             │         
          +1.932655   │ <────────────────────────── │                             │                             │         
    20:24:14.164445   │                             │                             │         180 Ringing         │         
          +0.000204   │                             │                             │ <────────────────────────── │         
    20:24:14.164649   │         180 Ringing         │                             │                             │         
          +3.631157   │ <────────────────────────── │                             │                             │         
    20:24:17.795806   │                             │                             │        200 OK (SDP)         │         
          +0.000361   │                             │                             │ <────────────────────────── │         
    20:24:17.796167   │        200 OK (SDP)         │                             │                             │         
          +0.233102   │ <────────────────────────── │                             │                             │         
    20:24:18.029269   │             ACK             │                             │                             │         
          +0.000385   │ ──────────────────────────> │                             │                             │         
    20:24:18.029654   │                             │                             │             ACK             │         
         +11.647190   │                             │                             │ ──────────────────────────> │         
    20:24:29.676844   │                             │                             │             BYE             │         
          +0.000605   │                             │                             │ <────────────────────────── │         
    20:24:29.677449   │             BYE             │                             │                             │         
          +0.236993   │ <────────────────────────── │                             │                             │         
    20:24:29.914442   │           200 OK            │                             │                             │         
          +0.000225   │ ──────────────────────────> │                             │                             │         
    20:24:29.914667   │                             │                             │           200 OK            │         
                      │                             │                             │ ──────────────────────────> │          </pre></div></div><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Thanks.</div><div class="">Regards</div><div class="">Kashish</div></div></div></div></div></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 8:26 PM Kashish Raheja <<a href="mailto:kashishraheja1809@gmail.com" class="">kashishraheja1809@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Yes, the telecom operator is on the private network. 10.0.X.X is the SBC IP of the telecom operator to which we register. 10.0.X.X is reachable only through the second network interface. The complete flow is given below:<div class=""><br class=""></div><div class=""></div><div class=""><br class=""></div><div class="">Here 3.236.72.101 is Asterisk Server, 192.168.0.192 is local first network interface IP, 10.0.87.230 is second network interface IP and 10.0.76.9 is telecom operator SBC IP to which we do SIP register.</div><div class=""><br class=""></div><div class="">We are running the rtpproxy on local IP (192.168.0.192) in the following way:</div><div class=""><br class=""></div><div class=""><b class="">rtpproxy -F -p /var/run/rtpproxy.pid -u asterisk -l 192.168.0.192 -s udp:localhost:7722</b><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks.<br class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Regards</div><div class="">Kashish<br class=""></div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 4:04 PM Kashish Raheja <<a href="mailto:kashishraheja1809@gmail.com" target="_blank" class="">kashishraheja1809@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Here are the SIP Traces:<div class=""><br class=""></div><div class=""><b class="">Asterisk Server to Kamailio Server (SDP Packet):</b></div><div class=""><br class=""></div><div class="">2021/05/10 15:54:52.835255 10.0.X.X:5060 -> 10.0.X.X:5060<br class="">SIP/2.0 200 OK<br class="">Via: SIP/2.0/UDP 192.168.0.192;branch=z9hG4bK2599.de1bcd2ba5f8bfc86afb083b0a9e3f65.0;received=10.0.X.X;rport=5060,SIP/2.0/UDP 3.236.X.X:5060;branch=z9hG4bK5a69547a;received=3.236.X.X;rport=5060<br class="">Record-Route: <<a href="sip:192.168.0.192;lr;ftag=as2b21d944" class="">sip:192.168.0.192;lr;ftag=as2b21d944</a>><br class="">Call-ID: <a href="mailto:58eb00885daef7ff3a67ad0e235e817a@14.98.22.110" target="_blank" class="">58eb00885daef7ff3a67ad0e235e817a@14.98.22.110</a><br class="">From: <<a href="sip:68XXXXX@10.0.X.X" class="">sip:68XXXXX@10.0.X.X</a>>;tag=as2b21d944<br class="">To: <<a href="http://sip:09413745250@192.168.0.192:5060/" target="_blank" class="">sip:09413745250@192.168.0.192:5060</a>>;tag=aa2c806-Huku2c07186a1<br class="">CSeq: 102 INVITE<br class="">Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE<br class="">Contact: <<a href="sip:09413745250@10.0.X.X:5060;Hpt=8e72_16;CxtId=3;TRC=ffffffff-ffffffff" class="">sip:09413745250@10.0.X.X:5060;Hpt=8e72_16;CxtId=3;TRC=ffffffff-ffffffff</a>><br class="">User-Agent: ZTE Softswitch/1.0.0<br class="">Require: timer<br class="">Session-Expires: 7200;refresher=uac<br class="">Content-Length: 182<br class="">Content-Type: application/sdp<br class=""><br class="">v=0<br class="">o=- 1936 20890 IN IP4 10.0.X.X<br class="">s=SBC call<br class="">c=IN IP4 10.0.X.X<br class="">t=0 0<br class="">m=audio 37874 RTP/AVP 8 101<br class="">a=rtpmap:101 telephone-event/8000<br class="">a=fmtp:101 0-15<br class="">a=rtpmap:8 PCMA/8000/1<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Kamailio Server to Telecom Operator Carrier (SDP Packet):</b></div><div class=""><br class=""></div><div class="">2021/05/10 15:54:52.835419 <a href="http://192.168.0.192:5060/" target="_blank" class="">192.168.0.192:5060</a> -> 3.X.X.X:5060<br class="">SIP/2.0 200 OK<br class="">Via: SIP/2.0/UDP 3.236.72.101:5060;branch=z9hG4bK5a69547a;received=3.236.72.101;rport=5060<br class="">Record-Route: <<a href="sip:192.168.0.192;lr;ftag=as2b21d944" class="">sip:192.168.0.192;lr;ftag=as2b21d944</a>><br class="">Call-ID: <a href="mailto:58eb00885daef7ff3a67ad0e235e817a@14.98.22.110" target="_blank" class="">58eb00885daef7ff3a67ad0e235e817a@14.98.22.110</a><br class="">From: <<a href="sip:68XXXXX@10.0.X.X" class="">sip:68XXXXX@10.0.X.X</a>>;tag=as2b21d944<br class="">To: <<a href="http://sip:09413745250@192.168.0.192:5060/" target="_blank" class="">sip:09413745250@192.168.0.192:5060</a>>;tag=aa2c806-Huku2c07186a1<br class="">CSeq: 102 INVITE<br class="">Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE<br class="">Contact: <<a href="sip:09413745250@10.0.X.X:5060;Hpt=8e72_16;CxtId=3;TRC=ffffffff-ffffffff" class="">sip:09413745250@10.0.X.X:5060;Hpt=8e72_16;CxtId=3;TRC=ffffffff-ffffffff</a>><br class="">User-Agent: ZTE Softswitch/1.0.0<br class="">Require: timer<br class="">Session-Expires: 7200;refresher=uac<br class="">Content-Length: 182<br class="">Content-Type: application/sdp<br class=""><br class="">v=0<br class="">o=- 1936 20890 IN IP4 10.0.X.X<br class="">s=SBC call<br class="">c=IN IP4 10.0.X.X<br class="">t=0 0<br class="">m=audio 37874 RTP/AVP 8 101<br class="">a=rtpmap:101 telephone-event/8000<br class="">a=fmtp:101 0-15<br class="">a=rtpmap:8 PCMA/8000/1<br class=""></div><div class=""><br class=""></div><div class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Regards</div><div class="">Kashish</div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 2:37 PM Kashish Raheja <<a href="mailto:kashishraheja1809@gmail.com" target="_blank" class="">kashishraheja1809@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Hi All,<div class=""><br class=""></div><div class="">I have set up Kamailio in the following manner:</div><div class=""><br class=""></div><div class="">Kamailio (Physical Server: Register to Telecom Operator Carrier SIP trunk) ---> Asterisk Server (on Cloud having public IP)</div><div class=""><br class=""></div><div class="">I am successfully able to route the call to Asterisk server on Cloud when I make a call to the number provided by the carrier and there is audio also on both sides.</div><div class=""><br class=""></div><div class="">However, when I am making an outbound call from Asterisk server to the number through Kamailio, there is no audio when I pick up the call. I have tried to capture the traces but not able to understand the exact problem here.</div><div class=""><br class=""></div><div class="">Note: I am running the RTP proxy on Kamailio server.</div><div class=""><br class=""></div><div class="">Any help on why this might be happening?</div><div class=""><br class=""></div><div class="">Thanks.<br clear="all" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">Regards</div><div class="">Kashish</div><div class="">+919413745250</div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
__________________________________________________________<br class="">Kamailio - Users Mailing List - Non Commercial Discussions<br class="">  * <a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">Important: keep the mailing list in the recipients, do not reply only to the sender!<br class="">Edit mailing list options or unsubscribe:<br class="">  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class=""></div></blockquote></div><br class=""></div></div></body></html>