<div dir="ltr">Well, after a quick look I noticed you are listening only the loopback(127.0.0.1) interface. I think you should listen to some real interface. This should have the same IP you are configuring your Ekiga to register to.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 29, 2015 at 3:34 PM, Alexander Shukaev <span dir="ltr"><<a href="mailto:opensips@alexander.shukaev.name" target="_blank">opensips@alexander.shukaev.name</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Patrick,<br>
<br>
then maybe the first place to start would be my '/etc/opensips/opensips.cfg', which I've generated with 'osipsconfig' and edited just a bit:<br>
<br>
#<br>
# $Id$<br>
#<br>
# OpenSIPS residential configuration script<br>
# by OpenSIPS Solutions <<a href="mailto:team@opensips-solutions.com" target="_blank">team@opensips-solutions.com</a>><br>
#<br>
# This script was generated via "make menuconfig", from<br>
# the "Residential" scenario.<br>
# You can enable / disable more features / functionalities by<br>
# re-generating the scenario with different options.#<br>
#<br>
# Please refer to the Core CookBook at:<br>
# <a href="http://www.opensips.org/Resources/DocsCookbooks" rel="noreferrer" target="_blank">http://www.opensips.org/Resources/DocsCookbooks</a><br>
# for a explanation of possible statements, functions and parameters.<br>
#<br>
<br>
####### Global Parameters #########<br>
<br>
debug=3<br>
log_stderror=no<br>
log_facility=LOG_LOCAL0<br>
<br>
fork=yes<br>
children=4<br>
<br>
/* uncomment the following lines to enable debugging */<br>
# debug=6<br>
# fork=no<br>
# log_stderror=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>
/* comment the next line to enable the auto discovery of local aliases<br>
based on revers DNS on IPs */<br>
auto_aliases=no<br>
<br>
listen=udp:<a href="http://127.0.0.1:5060" rel="noreferrer" target="_blank">127.0.0.1:5060</a> # CUSTOMIZE ME<br>
listen=tcp:<a href="http://127.0.0.1:5060" rel="noreferrer" target="_blank">127.0.0.1:5060</a> # CUSTOMIZE ME<br>
listen=tls:<a href="http://127.0.0.1:5061" rel="noreferrer" target="_blank">127.0.0.1:5061</a> # CUSTOMIZE ME<br>
<br>
####### Modules Section ########<br>
<br>
#set module path<br>
mpath="/usr/lib/opensips/modules/"<br>
<br>
#### SIGNALING module<br>
loadmodule "signaling.so"<br>
<br>
#### StateLess module<br>
loadmodule "sl.so"<br>
<br>
#### Transaction Module<br>
loadmodule "tm.so"<br>
modparam("tm", "fr_timeout", 5)<br>
modparam("tm", "fr_inv_timeout", 30)<br>
modparam("tm", "restart_fr_on_each_reply", 0)<br>
modparam("tm", "onreply_avp_mode", 1)<br>
<br>
#### Record Route Module<br>
loadmodule "rr.so"<br>
/* do not append from tag to the RR (no need for this script) */<br>
modparam("rr", "append_fromtag", 0)<br>
<br>
#### MAX ForWarD module<br>
loadmodule "maxfwd.so"<br>
<br>
#### SIP MSG OPerationS module<br>
loadmodule "sipmsgops.so"<br>
<br>
#### FIFO Management Interface<br>
loadmodule "mi_fifo.so"<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>
modparam("mi_fifo", "fifo_mode", 0666)<br>
<br>
#### URI module<br>
loadmodule "uri.so"<br>
modparam("uri", "use_uri_table", 0)<br>
<br>
#### PGSQL module<br>
loadmodule "db_postgres.so"<br>
<br>
#### HTTPD module<br>
# loadmodule "httpd.so"<br>
# modparam("httpd", "port", 8888)<br>
<br>
#### USeR LOCation module<br>
loadmodule "usrloc.so"<br>
modparam("usrloc", "nat_bflag", "NAT")<br>
modparam("usrloc", "db_mode", 2)<br>
modparam("usrloc", "db_url", "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME<br>
<br>
#### REGISTRAR module<br>
loadmodule "registrar.so"<br>
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")<br>
modparam("registrar", "received_avp", "$avp(received_nh)")<br>
/* uncomment the next line not to allow more than 10 contacts per AOR */<br>
#modparam("registrar", "max_contacts", 10)<br>
<br>
#### ACCounting module<br>
loadmodule "acc.so"<br>
/* what special events should be accounted ? */<br>
modparam("acc", "early_media", 0)<br>
modparam("acc", "report_cancels", 0)<br>
/* by default we 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>
modparam("acc", "detect_direction", 0)<br>
modparam("acc", "failed_transaction_flag", "ACC_FAILED")<br>
/* account triggers (flags) */<br>
modparam("acc", "db_flag", "ACC_DO")<br>
modparam("acc", "db_missed_flag", "ACC_MISSED")<br>
modparam("acc", "db_url", "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME<br>
<br>
#### AUTHentication modules<br>
loadmodule "auth.so"<br>
loadmodule "auth_db.so"<br>
modparam("auth_db", "calculate_ha1", yes)<br>
modparam("auth_db", "password_column", "password")<br>
modparam("auth_db|uri", "db_url", "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME<br>
modparam("auth_db", "load_credentials", "")<br>
<br>
#### PRESENCE modules<br>
loadmodule "xcap.so"<br>
loadmodule "presence.so"<br>
loadmodule "presence_xml.so"<br>
modparam("xcap|presence", "db_url", "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME<br>
# modparam("presence|presence_xml", "db_url", "postgres://opensips:$@localhost/opensips")<br>
# modparam("presence", "db_url", "postgres://opensips:$@localhost/opensips")<br>
modparam("presence_xml", "force_active", 1)<br>
modparam("presence", "server_address", "sip:<a href="http://127.0.0.1:5060" rel="noreferrer" target="_blank">127.0.0.1:5060</a>") # CUSTOMIZE ME<br>
<br>
#### DIALOG module<br>
loadmodule "dialog.so"<br>
modparam("dialog", "dlg_match_mode", 1)<br>
modparam("dialog", "default_timeout", 21600) # 6 hours timeout<br>
modparam("dialog", "db_mode", 2)<br>
modparam("dialog", "db_url", "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME<br>
<br>
#### NAT modules<br>
loadmodule "nathelper.so"<br>
modparam("nathelper", "natping_interval", 10)<br>
modparam("nathelper", "ping_nated_only", 1)<br>
modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")<br>
modparam("nathelper", "sipping_from", "<a href="mailto:sip%3Apinger@127.0.0.1" target="_blank">sip:pinger@127.0.0.1</a>") #CUSTOMIZE ME<br>
modparam("nathelper", "received_avp", "$avp(received_nh)")<br>
<br>
# loadmodule "rtpproxy.so"<br>
# modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221") # CUSTOMIZE ME<br>
<br>
#### MI_HTTP module<br>
# loadmodule "mi_http.so"<br>
<br>
loadmodule "proto_udp.so"<br>
loadmodule "proto_tcp.so"<br>
loadmodule "proto_tls.so"<br>
modparam("proto_tls","verify_cert", "1")<br>
modparam("proto_tls","require_cert", "0")<br>
modparam("proto_tls","tls_method", "TLSv1")<br>
modparam("proto_tls","certificate", "/etc/opensips/tls/user/user-cert.pem")<br>
modparam("proto_tls","private_key", "/etc/opensips/tls/user/user-privkey.pem")<br>
modparam("proto_tls","ca_list", "/etc/opensips/tls/user/user-calist.pem")<br>
<br>
####### Routing Logic ########<br>
<br>
# main request routing logic<br>
<br>
route{<br>
force_rport();<br>
if (nat_uac_test("23")) {<br>
if (is_method("REGISTER")) {<br>
fix_nated_register();<br>
setbflag(NAT);<br>
} else {<br>
fix_nated_contact();<br>
setflag(NAT);<br>
}<br>
}<br>
<br>
<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
<br>
# validate the sequential request against dialog<br>
if ( $DLG_status!=NULL && !validate_dialog() ) {<br>
xlog("In-Dialog $rm from $si (callid=$ci) is not valid according to dialog\n");<br>
## exit;<br>
}<br>
<br>
if (is_method("BYE")) {<br>
setflag(ACC_DO); # do accounting ...<br>
setflag(ACC_FAILED); # ... even if the transaction fails<br>
} else if (is_method("INVITE")) {<br>
# even if in most of the cases is useless, do RR for<br>
# re-INVITEs alos, as some buggy clients do change route set<br>
# during the dialog.<br>
record_route();<br>
}<br>
<br>
if (check_route_param("nat=yes"))<br>
setflag(NAT);<br>
<br>
# route it out to whatever destination was set by loose_route()<br>
# in $du (destination URI).<br>
route(relay);<br>
} else {<br>
if (is_method("SUBSCRIBE") && $rd == "<a href="http://127.0.0.1:5060" rel="noreferrer" target="_blank">127.0.0.1:5060</a>") { # CUSTOMIZE ME<br>
# in-dialog subscribe requests<br>
route(handle_presence);<br>
exit;<br>
}<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but stateful ACK; must be an ACK after<br>
# a 487 or e.g. 404 from upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching transaction -><br>
# ignore and discard<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
exit;<br>
}<br>
<br>
# CANCEL processing<br>
if (is_method("CANCEL"))<br>
{<br>
if (t_check_trans())<br>
t_relay();<br>
exit;<br>
}<br>
<br>
t_check_trans();<br>
<br>
if ( !(is_method("REGISTER") ) ) {<br>
<br>
if (from_uri==myself)<br>
<br>
{<br>
<br>
# authenticate if from local subscriber<br>
# authenticate all initial non-REGISTER request that pretend to be<br>
# generated by local subscriber (domain from FROM URI is local)<br>
if (!proxy_authorize("", "subscriber")) {<br>
proxy_challenge("", "0");<br>
exit;<br>
}<br>
if (!db_check_from()) {<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
consume_credentials();<br>
# caller authenticated<br>
<br>
} else {<br>
# if caller is not local, then called number must be local<br>
<br>
if (!uri==myself) {<br>
send_reply("403","Rely forbidden");<br>
exit;<br>
}<br>
}<br>
<br>
}<br>
<br>
# preloaded route checking<br>
if (loose_route()) {<br>
xlog("L_ERR",<br>
"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");<br>
if (!is_method("ACK"))<br>
sl_send_reply("403","Preload Route denied");<br>
exit;<br>
}<br>
<br>
# record routing<br>
if (!is_method("REGISTER|MESSAGE"))<br>
record_route();<br>
<br>
# account only INVITEs<br>
if (is_method("INVITE")) {<br>
<br>
# create dialog with timeout<br>
if ( !create_dialog("B") ) {<br>
send_reply("500","Internal Server Error");<br>
exit;<br>
}<br>
<br>
setflag(ACC_DO); # do accounting<br>
}<br>
<br>
<br>
if (!uri==myself) {<br>
append_hf("P-hint: outbound\r\n");<br>
<br>
# if you have some interdomain connections via TLS<br>
## CUSTOMIZE IF NEEDED<br>
##if ($rd=="<a href="http://tls_domain1.net" rel="noreferrer" target="_blank">tls_domain1.net</a>"<br>
## || $rd=="<a href="http://tls_domain2.net" rel="noreferrer" target="_blank">tls_domain2.net</a>"<br>
##) {<br>
## force_send_socket(tls:<a href="http://127.0.0.1:5061" rel="noreferrer" target="_blank">127.0.0.1:5061</a>); # CUSTOMIZE<br>
##}<br>
<br>
route(relay);<br>
}<br>
<br>
# requests for my domain<br>
<br>
if( is_method("PUBLISH|SUBSCRIBE"))<br>
route(handle_presence);<br>
<br>
if (is_method("REGISTER"))<br>
{<br>
# authenticate the REGISTER requests<br>
if (!www_authorize("", "subscriber"))<br>
{<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
<br>
if (!db_check_to())<br>
{<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
if ( proto==TCP || proto==TLS || 0 ) setflag(TCP_PERSISTENT);<br>
<br>
if (isflagset(NAT)) {<br>
setbflag(SIP_PING_FLAG);<br>
}<br>
<br>
if (!save("location"))<br>
sl_reply_error();<br>
<br>
exit;<br>
}<br>
<br>
if ($rU==NULL) {<br>
# request with no Username in RURI<br>
sl_send_reply("484","Address Incomplete");<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
# do lookup with method filtering<br>
if (!lookup("location","m")) {<br>
if (!db_does_uri_exist()) {<br>
send_reply("420","Bad Extension");<br>
exit;<br>
}<br>
<br>
t_newtran();<br>
t_reply("404", "Not Found");<br>
exit;<br>
}<br>
<br>
if (isbflagset(NAT)) setflag(NAT);<br>
<br>
# when routing via usrloc, log the missed calls also<br>
setflag(ACC_MISSED);<br>
route(relay);<br>
}<br>
<br>
<br>
route[relay] {<br>
# for INVITEs enable some additional helper routes<br>
if (is_method("INVITE")) {<br>
<br>
# if (isflagset(NAT)) {<br>
# rtpproxy_offer("ro");<br>
# }<br>
<br>
t_on_branch("per_branch_ops");<br>
t_on_reply("handle_nat");<br>
t_on_failure("missed_call");<br>
}<br>
<br>
if (isflagset(NAT)) {<br>
add_rr_param(";nat=yes");<br>
}<br>
<br>
if (!t_relay()) {<br>
send_reply("500","Internal Error");<br>
};<br>
exit;<br>
}<br>
<br>
<br>
# Presence route<br>
route[handle_presence]<br>
{<br>
if (!t_newtran())<br>
{<br>
sl_reply_error();<br>
exit;<br>
}<br>
<br>
if(is_method("PUBLISH"))<br>
{<br>
handle_publish();<br>
}<br>
else<br>
if( is_method("SUBSCRIBE"))<br>
{<br>
handle_subscribe();<br>
}<br>
<br>
exit;<br>
}<br>
<br>
<br>
branch_route[per_branch_ops] {<br>
xlog("new branch at $ru\n");<br>
}<br>
<br>
<br>
onreply_route[handle_nat] {<br>
if (nat_uac_test("1"))<br>
fix_nated_contact();<br>
# if ( isflagset(NAT) )<br>
# rtpproxy_answer("ro");<br>
xlog("incoming reply\n");<br>
}<br>
<br>
<br>
failure_route[missed_call] {<br>
if (t_was_cancelled()) {<br>
exit;<br>
}<br>
<br>
# uncomment the following lines if you want to block client<br>
# redirect based on 3xx replies.<br>
##if (t_check_status("3[0-9][0-9]")) {<br>
##t_reply("404","Not found");<br>
## exit;<br>
##}<br>
<br>
<br>
}<br>
<br>
<br>
<br>
local_route {<br>
if (is_method("BYE") && $DLG_dir=="UPSTREAM") {<br>
<br>
acc_db_request("200 Dialog Timeout", "acc");<br>
<br>
}<br>
}<br>
<br>
Regards,<br>
Alexander<span class=""><br>
<br>
On 29.10.2015 17:51, Patrick Wakano wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Usually when someone runs into the Too Many Hops issue, that's because<br>
you got a loop in your routing logic.<br>
Maybe you are not handling the Register but forwarding it to yourself<br>
causing the loop.<br>
<br>
Patrick<br>
<br>
On Thu, Oct 29, 2015 at 2:32 PM, Rodrigo Pimenta Carvalho<br>
<<a href="mailto:pimenta@inatel.br" target="_blank">pimenta@inatel.br</a>> wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Sorry.<br>
<br>
Where I wrote SIP INVITE I wanted to mean SIP REGISTER....<br>
<br>
RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br></span>
Ph: +55 35 3471 9200 [1] RAMAL 979<span class=""><br>
<br>
________________________________________<br>
De: Rodrigo Pimenta Carvalho<br>
Enviado: quinta-feira, 29 de outubro de 2015 14:31<br>
Para: OpenSIPS users mailling list<br>
Assunto: Re: [OpenSIPS-Users] Bare Bones<br>
<br>
Hi.<br>
<br>
I´m not expert in SIP neither OpenSIPS. But I guess the message SIP<br>
INVITE has an attribute that shows the max allowed number of hops<br>
that the message will reach before being refused.<br>
Do you know how to use Wireshark? Try to check if the SIP INVITE is<br>
really traveling by too many hops before being refused or check if<br>
that attribute has a low value.<br>
<br>
You also can check the OpenSIPS log to see if something is wrong.<br>
I´m not in my linux now, so I can´t check how to run with log. But<br>
if you need it, tell me and I will check for you.<br>
<br>
Best regards.<br>
<br>
RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br></span>
Ph: +55 35 3471 9200 [1] RAMAL 979<div><div class="h5"><br>
<br>
________________________________________<br>
De: <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a><br>
<<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> em nome de Alexander Shukaev<br>
<<a href="mailto:opensips@Alexander.Shukaev.name" target="_blank">opensips@Alexander.Shukaev.name</a>><br>
Enviado: quinta-feira, 29 de outubro de 2015 01:38<br>
Para: OpenSIPS Users<br>
Assunto: [OpenSIPS-Users] Bare Bones<br>
<br>
Hello,<br>
<br>
Complete VoIP, SIP, and OpenSIPS newbie here. So far, I've been<br>
able to<br>
build OpenSIPS, establish PostgreSQL server, run both, and add 2<br>
subscribers into DB. Unfortunately, testing from Ekiga, gives me<br>
the<br>
"Could not register (Too many hops)" error when I try to register<br>
one of<br>
those subscribers in it. Could anybody lend a hand here and guide<br>
me<br>
through this process. The goal is to at least be able to send a<br>
message<br>
between those 2 subscribers and at most to establish a phone call<br>
between them. I know that this can be a misconfiguration issue from<br>
my<br>
side and that the information I provide here is brief, but I am<br>
ready to<br>
expand any point if that's needed for progress; just let me know<br>
which<br>
logs, configurations, etc. I should post. Thank you in advance for<br>
your<br>
assistance.<br>
<br>
Kind regards,<br>
Alexander<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
</div></div><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a> [2]<span class=""><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
</span><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a> [2]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] tel:%2B55%2035%203471%209200<br>
[2] <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><span class=""><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>