Hello, I'm trying to implement mediaproxy with my openser. I'm getting this error:<br><br>local /usr/local/sbin/openser[2781]: error: use_media_proxy(): invalid port returned by mediaproxy: #<br><br>I've forwarded all ports that are required. I'm having problems with sip2sip (no audio).<br><br>Also, for SIP to PSTN, I'm having problems too.<br>The call goes through the PSTN gateway and actually connects. However, its still one way audio or sometimes no audio at all. I'm using FC5 with openser 1.0.1. Mediaproxy 1.7.2. Below are my configuration files for media proxy and openser.cfg:<br><br>**************************************Openser.cfg*********************************<br>debug=3<br>fork=yes<br>log_stderror=no<br><br>listen=192.168.1.5 # This is where OpenSER installed<br>port=5060<br>children=4<br><br>alias=mydomain.com # This is where OpenSER
installed<br><br>dns=no<br>rev_dns=no<br><br>fifo="/tmp/openser_fifo"<br>fifo_db_url="mysql://openser:openserrw@localhost/openser"<br><br>loadmodule "/usr/local/lib/openser/modules/mysql.so"<br>loadmodule "/usr/local/lib/openser/modules/sl.so"<br>loadmodule "/usr/local/lib/openser/modules/tm.so"<br>loadmodule "/usr/local/lib/openser/modules/rr.so"<br>loadmodule "/usr/local/lib/openser/modules/maxfwd.so"<br>loadmodule "/usr/local/lib/openser/modules/usrloc.so"<br>loadmodule "/usr/local/lib/openser/modules/registrar.so"<br>loadmodule "/usr/local/lib/openser/modules/auth.so"<br>loadmodule "/usr/local/lib/openser/modules/auth_db.so"<br>loadmodule "/usr/local/lib/openser/modules/uri.so"<br>loadmodule "/usr/local/lib/openser/modules/uri_db.so"<br>loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"<br>loadmodule "/usr/local/lib/openser/modules/nathelper.so"<br>loadmodule "/usr/local/lib/openser/modules/textops.so"<br>loadmodule
"/usr/local/lib/openser/modules/domain.so"<br>loadmodule "/usr/local/lib/openser/modules/acc.so"<br>loadmodule "/usr/local/lib/openser/modules/xlog.so"<br><br>modparam("auth_db", "calculate_ha1", 1)<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "use_domain", 1)<br><br>modparam("domain", "db_mode", 1)<br><br>modparam("nathelper", "rtpproxy_disable", 1)<br>modparam("nathelper", "natping_interval", 180)<br><br>modparam("mediaproxy","natping_interval", 30)<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>modparam("usrloc", "db_mode", 2)<br>modparam("usrloc", "use_domain", 1)<br><br>modparam("registrar", "default_expires", 60)<br>modparam("registrar", "min_expires", 30)<br>modparam("registrar", "nat_flag", 6)<br>modparam("registrar",
"use_domain", 1)<br><br>modparam("rr", "enable_full_lr", 1)<br><br>modparam("acc", "db_url", "mysql://openser:openserrw@localhost/openser")<br>modparam("acc", "failed_transaction_flag", 1)<br>modparam("acc", "log_level", 1)<br>modparam("acc", "log_flag", 1)<br>modparam("acc", "db_flag", 1)<br><br>route {<br><br> # -----------------------------------------------------------------<br> # Sanity Check Section<br> # -----------------------------------------------------------------<br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483", "Too Many Hops");<br> exit;<br>
};<br><br> if (msg:len > max_len) {<br> sl_send_reply("513", "Message Overflow");<br> exit;<br> };<br><br> # -----------------------------------------------------------------<br> # Record Route Section and Acc section<br> # -----------------------------------------------------------------<br> if (method=="INVITE" && client_nat_test("3")) {<br> record_route_preset("192.168.1.5:5060;nat=yes"); # This is where
OpenSER installed<br> } else if (method!="REGISTER") {<br> record_route(); <br> };<br><br> # -----------------------------------------------------------------<br> # Call Tear Down Section<br> # -----------------------------------------------------------------<br> if (method=="BYE" || method=="CANCEL") {<br> end_media_session();<br> };<br><br> # -----------------------------------------------------------------<br> # Loose Route
Section<br> # -----------------------------------------------------------------<br> if (loose_route()) {<br><br> if (has_totag() && (method=="INVITE" || method=="ACK")) {<br><br> if (client_nat_test("3") || search("^Route:.*;nat=yes")) {<br> setflag(6);<br>
use_media_proxy();<br> };<br> };<br><br> route(1);<br> };<br><br> # -----------------------------------------------------------------<br> # Call Type Processing Section<br> # -----------------------------------------------------------------<br><br> if (uri!=myself) {<br> route(1);<br> return;<br>
};<br><br> if (uri==myself) {<br><br> if (method=="CANCEL") {<br> route(3);<br> return;<br> } else if (method=="INVITE") {<br> xlog("URI is myself, forward to route 3\n");<br>
route(3);<br> return;<br> } else if (method=="REGISTER") {<br> route(2);<br> return;<br> };<br><br> lookup("aliases");<br> if (uri!=myself)
{<br> route(1);<br> return;<br> };<br><br> if (!lookup("location")) {<br> sl_send_reply("404", "User Not Found");<br> exit;<br>
};<br> };<br><br> route(1);<br>}<br><br>route[1] {<br><br> # -----------------------------------------------------------------<br> # Default Message Handler<br> # -----------------------------------------------------------------<br><br> t_on_reply("1");<br><br> if (!t_relay()) {<br><br> if (method=="INVITE" || method=="ACK") {<br> end_media_session();<br>
};<br><br> sl_reply_error();<br> };<br>}<br><br>route[2] {<br><br> # -----------------------------------------------------------------<br> # REGISTER Message Handler<br> # ----------------------------------------------------------------<br><br> if (!search("^Contact:\ +\*") && client_nat_test("7")) {<br> setflag(6);<br> fix_nated_register();<br> force_rport();<br>
};<br><br> sl_send_reply("100", "Trying");<br><br> if (!www_authorize("mydomain.com","subscriber")) {<br> www_challenge("mydomain.com","0");<br> exit;<br> };<br><br> if (!check_to()) {<br> sl_send_reply("401", "Unauthorized");<br> exit;<br> };<br><br> consume_credentials();<br><br> if (!save("location"))
{<br> sl_reply_error();<br> };<br>}<br><br>route[3] {<br><br> # -----------------------------------------------------------------<br> # CANCEL and INVITE Message Handler<br> # -----------------------------------------------------------------<br> xlog("Call Invite\n");<br> if (client_nat_test("3")) {<br> setflag(7);<br> force_rport();<br>
fix_nated_contact();<br> };<br><br> lookup("aliases");<br> <br><br> if (uri=~"^sip:1[0-9]*@*") {<br> xlog("PSTN Gateway\n");<br> use_media_proxy();<br> rewritehostport("pstn.gateway.com:5060"); # This is where PSTN <br> route(1);<br> exit;<br> <br> };<br><br> if (!lookup("location")) {<br> sl_send_reply("404", "User Not
Found");<br> exit;<br> };<br><br> if (method=="CANCEL") {<br> route(1);<br> exit;<br> };<br><br> if (!proxy_authorize("","subscriber")) {<br> proxy_challenge("","0");<br> return;<br> } else if (!check_from()) {<br> sl_send_reply("403",
"Use From=ID");<br> return;<br> };<br><br> consume_credentials();<br><br> if (isflagset(6) || isflagset(7)) {<br> use_media_proxy();<br> };<br><br> route(1);<br>}<br><br>onreply_route[1] {<br><br> if ((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {<br><br> if (!search("^Content-Length:\ +0"))
{<br> use_media_proxy();<br> };<br> };<br><br> if (client_nat_test("1")) {<br> fix_nated_contact();<br> };<br>}<br><br>***************************Mediaproxy.ini******************************************<br>[Dispatcher]<br>;start = yes<br>socket = /var/run/proxydispatcher.sock<br>;group = ser<br>defaultProxy = /var/run/mediaproxy.sock<br><br>[MediaProxy]<br>start = yes<br>socket = /var/run/mediaproxy.sock<br>group = ser<br>listen = None<br>allow = None<br>proxyIP = 192.168.1.5 # This is where
OpenSER installed<br>portRange = 21000:35000 # These values are set same in ATA's configs for RTP Range<br>TOS = 0xb8<br>idleTimeout = 60<br>holdTimeout = 180<br>forceClose = 0<br>accounting = off<br><br>[Accounting]<br>user = root<br>password =<br>host = localhost<br>database = ser<br>table = acc<br><br><br>Can anyone figure out my problem? Thank you in advance<br><br><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com <p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com