Go Back   Voxilla VoIP Forum > Hardware/Software Support Forums > Other Hardware/Software

Other Hardware/Software Got a comment or question on VoIP hardware or software that isn't represented by one of the other categories? Post it here.



Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old June 28th, 2007, 09:06 AM
Junior Member
 
Join Date: Jun 2007
Posts: 2
Djappa is on a distinguished road
Default configuration file for OpenSER v1.2.x to do VoIP NAT traversal using RTPProxy.

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://openserpenserrw@127.0.0.1/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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old June 28th, 2007, 08:13 PM
Junior Member
 
Join Date: Aug 2004
Posts: 9
n8twj
Default Re: Configuration file for OpenSER v1.2.x to do VoIP NAT traversal using RTPProxy.

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old July 2nd, 2007, 06:42 AM
Junior Member
 
Join Date: Jun 2007
Posts: 2
Djappa is on a distinguished road
Default Re: Configuration file for OpenSER v1.2.x to do VoIP NAT traversal using RTPProxy.

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old August 29th, 2007, 09:31 AM
Junior Member
 
Join Date: Aug 2007
Posts: 1
cowst is on a distinguished road
Default Re: Configuration file for OpenSER v1.2.x to do VoIP NAT traversal using RTPProxy.

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)")
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NAT traversal help required SteveNutt Cisco/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

Voxilla Recommends
  • Voxilla News

    More Voxilla news



    All times are GMT. The time now is 07:55 PM.


    vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
    SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
    Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2009 by Voxilla, Inc.