<font size="2">Hi,<br>this is my call flow (from client side making the call: <a href="http://192.168.10.224">192.168.10.224</a>):<br><br>The INVITE received by <a href="http://192.168.0.167">192.168.0.167</a> (sent by <a href="http://192.168.10.224">
192.168.10.224</a> and processed by proxy) has SDP body with PRIVATE IP and PORT.<br><br>-----------------------------------------------------------------------------------<br><br><span style="font-weight: bold;"># <a href="http://192.162.10.224">
192.162.10.224</a> ----> PROXY</span><br><br>Request-Line: INVITE sip:franco.callegati@PROXY_IP SIP/2.0<br> Message Header<br> Via: SIP/2.0/UDP <a href="http://192.168.10.224:64244">192.168.10.224:64244</a>;branch=z9hG4bK-d87543-9947ff15e2520b54-1--d87543-
<br> Max-Forwards: 70<br> Contact: <sip:daniel.grotti@192.168.10.224:64244><br> To: "franco.callegati"<sip:franco.callegati@PROXY_IP><br> From: "casa"<sip:daniel.grotti@PROXY
_IP>;tag=4554424c<br> Call-ID: YjRmZjU3ODAwMjIxMDU0MDUwNDllYzUwNmZiYTJjMmE.<br> CSeq: 2 INVITE<br> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO<br> Content-Type: application/sdp
<br> Proxy-Authorization: Digest username="1000",realm="PROXY_IP",nonce="47593c9fa32034a66fdb7493ff499c7215d4d8db",uri="sip:franco.callegati@PROXY_IP",response="82d21af18029aa02388869088c3619d2",algorithm=MD5
<br> User-Agent: X-Lite release 1011s stamp 41150<br> Content-Length: 374<br> Message body<br> Session Description Protocol<br> Session Description Protocol Version (v): 0<br> Owner/Creator, Session Id (o): - 8 2 IN IP4
<a href="http://192.168.10.224">192.168.10.224</a><br> Session Name (s): CounterPath X-Lite 3.0<br> Connection Information (c): IN IP4 <a href="http://192.168.10.224">192.168.10.224</a><br> Time Description, active time (t): 0 0
<br> Media Description, name and address (m): audio 53624 RTP/AVP 107 119 100 106 0 105 98 8 101<br> Media Attribute (a): fmtp:101 0-15<br> Media Attribute (a): rtpmap:107 BV32/16000<br> Media Attribute (a): rtpmap:119 BV32-FEC/16000
<br> Media Attribute (a): rtpmap:100 SPEEX/16000<br> Media Attribute (a): rtpmap:106 SPEEX-FEC/16000<br> Media Attribute (a): rtpmap:105 SPEEX-FEC/8000<br> Media Attribute (a): rtpmap:98 iLBC/8000
<br> Media Attribute (a): rtpmap:101 telephone-event/8000<br> Media Attribute (a): sendrecv<br><br><span style="font-weight: bold;"># PROXY -----> <a href="http://192.162.10.224">192.162.10.224</a>
</span><br><br>Status-Line: SIP/2.0 100 Trying<br> Message Header<br> Via: SIP/2.0/UDP <a href="http://192.168.10.224:64244">192.168.10.224:64244</a>;branch=z9hG4bK-d87543-9947ff15e2520b54-1--d87543-;rport=28943;received=
<a href="http://85.18.14.25">85.18.14.25</a><br> To: "franco.callegati"<sip:franco.callegati@PROXY_IP><br> From: "casa"<sip:daniel.grotti@PROXY_IP>;tag=4554424c<br> Call-ID: YjRmZjU3ODAwMjIxMDU0MDUwNDllYzUwNmZiYTJjMmE.
<br> CSeq: 2 INVITE<br> Server: OpenSER (1.3.0-pre1-notls (i386/linux))<br> Content-Length: 0<br><br><span style="font-weight: bold;"># PROXY -----> <a href="http://192.162.10.224">192.162.10.224</a>
</span><br><br>Status-Line: SIP/2.0 180 Ringing<br> Message Header<br> Via: SIP/2.0/UDP <a href="http://192.168.10.224:64244">192.168.10.224:64244</a>;received=<a href="http://85.18.14.25">85.18.14.25</a>;branch=z9hG4bK-d87543-9947ff15e2520b54-1--d87543-;rport=28943
<br> Record-Route: <sip:PROXY_IP:5060;lr;nat=yes;ftag=4554424c><br> Contact: <sip:franco.callegati@85.18.14.25:42214;rinstance=96888d44783df4a0><br> To: "franco.callegati"<sip:
franco.callegati@PROXY_IP>;tag=d06d8b2d<br> From: "casa"<sip:daniel.grotti@PROXY_IP>;tag=4554424c<br> Call-ID: YjRmZjU3ODAwMjIxMDU0MDUwNDllYzUwNmZiYTJjMmE.<br> CSeq: 2 INVITE<br> User-Agent: X-Lite release 1011s stamp 41150
<br> Content-Length: 0<br><br><br><span style="font-weight: bold;"># PROXY -----> <a href="http://192.162.10.224">192.162.10.224</a></span><br><br>Status-Line: SIP/2.0 200 OK<br> Message Header<br> Via: SIP/2.0/UDP
<a href="http://192.168.10.224:64244">192.168.10.224:64244</a>;received=<a href="http://85.18.14.25">85.18.14.25</a>;branch=z9hG4bK-d87543-9947ff15e2520b54-1--d87543-;rport=28943<br> Record-Route: <sip:PROXY_IP:5060;lr;nat=yes;ftag=4554424c>
<br> Contact: <sip:franco.callegati@85.18.14.25:42214;rinstance=96888d44783df4a0><br> To: "franco.callegati"<sip:franco.callegati@PROXY_IP>;tag=d06d8b2d<br> From: "casa"<sip:
daniel.grotti@PROXY_IP>;tag=4554424c<br> Call-ID: YjRmZjU3ODAwMjIxMDU0MDUwNDllYzUwNmZiYTJjMmE.<br> CSeq: 2 INVITE<br> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
<br> Content-Type: application/sdp<br> User-Agent: X-Lite release 1011s stamp 41150<br> Content-Length: 372<br> Message body<br> Session Description Protocol<br> Session Description Protocol Version (v): 0
<br> Owner/Creator, Session Id (o): - 7 2 IN IP4 <a href="http://192.168.0.167">192.168.0.167</a><br> Session Name (s): CounterPath X-Lite 3.0<br> Connection Information (c): IN IP4 <a href="http://192.168.0.167">
192.168.0.167</a><br> Time Description, active time (t): 0 0<br> Media Description, name and address (m): audio 45566 RTP/AVP 107 119 100 106 0 105 98 8 101<br> Media Attribute (a): fmtp:101 0-15
<br> Media Attribute (a): rtpmap:107 BV32/16000<br> Media Attribute (a): rtpmap:119 BV32-FEC/16000<br> Media Attribute (a): rtpmap:100 SPEEX/16000<br> Media Attribute (a): rtpmap:106 SPEEX-FEC/16000
<br> Media Attribute (a): rtpmap:105 SPEEX-FEC/8000<br> Media Attribute (a): rtpmap:98 iLBC/8000<br> Media Attribute (a): rtpmap:101 telephone-event/8000<br> Media Attribute (a): sendrecv
<br><br><span style="font-weight: bold;"><a href="http://192.162.10.224">192.162.10.224</a> ----> PROXY<br><br></span>Request-Line: ACK sip:franco.callegati@85.18.14.25:42214;rinstance=96888d44783df4a0 SIP/2.0<br> Message Header
<br> Via: SIP/2.0/UDP <a href="http://192.168.10.224:64244">192.168.10.224:64244</a>;branch=z9hG4bK-d87543-66641951d8357408-1--d87543-<br> Max-Forwards: 70<br> Route: <sip:PROXY_IP:5060;lr;nat=yes;ftag=4554424c>
<br> Contact: <sip:daniel.grotti@192.168.10.224:64244><br> To: "franco.callegati"<sip:franco.callegati@PROXY_IP>;tag=d06d8b2d<br> From: "casa"<sip:daniel.grotti@PROXY
_IP>;tag=4554424c<br> Call-ID: YjRmZjU3ODAwMjIxMDU0MDUwNDllYzUwNmZiYTJjMmE.<br> CSeq: 2 ACK<br> Proxy-Authorization: Digest username="1000",realm="PROXY_IP",nonce="47593c9fa32034a66fdb7493ff499c7215d4d8db",uri="sip:
franco.callegati@PROXY_IP",response="82d21af18029aa02388869088c3619d2",algorithm=MD5<br> User-Agent: X-Lite release 1011s stamp 41150<br> Content-Length: 0<br><br><br><span style="font-weight: bold;">
RTP STREAM BETWEEN CLIENTS (MEDIAPROXY DOESN'T WORK)<br><br><span style="font-weight: bold;">CALL ENDED</span><br></span><br>----------------------------------------------------------------------------------------------------------------------
<br><br>this is my config file:<br><br>debug=3<br>fork=yes<br>log_stderror=yes<br><br>listen=PROXY_IP<br>port=5060<br>children=4<br><br>dns=no<br>rev_dns=no<br>disable_dns_blacklist=yes<br><br>mpath="/usr/SER_proxy//lib/openser/modules/"
<br><br>#------------------------------------------------------<br># Load Module<br>#------------------------------------------------------<br><br>loadmodule "mysql.so"<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"
<br>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "maxfwd.so"<br>loadmodule "usrloc.so"<br>loadmodule "registrar.so"<br>loadmodule "mi_fifo.so"
<br>loadmodule "uri.so"<br>loadmodule "uri_db.so"<br>loadmodule "domain.so"<br>loadmodule "mediaproxy.so"<br>loadmodule "nathelper.so"<br>loadmodule "textops.so"
<br>loadmodule "xlog.so"<br>loadmodule "cpl-c.so"<br>loadmodule "alias_db.so"<br><br><br>#----------------------------------------------------------<br># Parameters<br>#----------------------------------------------------------
<br><br>modparam("auth_db|uri_db|usrloc|domain|alias_db", "db_url", "mysql://topenser:openserrw@localhost/topenser")<br><br>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
<br><br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br><br>modparam("usrloc", "db_mode", 2)<br>modparam("usrloc", "nat_bflag", 6)
<br><br>modparam("rr", "enable_full_lr", 1)<br><br>modparam("alias_db", "use_domain", 1)<br><br># REGISTRAR MODULE<br>modparam("registrar", "max_contacts", 2) # max number of contacts per URI
<br>modparam("registrar", "append_branches", 0) # if 0: R-URI will be overwritten with the highest-q rated contact and the rest will be left unprocessed.<br>modparam("registrar", "default_q", 1000) # default contacts q-value set as 1
<br>modparam("registrar", "received_avp","$avp(i:42)")<br><br># URI_DB MODULE<br>modparam("uri_db", "use_uri_table", 1) # Specify if the "uri" table should be used for checkings instead of "subscriber" table
<br><br><br># CPL MODULE<br>modparam("cpl-c", "db_url", "mysql://topenser:openserrw@localhost/topenser")<br>modparam("cpl-c", "cpl_table", "cpl")<br>modparam("cpl-c", "cpl_dtd_file", "/usr/src/openser-
1.2.2-notls/modules/cpl-c/cpl-06.dtd")<br>modparam("cpl-c", "lookup_domain", "location")<br>modparam("cpl-c","lookup_append_branches",1)<br>modparam("cpl-c","proxy_route", 10)
<br><br>#NATHELPER MODULE<br>modparam("nathelper", "rtpproxy_disable_tout", 120)<br>modparam("nathelper", "rtpproxy_tout", 2)<br>modparam("nathelper", "natping_interval", 30)
<br>modparam("nathelper", "ping_nated_only", 1)<br>modparam("nathelper", "received_avp", "$avp(i:42)")<br>modparam("nathelper", "sipping_method", "OPTIONS") # Use OPTIONS every 10sec to keep NAT alive
<br>modparam("nathelper", "sipping_bflag", 6)<br>modparam("nathelper", "sipping_from", "sip:PROXY_IP")<br><br>#MEDIAPROXY MODULE<br>modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy.sock")
<br>modparam("mediaproxy", "sip_asymmetrics", "/usr/local/etc/openser/sip-asymmetric-clients")<br>modparam("mediaproxy", "rtp_asymmetrics", "/usr/local/etc/openser/rtp-asymmetric-clients")
<br><br># TM MODULE<br>modparam("tm", "fr_inv_timer", 120)<br><br><br>#------------------------------------------------------------<br>#MAIN ROUTE<br>#-----------------------------------------------------------
<br><br>route {<br> xlog("L_DBG", "INFO: NEW REQUEST - METHOD=$rm R-URI=$ru FROM=$fu TO=$tu IP=$si ID=$ci\n");<br>#------------------------------------<br># Sanity checks<br>#------------------------------------
<br> if (!mf_process_maxfwd_header("10")) <br> { sl_send_reply("483", "Too much Hops");<br> exit;<br> };<br> <br> if (msg:len >= 2048)<br> { sl_send_reply("513", "Message too big");
<br> exit;<br> };<br>#------------------------------------<br># RECORD-ROUTE<br>#------------------------------------ <br><br> if(method=="INVITE" && client_nat_test("7"))
<br> {<br> record_route_preset ("PROXY_IP:5060;nat=yes");<br> xlog("L_DBG", "INFO: RECORD-ROUTE WITH NAT");<br> }<br> else if (method!="REGISTER")
<br> { <br> record_route();<br> };<br><br>#----------------------------------------<br># CALL TEAR DOWN<br>#---------------------------------------- <br> if (method=="BYE")
<br> {<br> end_media_session();<br> };<br> if (method=="CANCEL") <br> {<br> end_media_session();<br> };<br> <br>#--------------------------------------------
<br># LOOSE ROUTE<br>#-------------------------------------------- <br> if (loose_route())<br> { <br> xlog("L_DBG", "INFO: LOOSE ROUTE");<br> if (method=="INVITE")
<br> {<br> if (!proxy_authorize("","subscriber"))<br> { proxy_challenge("","0");<br> exit;<br> }<br> else if (!check_from())
<br> { sl_send_reply("403","Unauthorized");<br> exit;<br> };<br> consume_credentials();<br> <br> if (client_nat_test("7") || search("^Route:.*nat=yes"))
<br> { setbflag(7); <br> use_media_proxy(); <br> };<br> };<br> <br> route(1);<br> exit;<br> };<br>#-------------------------------------------------
<br>#CALL TYPE PROCESSING<br>#-------------------------------------------------<br> if (!uri==myself)<br> { route(1);<br> exit; <br> };<br><br> if (uri==myself) <br> { <br> if (method=="REGISTER")
<br> { xlog("L_DBG", "INFO: REGISTER Message received");<br> route(2);<br> exit;<br> };<br> if (method=="ACK")<br> { route(1);
<br> exit; <br> };<br> if (method=="INVITE")<br> { <br> xlog("L_DBG", "INFO: INVITE Message received");<br> route(3);
<br> exit; <br> };<br> if (method=="MESSAGE")<br> {<br> xlog("L_DBG", "INFO: MESSAGE method received");<br> route(4);<br>
exit;<br> };<br> <br><br> lookup("aliases");<br> if (!uri==myself)<br> { route(1);<br> exit; <br> };<br> <br> if (!lookup("location"))
<br> { sl_send_reply("404", "Destination not found");<br> exit;<br> };<br> <br> };<br><br> route(1);<br>}<br><br>#--------------------------------------------------------
<br># REGISTER PROCESSING <br>#--------------------------------------------------------<br>route[2]<br>{<br># Check credentials<br> <br> if(!www_authorize("","subscriber"))<br> { www_challenge("","0");
<br> exit;<br> }<br> else if(!check_to())<br> { sl_send_reply("401", "Unauthorized");<br> exit;<br> };<br><br> consume_credentials();<br><br># Check client natted - if yes, set flag 6
<br> if (!search("^Contact:[ ]*\*") && client_nat_test("7"))<br> {<br> setbflag(6); <br> xlog("L_DBG","INFO: Registration behind NAT");
<br> xlog("L_DBG","INFO: Bflag 6, related to BRANCH=$T_branch_idx, is setted as $bf"); <br> fix_nated_register(); <br> force_rport(); <br> };
<br> <br> if(!save("location"))<br> { sl_reply_error();<br> xlog("L_DBG", "Registration of [$fU] Failed");<br> };<br> <br> xlog("L_DBG", "INFO: Registration of [$fU] Complete.");
<br> xlog("L_DBG", "INFO: 200 OK has been sended");<br>} <br> <br>#----------------------------------------------------------<br># INVITE PROCESSING <br>#----------------------------------------------------------
<br>route[3]<br>{<br> sl_send_reply("100", "Trying");<br># Check if caller is natted, if yes set flag 7, rewrite Contact HF with Proxy address <br> if(client_nat_test("7")) <br> {
<br> setbflag(7);<br> xlog("L_DBG", "INFO: CLIENT INVITE BEHIND NAT");<br> xlog("L_DBG","NOTICE: Bflag 7, related to BRANCH=$T_branch_idx of this INVITE, is setted as $bf");
<br> if(force_rport())<br> {<br> xlog("L_DBG","INFO: rport FORCED"); <br> };<br> if(fix_nated_contact())<br> {<br>
xlog("L_DBG","INFO: Contact HF is now [$ct]");<br> };<br> # append_hf("P-hint: INVITE behind NAT \n");<br> };<br># Check Credentials<br><br> if(!proxy_authorize("","subscriber"))
<br> { proxy_challenge("","0");<br> exit;<br> }<br><br> else if (!check_from())<br> { sl_send_reply("403", "Unauthorized");<br> exit;<br> };
<br> <br> lookup("aliases");<br> if(uri!=myself)<br> { route(1);<br> exit;<br> };<br><br> consume_credentials(); <br> <br># Check if r-URI is an alias. If yes, rewrite RURI with User's URI
<br> if(!alias_db_lookup("dbaliases"))<br> {<br> xlog("L_DBG", "The [$ru] is not an alias");<br> };<br> <br># Use Caller CPL "Outgoing" Script, if exist
<br><br> if(!cpl_run_script("outgoing", "force_stateful"))<br> {<br> sl_send_reply("500","Outgoing CPL script execution failed");<br> exit;
<br> };<br># Find destination user and re-write R-URI with its Contact <br> <br> if (!lookup("location"))<br> { sl_send_reply("404", "Destination not found");
<br> exit;<br> };<br> <br> xlog("L_DBG", "INFO: LOCATION HAS BEEN FOUND");<br> xlog("L_DBG","INFO: R-URI is now [$ru]");<br> <br> t_on_reply("1");
<br><br># Use CPL "Incoming" script of the destination client<br> if(!cpl_run_script("incoming","force_stateful"))<br> {<br> sl_send_reply("500", "Incoming CPL script execution failed");
<br> exit; <br> };<br> route(11);<br> route(1);<br>}<br><br><br># --------------------------------<br># PROXY ROUTE - CPL SCRIPT LOADED<br># --------------------------------<br>route[10]
<br>{<br> xlog("L_DBG", "INFO: ROUTE 10 - PROXY ROUTE \n");<br># append_hf("P-hint: CPL ROUTE 10 - PROXY-ROUTE\n");<br> if (isbflagset(6) || isbflagset(7))<br> {<br> xlog("L_DBG", "INFO: flag 6 or 7 setted \n");
<br> if(!isbflagset(8)) <br> { <br> setbflag(8);<br> };<br> if(use_media_proxy())<br> {<br> xlog("L_DBG","NOTICE: MEDIAPROXY in use for the CALLER!!");
<br># append_hf("P-hint: Mediaproxy in USE for the Caller\n"); <br> };<br> };<br>}<br># -----------------------------<br># CONTROL FLAG - NO CPL SCRIPT<br># -----------------------------
<br>route[11]<br>{<br> xlog("L_DBG", "INFO: ROUTE 11 - NO CPL SCRIPT");<br># append_hf("P-hint: ROUTE 11 \n");<br> if(isbflagset(6) || isbflagset(7))<br> { <br>
xlog("L_DBG", "INFO: flag 6 or 7 setted");<br> if(!isbflagset(8))<br> {<br> setbflag(8);<br> }; <br> if(use_media_proxy())
<br> {<br> xlog("L_DBG","NOTICE: mediaproxy in use for the caller!!");<br># append_hf("P-hint: MEDIAPROXY in USE for the CALLER\n");
<br> };<br> };<br>}<br><br># --------------------------------------------------<br># MESSAGE PROCESSING<br># --------------------------------------------------<br>route[4]<br>{<br> if (uri!=myself)
<br> { sl_send_reply ("403", "Forbidden");<br> exit;<br> };<br> if (!lookup("location"))<br> { sl_send_reply("404", "Destination not found");
<br> exit;<br> };<br> route(1);<br>}<br><br>#----------------------------------------------------<br># RELEY ROUTE<br>#----------------------------------------------------<br>route[1]<br>
{<br> if (!t_relay("0x01")) # don't send 100 trying<br> {<br> if (method=="INVITE" || method=="ACK")<br> {<br> end_media_session();
<br> xlog("L_DBG","INFO: MEDIA SESSION ENDED"); <br> };<br><br> sl_reply_error();<br> xlog("L_DBG", "INFO: SENT ERROR REPLY");
<br> };<br>}<br><br>#---------------------------------------------------------------------<br># On Reply Route<br>#---------------------------------------------------------------------<br><br>onreply_route[1]
<br>{<br> xlog("L_DBG","INFO : ONREPLY ROUTE");<br># append_hf("P-hint: ONREPLY ROUTE \n");<br> if (status=~"(180)|(183)|2[0-9][0-9]")<br> {<br> if (isbflagset(8) && !search("^Content-Lenght:[ ]*0"))
<br> {<br><br> if(use_media_proxy())<br> {<br> xlog("L_DBG","INFO: MEDIAPROXY in use for the CALLED!");<br># append_hf("P-hint: Media Proxy in use for the Callee!\n");
<br> };<br> };<br> };<br> if (client_nat_test("7") && status=~"(180)|(183)|(200)")<br> {<br> fix_nated_contact();<br>
<br> xlog("L_DBG","INFO: CONTACT HF has been CHANGED");<br># append_hf("P-hint: CALLEE'S CONTACT HF has benn CHANGED\n"); <br> <br> };<br>}<br><br>----------------------------------------------------------------------------------------------------------------------
<br><br><br><br><br>Regards,<br>Daniel<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>Hi Daniel,<br>
<br>
Can u post your openser configuration as well as a complete ngrep<br>
trace for the calls you have problems with?<br>
<br>
DanB<br><br><br clear="all"></font><br>-- <br>Daniel Grotti<br>________________________<br>e-mail : <a href="mailto:d.grotti@gmail.com">d.grotti@gmail.com</a>