No, it seems rtps are NOT flowing through mediaproxy... what am I doing wrong? I'm trying to force ALL calls through the mediasproxy, here's me openser.cfg:<br><br><br>#<br># $Id: openser.cfg 1676 2007-02-21 13:16:34Z bogdan_iancu $<br>
#<br># simple quick-start config script<br># Please refer to the Core CookBook at <a href="http://www.openser.org/dokuwiki/doku.php">http://www.openser.org/dokuwiki/doku.php</a><br># for a explanation of possible statements, functions and parameters.<br>
#<br><br># ----------- global configuration parameters ------------------------<br><br>debug=4 # debug level (cmd line: -dddddddddd)<br>fork=yes<br>log_stderror=no # (cmd line: -E)<br>children=10<br>port=5060<br>
listen=<a href="http://MY.OPENSER.IP.COM">MY.OPENSER.IP.COM</a><br>disable_dns_blacklist=true<br><br># ------------------ module loading ----------------------------------<br>#set module path<br>mpath="//lib/openser/modules/"<br>
<br># Uncomment this if you want to use SQL database<br>#loadmodule "mysql.so"<br><br>loadmodule "mysql.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 "textops.so"<br>loadmodule "uri.so"<br>loadmodule "uri_db.so"<br>loadmodule "domain.so"<br>
loadmodule "permissions.so"<br>#loadmodule "group.so"<br>loadmodule "mi_fifo.so"<br>loadmodule "lcr.so"<br>loadmodule "avpops.so"<br>loadmodule "xlog.so"<br>loadmodule "nathelper.so"<br>
loadmodule "mediaproxy.so"<br>loadmodule "acc.so"<br><br># Uncomment this if you want digest authentication<br># mysql.so must be loaded !<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>
<br># ----------------- setting module-specific parameters ---------------<br><br>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")<br><br>modparam("registrar", "received_avp", "$avp(i:42)")<br>
<br>modparam("usrloc", "db_mode", 2)<br>modparam("usrloc", "nat_bflag", 4) <br><br>modparam("auth_db", "calculate_ha1", 1)<br>modparam("auth_db", "password_column", "password")<br>
<br>modparam("rr", "enable_full_lr", 1)<br><br>#modparam("auth_db|permissions|uri_db|usrloc","db_url","mysql://openser:openserrw@localhost/openser")<br>modparam("auth_db|permissions|usrloc|uri_db|domain|lcr|avpops|avp_url","db_url","mysql://openser:password@localhost/openser")<br>
<br>modparam("permissions", "db_mode", 1)<br>modparam("permissions", "trusted_table", "trusted")<br><br>modparam("avpops", "avp_table", "usr_preferences")<br>
<br>modparam("nathelper","rtpproxy_sock", "")<br>modparam("nathelper","natping_interval", 0)<br>modparam("nathelper","received_avp", "$avp(i:42)")<br>
<br>modparam("mediaproxy","natping_interval",20)<br>modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy/mediaproxy.sock")<br>modparam("mediaproxy","sip_asymmetrics","/etc/openser/sip-clients")<br>
modparam("mediaproxy","rtp_asymmetrics","/ect/openser/rtp-clients")<br><br>modparam("lcr", "contact_avp", "$avp(i:711)")<br>modparam("lcr|tm", "fr_inv_timer_avp", "$avp(i:704)")<br>
modparam("lcr", "gw_uri_avp", "$avp(i:709)")<br>modparam("^auth$|lcr", "rpid_avp", "$avp(i:302)")<br>modparam("lcr", "ruri_user_avp", "$avp(i:500)")<br>
modparam("lcr", "dm_flag", 25)<br><br>modparam("acc", "radius_config", "/etc/radiusclient-ng/radiusclient.conf")<br>modparam("acc", "radius_flag", 2)<br>
modparam("acc", "radius_missed_flag", 3)<br>modparam("acc", "radius_extra", "User-Name=$Au;Calling-Station-Id=$from;Called-Station-Id=$to;Sip-Translated-Request-URI=$ruri;Sip-RPid=$avp(s:rpid);Source-IP=$si;Source-Port=$sp;Canonical-URI=$avp(s:can_uri);Billing-Party=$avp(s:billing_party);Divert-Reason=$avp(s:divert_reason);X-RTP-Stat=$hdr(X-RTP-Stat);Contact=$hdr(contact);Event=$hdr(event);SIP-Proxy-IP=$avp(s:sip_proxy_ip);ENUM-TLD=$avp(s:enum_tld)")<br>
# ------------------------- request routing logic -------------------<br><br># main routing logic<br><br>route{<br><br> #<br> # -- 1 -- Request Validation <br> #<br> if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br> exit;<br> };<br><br> if (msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> exit;<br>
};<br><br> #<br> # -- 2 -- Routing Preprocessing<br> #<br> ## Record-route all except Register<br> ## Mark packets with nat=yes<br> ## This mark will be used to identify the request in the loose <br>
## route section<br># if(!is_method("REGISTER")){<br># if(nat_uac_test("19")){<br> record_route(";nat=yes");<br># } else {<br># record_route();<br># };<br>
# };<br><br> ##Loose_route packets<br> if (has_totag()) {<br> #sequential request withing a dialog should<br> # take the path determined by record-routing<br> if (loose_route()) {<br> if(method=="BYE") {<br>
#Account BYE transactions<br> setflag(2);<br> };<br><br> #Check authentication of re-invites<br> if(method=="INVITE" && (!allow_trusted())) { <br>
if (!proxy_authorize("","subscriber")) {<br> proxy_challenge("","1");<br> exit;<br> } else if (!check_from()) {<br> sl_send_reply("403", "Forbidden, use From=ID");<br>
exit;<br> };<br> };<br> if(method=="BYE" || method=="CANCEL") {<br> end_media_session();<br> };<br> ##Detect requests in the dialog behind NAT and flag with 6<br>
# if(nat_uac_test("19") || search("^Route:.*;nat=yes")){<br> append_hf("P-hint: LR|fixcontact,setflag6\r\n");<br> fix_contact();<br> setbflag(6);<br>
# };<br> route(1);<br> } else {<br> sl_send_reply("404","Not here");<br> }<br> exit;<br> }<br><br> #CANCEL processing<br> if (is_method("CANCEL")) {<br>
if (t_check_trans()) {<br> end_media_session(); <br> t_relay();<br> }; <br> exit;<br> }<br><br> t_check_trans();<br> # <br> # -- 3 -- Determine Request Target<br>
#<br> if (method=="REGISTER") {<br> route(2);<br> } else {<br> route(3);<br> };<br>}<br><br><br>route[1] {<br> #<br> # -- 4 -- Forward request to target<br> #<br> # Forward statefully<br>
t_on_reply("1");<br> t_on_failure("1");<br> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}<br><br>route[2] {<br> ## Register request handler<br> if (is_uri_host_local()) {<br>
if (!www_authorize("", "subscriber")) {<br> www_challenge("", "1");<br> exit;<br> };<br><br> if (!check_to()) {<br> sl_send_reply("403", "Forbidden");<br>
exit;<br> };<br><br># if(!search("^Contact:[ ]*\*") && client_nat_test("7")) {<br> setbflag(6);<br> fix_nated_register();<br> force_rport();<br>
# };<br> save("location");<br> exit;<br><br> } else if {<br><br> sl_send_reply("403", "Forbidden");<br><br> };<br>}<br><br>route[3] {<br> ## Requests handler <br>
<br> if (method=="INVITE") {<br> # Account INVITE packets<br> setflag(2);<br> # Account Missed calls<br> setflag(3);<br> # Radius Extra<br> $avp(s:sip_proxy_ip)="<a href="http://MY.OPENSER.IP.COM">MY.OPENSER.IP.COM</a>";<br>
};<br><br> if (is_from_local()){<br> # From an internal domain -> check the credentials and the FROM<br> if(!allow_trusted()){<br> if (!proxy_authorize("","subscriber")) {<br>
proxy_challenge("","0");<br> exit;<br> } else if(!check_from()) {<br> sl_send_reply("403", "Forbidden, use From=ID");<br> exit;<br>
}; <br> };<br><br># if (client_nat_test("3")) {<br> append_hf("P-hint: route(3)|setflag7,forcerport,fix_contact\r\n");<br> setbflag(7);<br> force_rport();<br>
fix_contact();<br># };<br><br> #unconditional call forward<br> if(avp_db_load("$ru/username","$avp(s:callfwd)")) {<br> avp_pushto("$ru", "$avp(s:callfwd)");<br>
route(1);<br> exit;<br> }<br> <br> consume_credentials();<br> <br> #verify aliases, if found replace R-URI. <br> lookup("aliases");<br> <br>
if (is_uri_host_local()) {<br> # -- Inbound to Inbound<br> route(10);<br> } else {<br> # -- Inbound to outbound<br> route(11);<br> };<br><br> } else {<br>
<br> #From an external domain ->do not check credentials<br> #Verify aliases, if found replace R-URI. <br> lookup("aliases");<br> if (is_uri_host_local()) {<br> #-- Outbound to inbound<br>
route(12);<br> } else {<br> # -- Outbound to outbound<br> route(13);<br> };<br> };<br>}<br><br>route[4] {<br> # routing to the public network<br> if (!load_gws()) {<br>
sl_send_reply("503", "Unable to load gateways");<br> exit;<br> }<br> <br> if(!next_gw()){<br> sl_send_reply("503", "Unable to find a gateway");<br> exit;<br>
}<br> t_on_failure("2");<br> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}<br><br>route[6] {<br> #<br> # -- NAT handling --<br> #<br> #if (isbflagset(6) || isbflagset(7)) {<br>
append_hf("P-hint: Route[6]: mediaproxy \r\n");<br> use_media_proxy();<br> #};<br>}<br><br>route[10] {<br> #from an internal domain -> inbound<br> #Native SIP destinations are handled using the location table<br>
#Gateway destinations are handled by regular expressions<br> append_hf("P-hint: inbound->inbound \r\n");<br> <br> if (uri=~"^sip:613") { # ECHO TEST<br> route(6);<br> rewritehostport("<a href="http://fwdnat2.pulver.com:5060">fwdnat2.pulver.com:5060</a>");<br>
if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br> };<br><br> if (uri=~"^sip:301") { # ECHO TEST<br> route(6);<br> rewritehostport("<a href="http://blueface.ie">blueface.ie</a>");<br>
if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br> };<br><br>#<br># if (uri=~"^sip:1[2-9][0-9]{9}@") {<br># if (is_user_in("credentials","ld")) {<br>
# strip(1);<br># prefix("+1");<br># route(6);<br># route(4);<br># exit;<br># } else {<br># sl_send_reply("403", "No permissions for long distance");<br>
# exit;<br># };<br># };<br>#<br># if (uri=~"^sip:011[0-9]*@") {<br># if (is_user_in("credentials","int")) {<br># strip(3);<br># prefix("+");<br>
# route(6);<br># route(4);<br># exit;<br># } else {<br># sl_send_reply("403", "No permissions for international calls");<br># };<br># };<br>
<br> if (!lookup("location")) {<br> if (does_uri_exist()) {<br> ## User not registered at this time.<br> ## Use the IP Address of your e-mail server<br> revert_uri();<br>
prefix("u");<br> rewritehostport("<a href="http://192.168.1.171">192.168.1.171</a>"); #Use the IP address of your voicemail server<br> route(6);<br> route(1);<br>
} else {<br> sl_send_reply("404", "Not Found");<br> exit;<br> } <br> sl_send_reply("404", "Not Found");<br> exit;<br> };<br> route(6); <br>
route(1);<br>}<br><br>route[11] {<br> # from an internal domain -> outbound<br> # Simply route the call outbound using DNS search<br> append_hf("P-hint: inbound->outbound \r\n");<br> route(1);<br>
}<br><br>route[12] {<br> # From an external domain -> inbound<br> # Verify aliases, if found replace R-URI.<br> lookup("aliases");<br> if (!lookup("location")) {<br> sl_send_reply("404", "Not Found");<br>
exit;<br> };<br> route(1);<br>}<br><br>route[13] {<br> #From an external domain outbound<br> #we are not accepting these calls<br> append_hf("P-hint: outbound->inbound \r\n");<br>
sl_send_reply("403", "Forbidden");<br> exit;<br>}<br><br>failure_route[1] {<br> ##--<br> ##-- If cancelled, exit. <br> ##--<br> if (t_was_cancelled()) {<br> exit;<br> };<br>
##--<br> ##-- If busy send to the e-mail server, prefix the "b"<br> ##-- character to indicate busy. <br> ##--<br> if (t_check_status("486")) {<br> revert_uri();<br> prefix("b");<br>
rewritehostport("<a href="http://192.168.1.171">192.168.1.171</a>");<br> append_branch();<br> route(1);<br> exit;<br> };<br> ##--<br> ##-- If timeout (408) or unavailable temporarily (480),<br>
##-- prefix the uri with the "u"character to indicate <br> ##-- unanswered and send to the e-mail<br> ##-- sever<br> ##--<br> if (t_check_status("408") || t_check_status("480")) {<br>
revert_uri();<br> prefix("u");<br> rewritehostport("<a href="http://192.168.1.171">192.168.1.171</a>");<br> append_branch();<br> route(1);<br> exit;<br> };<br>
}<br><br>failure_route[2] {<br> if(!next_gw()) {<br> t_reply("503", "Service not available, no more gateways");<br> exit;<br> };<br> t_on_failure("2");<br> t_relay();<br>
}<br><br><br>onreply_route[1] {<br>#<br>#-- On-replay block routing --<br>#<br># if (client_nat_test("1")) {<br> append_hf("P-hint: Onreply-route - fixcontact \r\n");<br> fix_contact();<br>
# };<br><br># if ((isbflagset(6) || isbflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {<br># if (search("^Content-Type:[ ]*application/sdp")) {<br> append_hf("P-hint: onreply_route|usemediaproxy \r\n");<br>
use_media_proxy();<br># };<br># };<br> exit;<br>}<br><br><br><br>I tried commenting out all tests for NAT... but nothing<br><div class="gmail_quote">On Fri, Jun 13, 2008 at 1:34 PM, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yes, I have audio. Attahced is the ngrep<div><div></div><div class="Wj3C7c"><br><br><br><div class="gmail_quote">
On Fri, Jun 13, 2008 at 11:12 AM, Raúl Alexis Betancor Santana <<a href="mailto:rabs@dimension-virtual.com" target="_blank">rabs@dimension-virtual.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Fri, Jun 13, 2008 at 10:27:55AM +0200, David Villasmil wrote:<br>
> That's what I thought. I just setup mediaproxy and making some tests.<br>
> Its working as far a audio is concerned. But all calls have a duration<br>
> of 0 seconds! Even though audio is flowing through mo it does't seem<br>
> to realize it and shows a messgae of "timeout", in this timeout,<br>
> though there's data flowing. But it still sends the STOP to the<br>
> radius.<br>
><br>
> anyone knows why? Has this happen to anyone?<br>
><br>
> thanks a lot.<br>
<br>
</div>A complete ngrep trace would be need to check what it's happening<br>
<br>
Have you audio both ways and still receive the timeout ?<br>
<div><br>
--<br>
Saludos<br>
<br>
Raúl Alexis Betancor Santana<br>
</div>Dimensión Virtual S.L.<br>
<div><div></div><div><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>