| |
| News & Reviews |
Welcome to the Voxilla VoIP Forum.
Voxilla has been a trusted source for accurate, up-to-date information on the IP Communications industry since 2002. A dedicated staff of reporters and engineers produce feature articles and product reviews to keep industry watchers abreast of the people, companies, and trends driving a fast moving market.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
Voxilla VoIP Forum |
Configuration file for OpenSER v1.2.x to do VoIP NAT traversal using RTPProxy.Got a comment or question on VoIP hardware or software that isn't represented by one of the other categories? Post it here. |
| | LinkBack | Thread Tools | Rate Thread | Display Modes |
| |||
| Hello; I have configured the Openser server to do VoIP NAT traversal. But i havee a problem: - I run the openser server a - Theni execute this command /etc/init.d/openser status, i have this response : Status of openser: openser is not running. This is my config file openser.cfg: # ------------------ module loading ---------------------------------- #set module path mpath="/usr/lib/openser/modules/" # Uncomment this if you want to use SQL database loadmodule "mysql.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "mi_fifo.so" loadmodule "presence.so" loadmodule "nathelper.so" # Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "auth.so" loadmodule "auth_db.so" # ----------------- setting module-specific parameters --------------- # -- mi_fifo params -- modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") # -- usrloc params -- #modparam("usrloc", "db_mode", 0) # Uncomment this if you want to use SQL database # for persistent storage and comment the previous line modparam("usrloc", "db_mode", 2) modparam("usrloc", "nat_bflag", 6) # -- auth params -- modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") # -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1) # -- presence params -- modparam("presence|usrloc", "db_url", "mysql://openser modparam("presence", "force_active", 1) modparam("presence", "max_expires", 3600) modparam("presence", "server_address", "sip:192.168.1.4:5060") # -- nathelper modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:7890") modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", 7) modparam("nathelper", "sipping_from", "sip:toto@192.168.1.4") # ------------------------- request routing logic ------------------- # main routing logic route{ # initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; # NAT detection route(4); # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol if (!method=="REGISTER") record_route(); # subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { append_hf("P-hint: rr-enforced\r\n"); route(1); }; if (!uri==myself) { append_hf("P-hint: outbound\r\n"); route(1); }; if (uri==myself) { if( is_method("PUBLISH|SUBSCRIBE")) route(2); if (method=="REGISTER") { # Uncomment this if you want to use digest authentication if (!www_authorize("domain.priv", "subscriber")) { www_challenge("domain.priv", "0"); exit; }; if (isflagset(5)) { setbflag(6); # if you want OPTIONS natpings uncomment next # setbflag(7); }; save("location"); exit; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); }; # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); exit; }; append_hf("P-hint: usrloc applied\r\n"); }; route(1); } route[1] { # send it out now; use stateful forwarding as it works reliably if (subst_uri('/(sip:.*);nat=yes/\1/')){ setbflag(6); }; if (isflagset(5)||isbflagset(6)) { route(3); } if (!t_relay()) { sl_reply_error(); }; exit; } route[2] { sl_send_reply("100","trying"); if (!t_newtran()){ sl_reply_error(); exit; }; append_to_reply("Contact: <sip:192.168.1.4:5060>\r\n"); if(is_method("PUBLISH")){ handle_publish(); t_release(); } else if( is_method("SUBSCRIBE")){ handle_subscribe(); t_release(); }; } route[3] { if (is_method("BYE|CANCEL")) { unforce_rtp_proxy(); } else if (is_method("INVITE")) { force_rtp_proxy(); t_on_failure("1"); }; if (isflagset(5)) search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes'); t_on_reply("1"); } failure_route[1] { if (isbflagset(6) || isflagset(5)) { unforce_rtp_proxy(); } } onreply_route[1] { if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") { force_rtp_proxy(); } search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes'); if (isbflagset(6)) { fix_nated_contact(); } exit; } route[4] { force_rport(); if (nat_uac_test("19")) { if (method=="REGISTER") { fix_nated_register(); } else { fix_nated_contact(); }; setflag(5); }; } Please help me. |
| |||
| Try this - open up openser.cfg in your favorite text editor. Make the following changes: fork = no debug = 4 log_stderr = yes Ensure all old OpenSER processes are dead (kill -9 openser) Then start openser directly - by typing in just openser I bet you will get a lot of output. The last few lines will show you where the error message is located. Send in the last few lines of that output if you are still confused. Also, check out my OpenSER How To. It may help you understand things a little bit better. |
| |||
| I have entered the debbuging mode I ensured that the openser process is killed and I restarted it (by typing openser) --> This error is displayed: 0(0) ERROR:nathelper:fixup_fix_nated_register: you must set 'received_avp' parameter. Must be same value as parameter 'received_avp' of registrar module 0(0) ERROR: fix_actions: fixing failed (code=-1) at cfg line 248 ERROR: error -1 while trying to fix configuration. Have you an idea about this error message?? Thank you for your help. |
| |||
| I don't know if you still need help here, but you have to set the two parameters written in the error message. i used the examples from the documentation and seems to work. ( even if I have not clear the meaning of i:42 and s:rcv ) modparam("nathelper", "received_avp", "$avp(i:42)") modparam("registrar", "received_avp", "$avp(s:rcv)") |
| Thread Tools | |
| Display Modes | Rate This Thread |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NAT traversal help required | SteveNutt | Linksys (Sipura) VoIP Support Forum | 4 | September 29th, 2006 08:11 PM |
| too many NAT traversal solutions? | dhochman | BroadVoice Support Forum | 5 | February 15th, 2006 05:27 PM |
| Ingate Launches Far-End NAT Traversal Solution (comment) | PhoneBoy | General VoIP Discussion | 0 | December 14th, 2004 07:50 PM |