Hi,<br> <br>If anybody can take a look openser.cfg below. I`m working vmware (enviroments virtual)...Whenever I try a "register" a client I get 483: Too many Hops....as if he had a loop (config file) but I am unable to find the problem...<br>
<br>I use OpenSER 1.3-notls, client softphone: twincle or xlite...<br> <br>OpenSER - <a href="http://192.168.0.10">192.168.0.10</a><br>Client - <a href="http://192.168.0.25">192.168.0.25</a><br> <br>Bind9/named.conf(SRV, A): <a href="http://spo.voip.br">spo.voip.br</a><br>
<br> <br>Does anyone know how to fix this ?<br> <br>Any hints.....??<br> <br>thx...<br><br> <br> <br>OpenSER File:<br> <br><br>####### Global Parameters #########<br>alias="<a href="http://vmw02-srv.spo.voip.br">vmw02-srv.spo.voip.br</a>"<br>
debug=6<br>log_stderror=no<br>log_facility=LOG_LOCAL0<br>log_name="Openser"<br>fork=yes<br>children=8<br>tcp_children=4<br>group="openser"<br>user="openser"<br><br>/* uncomment the next line to disable TCP (default on) */<br>
disable_tcp=yes<br><br>/* uncomment the next line to enable the auto temporary blacklisting of<br>not available destinations (default disabled) */<br>#disable_dns_blacklist=no<br><br>/* uncomment the next line to enable IPv6 lookup after IPv4 dns<br>
lookup failures (default disabled) */<br>#dns_try_ipv6=yes<br><br>/* uncomment the next line to disable the auto discovery of local aliases<br>based on revers DNS on IPs (default on) */<br>#auto_aliases=no<br><br>/* uncomment the following lines to enable TLS support (default off) */<br>
#disable_tls = no<br>#listen = tls:your_IP:5061<br>#tls_verify_server = 1<br>#tls_verify_client = 1<br>#tls_require_client_certificate = 0<br>#tls_method = TLSv1<br>#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"<br>
#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"<br>#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"<br><br>port=5060<br><br>/* uncomment and configure the following line if you want openser to<br>
bind on a specific interface/port/proto (default bind on all available) */<br>listen=udp:<a href="http://192.168.0.10:5060">192.168.0.10:5060</a><br><br>####### Modules Section ########<br>#set module path<br>mpath="/usr/local/lib/openser/modules/"<br>
<br>/* uncomment next line for MySQL DB support */<br>loadmodule "mysql.so"<br>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "maxfwd.so"<br>
modparam("maxfwd", "max_limit", 256)<br>loadmodule "usrloc.so"<br>loadmodule "registrar.so"<br>loadmodule "textops.so"<br>loadmodule "mi_fifo.so"<br>loadmodule "uri_db.so"<br>
loadmodule "uri.so"<br>loadmodule "xlog.so"<br>loadmodule "acc.so"<br>loadmodule "avpops.so"<br><br>/* uncomment next lines for MySQL based authentication support<br>NOTE: a DB (like mysql) module must be also loaded */<br>
loadmodule "auth.so"<br>loadmodule "auth_db.so"<br><br>/* uncomment next line for aliases support<br>NOTE: a DB (like mysql) module must be also loaded */<br>loadmodule "alias_db.so"<br><br>/* uncomment next line for multi-domain support<br>
NOTE: a DB (like mysql) module must be also loaded<br>NOTE: be sure and enable multi-domain support in all used modules<br>(see "multi-module params" section ) */<br>loadmodule "domain.so"<br><br>/* uncomment the next two lines for presence server support<br>
NOTE: a DB (like mysql) module must be also loaded */<br>#loadmodule "presence.so"<br>#loadmodule "presence_xml.so"<br><br><br># ----------------- setting module-specific parameters ---------------<br>
<br># ----- mi_fifo params -----<br>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")<br> <br><br># ----- rr params -----<br># add value to ;lr param to cope with most of the UAs<br>modparam("rr", "enable_full_lr", 1)<br>
<br># do not append from tag to the RR (no need for this script)<br>#modparam("rr", "append_fromtag", 0)<br><br><br># ----- rr params -----<br>#modparam("registrar", "method_filtering", 1)<br>
<br>/* uncomment the next line to disable parallel forking via location */<br># modparam("registrar", "append_branches", 0)<br><br>/* uncomment the next line not to allow more than 10 contacts per AOR */<br>
#modparam("registrar", "max_contacts", 10)<br><br><br># ----- uri_db params -----<br><br>/* by default we disable the DB support in the module as we do not need it<br>in this configuration */<br>modparam("uri_db", "use_uri_table", 0)<br>
modparam("uri_db", "db_url", "")<br> <br><br># ----- acc params -----<br><br>/* what sepcial events should be accounted ? */<br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_ack", 1)<br>
modparam("acc", "report_cancels", 1)<br><br>/* by default ww do not adjust the direct of the sequential requests.<br>if you enable this parameter, be sure the enable "append_fromtag"<br>in "rr" module */<br>
<br>modparam("acc", "detect_direction", 0)<br><br>/* account triggers (flags) */<br>modparam("acc", "failed_transaction_flag", 3)<br>modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 2)<br><br>/* uncomment the following lines to enable DB accounting also */<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br>
<br><br># ----- usrloc params -----<br><br>#modparam("usrloc", "db_mode", 0)<br>/* uncomment the following lines if you want to enable DB persistency<br>for location entries */<br>modparam("usrloc", "db_mode", 2)<br>
modparam("usrloc", "db_url", "mysql://openser:openserrw@192.168.0.10/openser")<br>modparam("usrloc", "user_column", "username")<br>modparam("usrloc", "domain_column", "domain")<br>
modparam("usrloc", "contact_column", "contact")<br>modparam("usrloc", "expires_column", "expires")<br>modparam("usrloc", "q_column", "q")<br>
modparam("usrloc", "callid_column", "callid")<br>modparam("usrloc", "cseq_column", "cseq")<br>modparam("usrloc", "methods_column", "methods")<br>
modparam("usrloc", "flags_column", "flags")<br>modparam("usrloc", "user_agent_column", "user_agent")<br>modparam("usrloc", "received_column", "received")<br>
modparam("usrloc", "socket_column", "socket")<br>modparam("usrloc", "use_domain", 0)<br>modparam("usrloc", "desc_time_order", 0)<br>modparam("usrloc", "timer_interval", 60)<br>
modparam("usrloc", "matching_mode", 0)<br>modparam("usrloc", "cseq_delay", 20)<br><br># ----- auth_db params -----<br><br>/* uncomment the following lines if you want to enable the DB based<br>
authentication */<br><br>#modparam("auth_db", "calculate_ha1", yes)<br>#modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "db_url", "mysql://openser:openserrw@192.168.0.10/openser")<br>
<br>#modparam("auth_db", "load_credentials", "")<br><br><br># ----- alias_db params -----<br><br>/* uncomment the following lines if you want to enable the DB based aliases */<br><br>modparam("alias_db", "db_url", "mysql://openser:openserrw@192.168.0.10/openser")<br>
<br> <br><br># ----- domain params -----<br><br>/* uncomment the following lines to enable multi-domain detection support */<br><br>modparam("domain", "db_url", "mysql://openser:openserrw@192.168.0.10/openser")<br>
modparam("domain", "db_mode", 1) # Use caching<br><br># ----- multi-module params -----<br><br>/* uncomment the following line if you want to enable multi-domain support in the modules (dafault off) */<br>
modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)<br> <br><br># ----- presence params -----<br><br>/* uncomment the following lines if you want to enable presence */<br>#modparam("presence|presence_xml", "db_url",<br>
# "mysql://openser:openserrw@192.168.1.3/openser_1_3")<br>#modparam("presence_xml", "force_active", 1)<br>#modparam("presence", "server_address", "sip:<a href="http://192.168.1.2:5060">192.168.1.2:5060</a>")<br>
<br><br>####### Routing Logic ########<br><br> <br><br># main request routing logic<br><br>route{<br><br> if (!mf_process_maxfwd_header("10")) {<br><br> sl_send_reply("483","Too Many Hops");<br>
<br> exit;<br><br> }<br><br> if (has_totag()) {<br><br> # sequential request withing a dialog should<br> # take the path determined by record-routing<br><br> if (loose_route()) {<br><br> if (is_method("BYE")) {<br>
<br> setflag(1); # do accouting ...<br> setflag(3); # ... even if the transaction fails<br><br> }<br><br> route(1);<br><br> } else {<br><br> sl_send_reply("404","Not here");<br>
<br> }<br><br> exit;<br><br> }<br><br> #initial requests<br> # CANCEL processing<br><br> if (is_method("CANCEL")){<br><br> if (t_check_trans())<br><br> t_relay();<br><br>
exit;<br><br> }<br><br> t_check_trans();<br><br><br> # authenticate if from local subscriber (uncomment to enable auth)<br><br> if (!(method=="REGISTER") && from_uri==myself) {<br><br>
if (!proxy_authorize("", "subscriber")) {<br><br> proxy_challenge("", "0");<br><br> exit;<br><br> }<br><br> if (!check_from()) {<br><br> sl_send_reply("403","Forbidden auth ID");<br>
<br> exit;<br><br> }<br><br> consume_credentials();<br><br> # caller authenticated<br><br> }<br><br> # record routing<br> if (!is_method("REGISTER|MESSAGE")) {<br> <br> record_route();<br>
<br> # account only INVITEs<br><br> if (is_method("INVITE")) {<br><br> setflag(1); # do accouting<br><br> }<br><br> if (!uri==myself)<br><br> /* replace with following line if multi-domain support is used */<br>
<br> ##if (!is_uri_host_local())<br> {<br><br> append_hf("P-hint: outbound\r\n");<br> # if you have some interdomain connections via TLS<br> ##if($rd=="tls_domain1.net") {<br>
## t_relay("tls:<a href="http://domain1.net">domain1.net</a>");<br> ## exit;<br> ##} else if($rd=="tls_domain2.net") {<br> ## t_relay("tls:<a href="http://domain2.net">domain2.net</a>");<br>
## exit;<br> ##}<br> route(1);<br> }<br><br> # requests for my domain<br><br> /* uncomment this if you want to enable presence server and comment the next 'if' block<br> NOTE: uncomment also the definition of route[2] from below */<br>
<br> ##if( is_method("PUBLISH|SUBSCRIBE"))<br><br> ## route(2);<br><br> if (is_method("PUBLISH")){<br><br> sl_send_reply("503", "Service Unavailable");<br><br> exit;<br>
<br> }<br> <br> if (is_method("REGISTER")){<br> # ACRESCENTEI O IP ADDR - MRG<br> # authenticate the REGISTER requests (uncomment to enable auth)<br><br> #if (!www_authorize("vmw02-srv", "subscriber")){<br>
<br> # www_challenge("vmw02-srv", "0");<br><br> # exit;<br><br> #}<br> #<br><br> #if (!check_to()){<br><br> ## sl_send_reply("403","Forbidden auth ID");<br>
<br> ## exit;<br><br> ##}<br><br> if (!save("location"))<br><br> sl_reply_error();<br><br> exit;<br><br> }<br><br> if ($rU==NULL) {<br><br> # request with no Username in RURI<br>
<br> sl_send_reply("484","Address Incomplete");<br><br> exit;<br><br> }<br><br> # apply DB based aliases (uncomment to enable)<br><br> alias_db_lookup("dbaliases");<br>
<br> if (!lookup("location")) {<br><br> switch ($retcode) {<br><br> case -1:<br><br> case -3:<br><br> t_newtran();<br><br> t_reply("404", "Not Found");<br>
<br> exit;<br><br> case -2:<br><br> sl_send_reply("405", "Method Not Allowed");<br><br> exit;<br><br> }<br><br> }<br><br> # when routing via usrloc, log the missed calls also<br>
<br> setflag(2);<br><br> route(1);<br><br> }<br><br> <br><br> route[1] {<br><br> # for INVITEs enable some additional helper routes<br><br> if (is_method("INVITE")) {<br><br> t_on_branch("2");<br>
<br> t_on_reply("2");<br><br> t_on_failure("1");<br><br> }<br><br> if (!t_relay()) {<br><br> sl_reply_error();<br><br> };<br><br> exit;<br><br> }<br><br> <br><br># Presence route<br>
<br>/* uncomment the whole following route for enabling presence<br><br>NOTE: do not forget to enable the call of this route from the main<br><br>route */<br><br>##route[2]<br><br>##{<br><br>## if (!t_newtran())<br><br>## {<br>
<br>## sl_reply_error();<br><br>## exit;<br><br>## };<br><br>##<br><br>## if(is_method("PUBLISH"))<br><br>## {<br><br>## handle_publish();<br><br>## t_release();<br><br>## }<br><br>## else<br><br>## if( is_method("SUBSCRIBE"))<br>
<br>## {<br><br>## handle_subscribe();<br><br>## t_release();<br><br>## }<br><br>##<br><br>## exit;<br><br>##}<br><br> <br><br>branch_route[2] {<br><br>xlog("new branch at $ru\n");<br><br>}<br><br> <br><br>onreply_route[2] {<br>
<br>xlog("incoming reply\n");<br><br>}<br><br> <br><br>failure_route[1] {<br><br>if (t_was_cancelled()) {<br><br>exit;<br><br>}<br><br># uncomment the following lines if you want to block client<br><br># redirect based on 3xx replies.<br>
<br>##if (t_check_status("3[0-9][0-9]")) {<br><br>##t_reply("404","Not found");<br><br>## exit;<br><br>##}<br><br># uncomment the following lines if you want to redirect the failed<br><br># calls to a different new destination<br>
<br>##if (t_check_status("486|408")) {<br><br>## sethostport("<a href="http://192.168.2.100:5060">192.168.2.100:5060</a>");<br><br>## append_branch();<br><br>## # do not set the missed call flag again<br>
<br>## t_relay();<br><br>##}<br><br>}<br><br> <br><br>Ngrep -d eth1 -qt -W byline port 5060<br><br>root@vmw02-srv:~# ngrep -d eth1 -qt -W byline port 5060<br>interface: eth1 (<a href="http://192.168.0.0/255.255.255.0">192.168.0.0/255.255.255.0</a>)<br>
filter: (ip or ip6) and ( port 5060 )<br><br>U 2008/03/20 13:57:31.763060 <a href="http://192.168.0.25:5060">192.168.0.25:5060</a> -> <a href="http://192.168.0.10:5060">192.168.0.10:5060</a><br>REGISTER sip:<a href="http://spo.voip.br">spo.voip.br</a> SIP/2.0.<br>
Via: SIP/2.0/UDP <a href="http://192.168.0.25">192.168.0.25</a>;rport;branch=z9hG4bKignjupsg.<br>Max-Forwards: 70.<br>To: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>.<br>
From: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=dcoan.<br>Call-ID: <a href="mailto:iswtwciijecswfp@192.168.0.25">iswtwciijecswfp@192.168.0.25</a>.<br>CSeq: 883 REGISTER.<br>
Contact: <<a href="mailto:sip:vmwcli03@192.168.0.25">sip:vmwcli03@192.168.0.25</a>>;expires=3600.<br>Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO.<br>User-Agent: Twinkle/1.0.<br>Content-Length: 0.<br>
<br>.<br><br>U 2008/03/20 13:57:32.333159 <a href="http://192.168.0.25:5060">192.168.0.25:5060</a> -> <a href="http://192.168.0.10:5060">192.168.0.10:5060</a><br><br>REGISTER sip:<a href="http://spo.voip.br">spo.voip.br</a> SIP/2.0.<br>
Via: SIP/2.0/UDP <a href="http://192.168.0.25">192.168.0.25</a>;rport;branch=z9hG4bKignjupsg.<br>Max-Forwards: 70.<br>To: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>.<br>
From: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=dcoan.<br>Call-ID: <a href="mailto:iswtwciijecswfp@192.168.0.25">iswtwciijecswfp@192.168.0.25</a>.<br>CSeq: 883 REGISTER.<br>
Contact: <<a href="mailto:sip:vmwcli03@192.168.0.25">sip:vmwcli03@192.168.0.25</a>>;expires=3600.<br>Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO.<br>User-Agent: Twinkle/1.0.<br>Content-Length: 0.<br>
<br>.<br><br> <br><br>U 2008/03/20 13:57:33.321952 <a href="http://192.168.0.25:5060">192.168.0.25:5060</a> -> <a href="http://192.168.0.10:5060">192.168.0.10:5060</a><br>REGISTER sip:<a href="http://spo.voip.br">spo.voip.br</a> SIP/2.0.<br>
Via: SIP/2.0/UDP <a href="http://192.168.0.25">192.168.0.25</a>;rport;branch=z9hG4bKignjupsg.<br>Max-Forwards: 70.<br>To: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>.<br>
From: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=dcoan.<br>Call-ID: <a href="mailto:iswtwciijecswfp@192.168.0.25">iswtwciijecswfp@192.168.0.25</a>.<br>CSeq: 883 REGISTER.<br>
Contact: <<a href="mailto:sip:vmwcli03@192.168.0.25">sip:vmwcli03@192.168.0.25</a>>;expires=3600.<br>Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO.<br>User-Agent: Twinkle/1.0.<br>Content-Length: 0.<br>
.<br> <br><br>U 2008/03/20 13:57:35.309584 <a href="http://192.168.0.25:5060">192.168.0.25:5060</a> -> <a href="http://192.168.0.10:5060">192.168.0.10:5060</a><br><br>REGISTER sip:<a href="http://spo.voip.br">spo.voip.br</a> SIP/2.0.<br>
Via: SIP/2.0/UDP <a href="http://192.168.0.25">192.168.0.25</a>;rport;branch=z9hG4bKignjupsg.<br>Max-Forwards: 70.<br>To: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>.<br>
From: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=dcoan.<br>Call-ID: <a href="mailto:iswtwciijecswfp@192.168.0.25">iswtwciijecswfp@192.168.0.25</a>.<br>CSeq: 883 REGISTER.<br>
Contact: <<a href="mailto:sip:vmwcli03@192.168.0.25">sip:vmwcli03@192.168.0.25</a>>;expires=3600.<br>Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO.<br>User-Agent: Twinkle/1.0.<br>Content-Length: 0.<br>
<br>.<br><br> <br>U 2008/03/20 13:57:37.026703 <a href="http://192.168.0.10:5060">192.168.0.10:5060</a> -> <a href="http://192.168.0.25:5060">192.168.0.25:5060</a><br><br>SIP/2.0 483 Too Many Hops.<br><br>Via: SIP/2.0/UDP <a href="http://192.168.0.25">192.168.0.25</a>;rport=5060;branch=z9hG4bKignjupsg.<br>
To: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=1333af5435552d3677a0ca954c3a6e9f.6889.<br>From: "vmwcli03" <<a href="mailto:sip:vmwcli03@spo.voip.br">sip:vmwcli03@spo.voip.br</a>>;tag=dcoan.<br>
Call-ID: <a href="mailto:iswtwciijecswfp@192.168.0.25">iswtwciijecswfp@192.168.0.25</a>.<br>CSeq: 883 REGISTER.<br>Server: OpenSER (1.3.0-notls (i386/linux)).<br>Content-Length: 0.