I'm using openser 1.0.1 with rtpproxy and nathelper. Calls are goin through with good audio. Hanging up is fine too. However I've noticed I've been getting errors in my logs: <br> <br> ERROR: extract_body: message body has length zero<br> ERROR: force_rtp_proxy2: can't extract body from the message<br> <br> I'm assuming I'm doin something wrong in my config but I dont know where. Can someone please point out my mistakes? Thank you<br> <br> # start RTPProxy with: rtpproxy -l your_public_ip -s udp:localhost:8899<br> #<br> <br> # ----------- global configuration parameters ------------------------<br> <br> debug=3 # debug level (cmd line: -dddddddddd)<br> fork=yes<br> log_stderror=no # (cmd line: -E)<br> <br> /* Uncomment these lines to enter debugging mode <br> fork=no<br> log_stderror=yes<br> */<br> <br> port=5060<br> children=4<br> <br> listen=68.xxx.xxx.xxx<br> alias=test.com<br> <br>
check_via=no # (cmd. line: -v)<br> dns=no # (cmd. line: -r)<br> rev_dns=no # (cmd. line: -R)<br> <br> fifo="/tmp/openser_fifo"<br> fifo_db_url="mysql://openser:openserrw@localhost/openser"<br> <br> # --- module loading<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/domain.so"<br> loadmodule "/usr/local/lib/openser/modules/nathelper.so"<br> loadmodule "/usr/local/lib/openser/modules/avpops.so"<br> loadmodule "/usr/local/lib/openser/modules/textops.so"<br> loadmodule "/usr/local/lib/openser/modules/xlog.so"<br> loadmodule "/usr/local/lib/openser/modules/permissions.so"<br> <br> # --- setting module parameters<br> <br> modparam("auth_db|permissions|uri_db|usrloc", "db_url",<br> "mysql://openser:openserrw@localhost/openser")<br> <br> # -- usrloc params --<br> modparam("usrloc", "db_mode", 2)<br> <br> # -- registrar params --<br> modparam("registrar", "nat_flag", 6)<br> modparam("registrar", "sip_natping_flag", 7)<br> <br> # -- auth params --<br> modparam("auth_db", "calculate_ha1", yes)<br> modparam("auth_db", "password_column", "password")<br> <br> # -- rr params --<br> modparam("rr", "enable_full_lr", 1)<br> <br> # -- nathelper --<br> modparam("nathelper", "rtpproxy_sock",
"unix:/var/run/rtpproxy.sock")<br> modparam("nathelper", "natping_interval", 30)<br> modparam("nathelper", "ping_nated_only", 1)<br> modparam("nathelper", "sipping_from", "sip:pinger@test.com")<br> <br> # -- tm params --<br> modparam("tm", "fr_inv_timer", 27)<br> modparam("tm", "fr_inv_timer_avp", "inv_timeout")<br> <br> # -- permissions param --<br> modparam("permissions", "db_mode", 1)<br> modparam("permissions", "trusted_table", "trusted")<br> <br> # --- main routing logic<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> if
(msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> exit;<br> };<br> <br> # -----------------------------------------------------------------<br> # NAT detection<br> # -----------------------------------------------------------------<br> route(2);<br> <br> <br> # -----------------------------------------------------------------<br> # Record Route Section<br> # -----------------------------------------------------------------<br> if (!method=="REGISTER")<br> record_route();<br> <br> # -----------------------------------------------------------------<br> # Loose Route Section<br>
# -----------------------------------------------------------------<br> if (loose_route()) {<br> <br> append_hf("P-hint: rr-enforced\r\n"); <br> if ((method=="INVITE" || method=="REFER") && !has_totag()) {<br> sl_send_reply("403", "Forbidden");<br> return;<br> };<br> <br> if (method=="INVITE") {<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> consume_credentials();<br> };<br> route(1);<br> };<br> <br> <br> # -----------------------------------------------------------------<br> # Call Type Processing Section<br> # -----------------------------------------------------------------<br> if (!is_uri_host_local()) {<br> if (is_from_local() || allow_trusted()) {<br>
route(4);<br> route(1);<br> } else {<br> sl_send_reply("403", "Forbidden");<br> };<br> };<br> <br> if (method=="ACK") {<br> route(1);<br> return;<br> } else if (method=="CANCEL") {<br> route(1);<br> return;<br> } else if (method=="INVITE") {<br> route(5);<br> return;<br> } else if (method=="REGISTER") {<br> route(4);<br> return;<br> };<br> <br>
lookup("aliases");<br> if (!is_uri_host_local()) {<br> route(4);<br> route(1);<br> return;<br> };<br> <br> if (!lookup("location")) {<br> sl_send_reply("404", "User Not Found");<br> exit;<br> };<br> <br> append_hf("P-hint: usrloc applied\r\n");<br> <br> route(1);<br> }<br> <br> <br> route[1] {<br> if (subst_uri('/(sip:.*);nat=yes/\1/')){<br> setflag(6);<br> };<br> <br> if (isflagset(5)||isflagset(6)) {<br> route(3);<br> }<br> <br> if (!t_relay()) {<br>
sl_reply_error();<br> };<br> exit;<br> }<br> <br> route[2]{<br> force_rport();<br> if (nat_uac_test("19")) {<br> if (method=="REGISTER") {<br> fix_nated_register();<br> } else {<br> fix_nated_contact();<br> };<br> setflag(5);<br> };<br> }<br> <br> route[3] {<br> if (is_method("BYE|CANCEL")) {<br> unforce_rtp_proxy();<br> } else if (is_method("INVITE")){<br> force_rtp_proxy();<br> t_on_failure("1");<br> };<br> if
(isflagset(5))<br> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');<br> t_on_reply("1");<br> }<br> <br> route[4] {<br> <br> if (!www_authorize("", "subscriber")) {<br> www_challenge("", "0");<br> exit;<br> };<br> <br> if (isflagset(5)) {<br> setflag(6);<br> # if you want OPTIONS natpings uncomment next<br> # setflag(7);<br> };<br> <br> save("location");<br> <br> if (!lookup("location")) {<br> sl_reply_error();<br> };<br>
<br> append_hf("P-hint: usrloc applied\r\n"); <br> <br> }<br> <br> route[5] {<br> <br> # -----------------------------------------------------------------<br> # INVITE Message Handler<br> # ----------------------------------------------------------------- <br> if (!allow_trusted()) {<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> <br> lookup("aliases");<br> if (!is_uri_host_local()) {<br> route(1);<br> return;<br> };<br> <br> if (uri=~"^sip:[0-9]{3}@") {<br> lookup("aliases");<br> lookup("location");<br> route(1);<br> return;<br> }; <br> <br> if(!lookup("location")){<br> if (uri=~"^sip:[0-9]*@") { <br> route(6);<br> return;<br> };<br> <br> <br>
sl_send_reply("404", "User Not Found");<br> return;<br> };<br> <br> route(1);<br> }<br> <br> route[6] {<br> <br> # -----------------------------------------------------------------<br> # PSTN Handler<br> # -----------------------------------------------------------------<br> <br> rewritehostport("pstn.gateway:5060"); <br> <br> avp_write("i:45", "inv_timeout");<br> <br> route(1);<br> }<br> <br> <br> failure_route[1] {<br> if (isflagset(6) || isflagset(5)) {<br> unforce_rtp_proxy();<br> }<br> }<br> <br> onreply_route[1] {<br> if ((isflagset(5) || isflagset(6)) && status=~"(183)|(2[0-9][0-9])") {<br>
force_rtp_proxy();<br> }<br> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');<br> <br> if (isflagset(6)) {<br> fix_nated_contact();<br> }<br> <br> exit;<br> }<br> <br> <p> 
                <hr size=1>Do you Yahoo!?<br> Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/handraisers"> all-new Yahoo! Mail Beta.</a>