<div dir="ltr"><div>I have installed kamailio 5.1.4 version in ubuntu server. I need to route RTP packets through kamailio with SIP packets. I will explain the way i have set up everything.</div><div><br></div><div>I have installed rtpproxy by apt-get install rtpproxy.</div><div><br></div><div>i have edited "/etc/default/rtpproxy" file with the line 'EXTRA_OPTS="-F -s udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a> -l  34.201.122.249   -d DBUG:LOG_LOCAL0"'</div><div><br></div><div>i have edited "/etc/init.d/rtpproxy" file as follows,</div><div>DAEMON=/usr/bin/$NAME</div><div>PIDFILE="/run/$NAME/$NAME.pid</div><div><br></div><div><br></div><div>I have provided "#!define WITH_NAT" and "modparam("rtpproxy", "rtpproxy_sock", "udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>")" in my cfg file.</div><div><br></div><div>started rtpproxy "service rtpproxy start"</div><div><br></div><div>when i try "netstat -tulpn | grep rtp" it shows </div><div>udp        0      0 <a href="http://127.0.0.1:7722">127.0.0.1:7722</a>          0.0.0.0:*                           1437/rtpproxy</div><div><br></div><div><br></div><div>So i think the rtpproxy is currently running fine.</div><div><br></div><div><br></div><div>Now we can go to kamailio part.  </div><div><br></div><div>I have gone through the document "<a href="https://www.kamailio.org/docs/modules/5.0.x/modules/rtpproxy.html">https://www.kamailio.org/docs/modules/5.0.x/modules/rtpproxy.html</a>" to set up rtpproxy in the cfg file.</div><div><br></div><div>checking the rtp ports "kamcmd rtpproxy.list" showing</div><div>{</div><div>        setid: 0</div><div>        url: udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a></div><div>        index: 0</div><div>        disabled: 0</div><div>        weight: 1</div><div>        recheck: 0</div><div>}</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>I have enabled rtp proxy using "kamcmd rtpproxy.enable udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>     1".</div><div><br></div><div>So i think ports are ready for rtp proxy.</div><div><br></div><div>Now i will explain the call flow. I have enabled log using L_BUG.</div><div><br></div><div>when i try a call from hangout number through my twilio trunk to my asterisk freepbx extension, </div><div>set_rtp_proxy_set("1"); giving true value. But  rtpproxy_offer(); giving -1 as result. syslog shows some errors like below,</div><div>Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: DBUG:handle_command: received command "1934_4 Uc0,8,3,111,9,101 52001b5b71435b1c5392b39f2f6c975b@asterisk_ip:5060 asterisk_ip 14540 as4083c85f;1"</div><div>Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: INFO:handle_command: new session 52001b5b71435b1c5392b39f2f6c975b@asterisk_ip:5060, tag as4083c85f;1 requested, type strong</div><div>Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:create_twinlistener: can't bind to the IPv4 port 47926: Cannot assign requested address</div><div>Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:handle_command: can't create listener</div><div>Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: DBUG:doreply: sending reply "1934_4 E10#012"</div><div><br></div><div> And also my header is not changed. As a result actuall rtp is going end to end between asterisk and twilio not through kamailio. Please help me with the details.</div></div>