<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I don't remember any relevant updates to msilo lately. So it should
be the same.<br>
<br>
Unfortunately the heavy traveling I had lately added a lot of load
for the moment to properly investigate you case. But msilo is
running fine on many installations here, so I expect to be some
problem with the config.<br>
<br>
I haven't seen any sip trace taken on the server, which I asked,
iirc. Did you monitored the loopback interface?<br>
<br>
You can try to set the outbound proxy address to the kamailio's ip
and port:<br>
<br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules/msilo.html#idp121032">http://kamailio.org/docs/modules/stable/modules/msilo.html#idp121032</a><br>
<br>
Then see what happens on the network interface.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 17/07/14 14:10, Peter Villeneuve
wrote:<br>
</div>
<blockquote
cite="mid:CAEiJqQNV2xGoaXh9gadQ9PStX+KeX2ZmUL+g49183U-M3ti-CA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>I guess no one really knows why it isn't working either.</div>
The only option I have left seems to be to try and update to the
4.2 nightly and hope that whatever's wrong is a bug with 4.1.4
and not a simple mistake in my routing syntax or logic.
<div>
<br>
</div>
<div>Daniel, is 4.2 nightly debian package stable enough for a
production system? Would you recommend I upgrade?</div>
<div><br>
</div>
<div>Thanks</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Wed, Jul 16, 2014 at 9:37 PM, Peter Villeneuve <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:petervnv1@gmail.com" target="_blank">petervnv1@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Can anyone help please? I was supposed to
have this server up and running hours ago and I can't
think of anything to do next to help debug this.
<div><br>
</div>
<div>Thanks</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Wed, Jul 16, 2014 at 7:01
PM, Peter Villeneuve <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:petervnv1@gmail.com"
target="_blank">petervnv1@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I removed the localhost listeners
on TCP and UDP, and, as I suspected, Kamailio
doesn't seem to like that.
<div>Why isn't kamailio sending the message back
through the TLS socket?</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div>
<pre style="margin-top:0px;padding:0px;line-height:15.600000381469727px;font-size:16px;color:rgb(57,57,57)">NOTICE: <script>: -------------------------MESSAGE PROCESSING: dumping offline messages
ERROR: tm [ut.h:343]: uri2dst2(): no corresponding socket for af 2
ERROR: tm [uac.c:266]: t_uac_prepare(): t_uac: no socket found</pre>
</div>
</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Jul 16,
2014 at 4:44 PM, Peter Villeneuve <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:petervnv1@gmail.com"
target="_blank">petervnv1@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div dir="ltr">And here's the full
routing block. I copied it from
someone else on the list that was
troubleshooting msilo a while back.
<div>
Also, I can confirm the message
never gets delivered because it
remains in msilo DB and kamailio
logs shows it trying and trying.</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>####### Routing Logic ########</div>
<div><br>
</div>
<div><br>
</div>
<div># Main SIP request routing
logic</div>
<div># - processing of any incoming
SIP request starts with this route</div>
<div>route {</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
per request initial checks</div>
<div><span
style="white-space:pre-wrap"> </span>route(REQINIT);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
NAT detection</div>
<div><span
style="white-space:pre-wrap"> </span>route(NAT);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
handle requests within SIP dialogs</div>
<div><span
style="white-space:pre-wrap"> </span>route(WITHINDLG);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>###
only initial requests (no To tag)</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
CANCEL processing</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("CANCEL"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>if
(t_check_trans())</div>
<div><span
style="white-space:pre-wrap"> </span>t_relay();</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("MESSAGE"))</div>
<div> {</div>
<div>
log(1,"-------------------------------------------------------->WE
HAVE A NEW MESSAGE\n");</div>
<div> route(MSILO_MESSAGE);</div>
<div> }</div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span>t_check_trans();</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
authentication</div>
<div><span
style="white-space:pre-wrap"> </span>route(AUTH);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
record routing for dialog forming
requests (in case they are routed)</div>
<div><span
style="white-space:pre-wrap"> </span>#
- remove preloaded route headers</div>
<div><span
style="white-space:pre-wrap"> </span>remove_hf("Route");</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("INVITE|SUBSCRIBE"))</div>
<div><span
style="white-space:pre-wrap"> </span>record_route();</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
account only INVITEs</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("INVITE"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>setflag(FLT_ACC);
# do accounting</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
dispatch requests to foreign
domains</div>
<div><span
style="white-space:pre-wrap"> </span>route(SIPOUT);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>###
requests for my local domains</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
handle presence related requests</div>
<div><span
style="white-space:pre-wrap"> </span>route(PRESENCE);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
handle registrations</div>
<div><span
style="white-space:pre-wrap"> </span>route(REGISTRAR);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
($rU==$null)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>#
request with no Username in RURI</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("484","Address
Incomplete");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
dispatch destinations to PSTN</div>
<div><span
style="white-space:pre-wrap"> </span>route(PSTN);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
user location service</div>
<div><span
style="white-space:pre-wrap"> </span>route(LOCATION);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>route(RELAY);</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div>route[RELAY] {</div>
<div>#!ifdef WITH_NAT</div>
<div><span
style="white-space:pre-wrap"> </span>if
(check_route_param("nat=yes")) {</div>
<div><span
style="white-space:pre-wrap"> </span>setbflag(FLB_NATB);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(isflagset(FLT_NATS) ||
isbflagset(FLB_NATB)) {</div>
<div><span
style="white-space:pre-wrap"> </span>route(RTPPROXY);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><br>
</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>/*
example how to enable some
additional event routes */</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("INVITE")) {</div>
<div><span
style="white-space:pre-wrap"> </span>#t_on_branch("BRANCH_ONE");</div>
<div><span
style="white-space:pre-wrap"> </span>t_on_reply("REPLY_ONE");</div>
<div><span
style="white-space:pre-wrap"> </span>t_on_failure("FAIL_ONE");</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!t_relay()) {</div>
<div><span
style="white-space:pre-wrap"> </span>sl_reply_error();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div>}</div>
<div><br>
</div>
<div>##storing offline messages</div>
<div>route[MSILO_MESSAGE]{</div>
<div>
<span style="white-space:pre-wrap">
</span>if (lookup("location")){</div>
<div><span
style="white-space:pre-wrap"> </span>t_on_failure("FAIL_MESSAGE");</div>
<div><span
style="white-space:pre-wrap"> </span>t_relay();</div>
<div><span
style="white-space:pre-wrap"> </span>xlog("L_NOTICE","---------------------------------MI:
($mi), MB: ($mb)\n");</div>
<div><span
style="white-space:pre-wrap"> </span>}else{</div>
<div>
<span style="white-space:pre-wrap">
</span>xlog("L_NOTICE","------------------MESSAGE
PROCESSING: location not found,
storing offline message ID:
($ru)\n");</div>
<div><span
style="white-space:pre-wrap"> </span>m_store("$ru");</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("202",
"ACCEPTED");</div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span>xlog("L_NOTICE","------------------MESSAGE
PROCESSING: location not found,
stored offline message ID:
($ru)\n");</div>
<div>};</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div>};</div>
<div><br>
</div>
<div>failure_route[FAIL_MESSAGE]{</div>
<div><br>
</div>
<div>
xlog("L_NOTICE","------------------MESSAGE
PROCESSING: user cannot be
reached, storing offline message
ID: ($ou)\n");</div>
<div> m_store("$ou");</div>
<div> t_reply("202", "ACCEPTED");</div>
<div>
xlog("L_NOTICE","------------------MESSAGE
PROCESSING: user cannot be
reached, stored offline message
ID: ($ou)\n");</div>
<div> exit;</div>
<div> }</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div># Per SIP request initial
checks</div>
<div>route[REQINIT] {</div>
<div>#!ifdef WITH_ANTIFLOOD</div>
<div><span
style="white-space:pre-wrap"> </span>#
flood dection from same IP and
traffic ban for a while</div>
<div><span
style="white-space:pre-wrap"> </span>#
be sure you exclude checking
trusted peers, such as pstn
gateways</div>
<div><span
style="white-space:pre-wrap"> </span>#
- local host excluded (e.g., loop
to self)</div>
<div><span
style="white-space:pre-wrap"> </span>if(src_ip!=myself)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>if($sht(ipban=>$si)!=$null)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>#
ip is already blocked</div>
<div><span
style="white-space:pre-wrap"> </span>xdbg("request
from blocked IP - $rm from $fu
(IP:$si:$sp)\n");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!pike_check_req())</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>xlog("L_ALERT","ALERT:
pike blocking $rm from $fu
(IP:$si:$sp)\n");</div>
<div><span
style="white-space:pre-wrap"> </span>$sht(ipban=>$si)
= 1;</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><br>
</div>
<div>
<span style="white-space:pre-wrap">
</span>if
(!mf_process_maxfwd_header("10"))
{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("483","Too
Many Hops");</div>
<div>
<span style="white-space:pre-wrap">
</span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if(!sanity_check("1511",
"7"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>xlog("Malformed
SIP message from $si:$sp\n");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>}</div>
<div><br>
</div>
<div># Handle requests within SIP
dialogs</div>
<div>route[WITHINDLG] {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(has_totag()) {</div>
<div><span
style="white-space:pre-wrap"> </span>#
sequential request withing a
dialog should</div>
<div><span
style="white-space:pre-wrap"> </span>#
take the path determined by
record-routing</div>
<div><span
style="white-space:pre-wrap"> </span>if
(loose_route()) {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("BYE")) {</div>
<div><span
style="white-space:pre-wrap"> </span>setflag(FLT_ACC);
# do accounting ...</div>
<div><span
style="white-space:pre-wrap"> </span>setflag(FLT_ACCFAILED);
# ... even if the transaction
fails</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>route(RELAY);</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("SUBSCRIBE") &&
uri == myself) {</div>
<div><span
style="white-space:pre-wrap"> </span>#
in-dialog subscribe requests</div>
<div><span
style="white-space:pre-wrap"> </span>route(PRESENCE);</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
( is_method("ACK") ) {</div>
<div><span
style="white-space:pre-wrap"> </span>if
( t_check_trans() ) {</div>
<div><span
style="white-space:pre-wrap"> </span>#
no loose-route, but stateful ACK;</div>
<div><span
style="white-space:pre-wrap"> </span>#
must be an ACK after a 487</div>
<div><span
style="white-space:pre-wrap"> </span>#
or e.g. 404 from upstream server</div>
<div><span
style="white-space:pre-wrap"> </span>t_relay();</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><span
style="white-space:pre-wrap"> </span>#
ACK without matching transaction
... ignore and discard</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("404","Not
here");</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>}</div>
<div><br>
</div>
<div># Handle SIP registrations</div>
<div>route[REGISTRAR] {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("REGISTER"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span>if(isflagset(FLT_NATS))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>setbflag(FLB_NATB);</div>
<div><span
style="white-space:pre-wrap"> </span>#
uncomment next line to do SIP NAT
pinging </div>
<div><span
style="white-space:pre-wrap"> </span>setbflag(FLB_NATSIPPING);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!save("location"))</div>
<div><span
style="white-space:pre-wrap"> </span>sl_reply_error();</div>
<div><span
style="white-space:pre-wrap"> </span>#
MSILO - dumping user's offline
messages</div>
<div>
m_dump();</div>
<div>
log(1,"-------------------------MESSAGE
PROCESSING: dumping offline
messages\n");</div>
<div> </div>
<div> exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>}</div>
<div><br>
</div>
<div># USER location service</div>
<div>route[LOCATION] {</div>
<div><br>
</div>
<div>#!ifdef WITH_ALIASDB</div>
<div><span
style="white-space:pre-wrap"> </span>#
search in DB-based aliases</div>
<div><span
style="white-space:pre-wrap"> </span>alias_db_lookup("dbaliases");</div>
<div>#!endif</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!lookup("location")) {</div>
<div><span
style="white-space:pre-wrap"> </span>switch
($rc) {</div>
<div><span
style="white-space:pre-wrap"> </span>case
-1:</div>
<div><span
style="white-space:pre-wrap"> </span>case
-3:</div>
<div><span
style="white-space:pre-wrap"> </span>t_newtran();</div>
<div><span
style="white-space:pre-wrap"> </span>t_reply("404",
"Not Found");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>case
-2:</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("405",
"Method Not Allowed");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
when routing via usrloc, log the
missed calls also</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("INVITE"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>setflag(FLT_ACCMISSED);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>}</div>
<div><br>
</div>
<div># Presence server route</div>
<div>route[PRESENCE] {</div>
<div><span
style="white-space:pre-wrap"> </span>if(!is_method("PUBLISH|SUBSCRIBE"))</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div><br>
</div>
<div>#!ifdef WITH_PRESENCE</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!t_newtran())</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_reply_error();</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>};</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if(is_method("PUBLISH"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>handle_publish();</div>
<div><span
style="white-space:pre-wrap"> </span>t_release();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>else</div>
<div><span
style="white-space:pre-wrap"> </span>if(
is_method("SUBSCRIBE"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div>
<span style="white-space:pre-wrap">
</span>handle_subscribe();</div>
<div><span
style="white-space:pre-wrap"> </span>t_release();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div>#!endif</div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span>#
if presence enabled, this part
will not be executed</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("PUBLISH") ||
$rU==$null)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("404",
"Not here");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div>}</div>
<div><br>
</div>
<div># Authentication route</div>
<div>route[AUTH] {</div>
<div>#!ifdef WITH_AUTH</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("REGISTER"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>#
authenticate the REGISTER requests
(uncomment to enable auth)</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!www_authorize("$td",
"subscriber"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>www_challenge("$td",
"0");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
($au!=$tU)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("403","Forbidden
auth ID");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><br>
</div>
<div>#!ifdef WITH_IPAUTH</div>
<div><span
style="white-space:pre-wrap"> </span>if(allow_source_address())</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>#
source IP allowed</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
authenticate if from local
subscriber</div>
<div><span
style="white-space:pre-wrap"> </span>if
(from_uri==myself)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!proxy_authorize("$fd",
"subscriber")) {</div>
<div><span
style="white-space:pre-wrap"> </span>proxy_challenge("$fd",
"0");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("PUBLISH"))</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>if
($au!=$tU) {</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("403","Forbidden
auth ID");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><span
style="white-space:pre-wrap"> </span>if
($au!=$fU) {</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("403","Forbidden
auth ID");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>consume_credentials();</div>
<div><span
style="white-space:pre-wrap"> </span>#
caller authenticated</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><span
style="white-space:pre-wrap"> </span>#
caller is not local subscriber,
then check if it calls</div>
<div><span
style="white-space:pre-wrap"> </span>#
a local destination, otherwise
deny, not an open relay here</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!uri==myself)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("403","Not
relaying");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div>}</div>
<div><br>
</div>
<div># Caller NAT detection route</div>
<div>route[NAT] {</div>
<div>#!ifdef WITH_NAT</div>
<div><span
style="white-space:pre-wrap"> </span>force_rport();</div>
<div><span
style="white-space:pre-wrap"> </span>if
(nat_uac_test("19")) {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(method=="REGISTER") {</div>
<div><span
style="white-space:pre-wrap"> </span>fix_nated_register();</div>
<div><span
style="white-space:pre-wrap"> </span>}
else {</div>
<div><span
style="white-space:pre-wrap"> </span>fix_nated_contact();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>setflag(FLT_NATS);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div>}</div>
<div><br>
</div>
<div># RTPProxy control</div>
<div>route[RTPPROXY] {</div>
<div>#!ifdef WITH_NAT</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("BYE")) {</div>
<div><span
style="white-space:pre-wrap"> </span>unforce_rtp_proxy();</div>
<div><span
style="white-space:pre-wrap"> </span>}
else if (is_method("INVITE")){</div>
<div><span
style="white-space:pre-wrap"> </span></div>
<div><span
style="white-space:pre-wrap"> </span>rtpproxy_offer();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!has_totag())
add_rr_param(";nat=yes");</div>
<div>#!endif</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div>}</div>
<div><br>
</div>
<div># Routing to foreign domains</div>
<div>route[SIPOUT] {</div>
<div><span
style="white-space:pre-wrap"> </span>if
(!uri==myself)</div>
<div><span
style="white-space:pre-wrap"> </span>{</div>
<div><span
style="white-space:pre-wrap"> </span>append_hf("P-hint:
outbound\r\n");</div>
<div><span
style="white-space:pre-wrap"> </span>route(RELAY);</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>}</div>
<div><br>
</div>
<div># PSTN GW routing</div>
<div>route[PSTN] {</div>
<div>#!ifdef WITH_PSTN</div>
<div><span
style="white-space:pre-wrap"> </span>#
check if PSTN GW IP is defined</div>
<div><span
style="white-space:pre-wrap"> </span>if
(strempty($sel(cfg_get.pstn.gw_ip)))
{</div>
<div><span
style="white-space:pre-wrap"> </span>xlog("SCRIPT:
PSTN rotuing enabled but
pstn.gw_ip not defined\n");</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
route to PSTN dialed numbers
starting with '+' or '00'</div>
<div><span
style="white-space:pre-wrap"> </span>#
(international format)</div>
<div><span
style="white-space:pre-wrap"> </span>#
- update the condition to match
your dialing rules for PSTN
routing</div>
<div><span
style="white-space:pre-wrap"> </span>if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$"))</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
only local users allowed to call</div>
<div><span
style="white-space:pre-wrap"> </span>if(from_uri!=myself)
{</div>
<div><span
style="white-space:pre-wrap"> </span>sl_send_reply("403",
"Not Allowed");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>$ru
= "sip:" + $rU + "@" +
$sel(cfg_get.pstn.gw_ip);</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>route(RELAY);</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div>#!endif</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>return;</div>
<div>}</div>
<div><br>
</div>
<div># XMLRPC routing</div>
<div>#!ifdef WITH_XMLRPC</div>
<div>route[XMLRPC]</div>
<div>{</div>
<div><span
style="white-space:pre-wrap"> </span>#
allow XMLRPC from localhost</div>
<div><span
style="white-space:pre-wrap"> </span>if
((method=="POST" || method=="GET")</div>
<div><span
style="white-space:pre-wrap"> </span>&&
(src_ip==127.0.0.1)) {</div>
<div><span
style="white-space:pre-wrap"> </span>#
close connection only for
xmlrpclib user agents (there is a
bug in</div>
<div>
<span style="white-space:pre-wrap">
</span># xmlrpclib: it waits for
EOF before interpreting the
response).</div>
<div><span
style="white-space:pre-wrap"> </span>if
($hdr(User-Agent) =~ "xmlrpclib")</div>
<div><span
style="white-space:pre-wrap"> </span>set_reply_close();</div>
<div><span
style="white-space:pre-wrap"> </span>set_reply_no_connect();</div>
<div><span
style="white-space:pre-wrap"> </span>dispatch_rpc();</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>send_reply("403",
"Forbidden");</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div>}</div>
<div>#!endif</div>
<div><br>
</div>
<div># Sample branch router</div>
<div>branch_route[BRANCH_ONE] {</div>
<div><span
style="white-space:pre-wrap"> </span>xdbg("new
branch at $ru\n");</div>
<div>}</div>
<div><br>
</div>
<div># Sample onreply route</div>
<div>onreply_route[REPLY_ONE] {</div>
<div><span
style="white-space:pre-wrap"> </span>xdbg("incoming
reply\n");</div>
<div>#!ifdef WITH_NAT</div>
<div>
<span style="white-space:pre-wrap">
</span>if ((isflagset(FLT_NATS) ||
isbflagset(FLB_NATB))</div>
<div><span
style="white-space:pre-wrap"> </span>&&
status=~"(183)|(2[0-9][0-9])") {</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>rtpproxy_answer();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><span
style="white-space:pre-wrap"> </span>if
(isbflagset("6")) {</div>
<div><span
style="white-space:pre-wrap"> </span>fix_nated_contact();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div>}</div>
<div><br>
</div>
<div># Sample failure route</div>
<div>
failure_route[FAIL_ONE] {</div>
<div>#!ifdef WITH_NAT</div>
<div><span
style="white-space:pre-wrap"> </span>if
(is_method("INVITE")</div>
<div><span
style="white-space:pre-wrap"> </span>&&
(isbflagset(FLB_NATB) ||
isflagset(FLT_NATS))) {</div>
<div><span
style="white-space:pre-wrap"> </span>unforce_rtp_proxy();</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div>#!endif</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>if
(t_is_canceled()) {</div>
<div><span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
uncomment the following lines if
you want to block client </div>
<div><span
style="white-space:pre-wrap"> </span>#
redirect based on 3xx replies.</div>
<div><span
style="white-space:pre-wrap"> </span>##if
(t_check_status("3[0-9][0-9]")) {</div>
<div><span
style="white-space:pre-wrap"> </span>##t_reply("404","Not
found");</div>
<div><span
style="white-space:pre-wrap"> </span>##<span
style="white-space:pre-wrap"> </span>exit;</div>
<div><span
style="white-space:pre-wrap"> </span>##}</div>
<div><br>
</div>
<div><span
style="white-space:pre-wrap"> </span>#
uncomment the following lines if
you want to redirect the failed </div>
<div><span
style="white-space:pre-wrap"> </span>#
calls to a different new
destination</div>
<div><span
style="white-space:pre-wrap"> </span>##if
(t_check_status("486|408")) {</div>
<div><span
style="white-space:pre-wrap"> </span>##<span
style="white-space:pre-wrap"> </span>sethostport("<a
moz-do-not-send="true"
href="http://192.168.2.100:5060"
target="_blank">192.168.2.100:5060</a>");</div>
<div><span
style="white-space:pre-wrap"> </span>##<span
style="white-space:pre-wrap"> </span>append_branch();</div>
<div><span
style="white-space:pre-wrap"> </span>##<span
style="white-space:pre-wrap"> </span>#
do not set the missed call flag
again</div>
<div><span
style="white-space:pre-wrap"> </span>##<span
style="white-space:pre-wrap"> </span>t_relay();</div>
<div><span
style="white-space:pre-wrap"> </span>##}</div>
<div>}</div>
</div>
</div>
<div>
<div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Wed,
Jul 16, 2014 at 4:38 PM, Peter
Villeneuve <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:petervnv1@gmail.com"
target="_blank">petervnv1@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">Thanks for your
help Daniel.
<div><br>
</div>
<div>OK I ngrepped port 5060
and indeed the message
tries to get delivered.
However it never arrives
at the client (1010 in
this case).</div>
<div>I have added localhost
listeners for UDP and TCP,
even though all clients
register through TLS only
(could this be the root of
the problem?). I added
localhost listeners
because I was getting the
no socket found error
message.</div>
<div><br>
</div>
<div>
<div>Listening on </div>
<div> udp: <a
moz-do-not-send="true"
href="http://127.0.0.1:5080" target="_blank">127.0.0.1:5080</a></div>
<div> tcp: <a
moz-do-not-send="true"
href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a></div>
<div> tls:
79.my.server.IP1:5061</div>
<div>Aliases: </div>
<div> tcp:
localhost:5060</div>
<div> udp:
localhost:5080</div>
<div> *:
my.domain.com:*</div>
</div>
<div><br>
</div>
<div>
<div>U 2014/07/16
15:29:14.904285 <a
moz-do-not-send="true"
href="http://127.0.0.1:5080" target="_blank">127.0.0.1:5080</a> ->
79.my.server.IP1:5060</div>
<div>MESSAGE <a
moz-do-not-send="true"
href="mailto:sip%3A1010@my.domain.com" target="_blank">sip:1010@my.domain.com</a>
SIP/2.0.</div>
<div>Via: SIP/2.0/UDP
127.0.0.1:5080;branch=z9hG4bKcde3.542219f4000000000000000000000000.0.</div>
<div>To: <<a
moz-do-not-send="true"
href="mailto:sip%3A1010@my.domain.com" target="_blank">sip:1010@my.domain.com</a>>.</div>
<div>From: <<a
moz-do-not-send="true"
href="mailto:sip%3A1000@my.domain.com" target="_blank">sip:1000@my.domain.com</a>>;tag=def4124455da8a0b8e97eafabd028e26-2c30.</div>
<div>CSeq: 10 MESSAGE.</div>
<div>Call-ID: <a
moz-do-not-send="true"
href="mailto:16b126996f51d89c-12460@127.0.0.1" target="_blank">16b126996f51d89c-12460@127.0.0.1</a>.</div>
<div>Max-Forwards: 70.</div>
<div>Content-Length: 58.</div>
<div>User-Agent: kamailio
(4.1.4 (x86_64/linux)).</div>
<div>Date: Wed, 16 Jul
2014 15:22:31 GMT.</div>
<div>Content-Type:
text/plain.</div>
<div>.</div>
<div>[Offline message -
Wed Jul 16 15:22:31
2014] Test 1,2,3</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<br>
<div
class="gmail_quote">On
Wed, Jul 16, 2014 at
8:58 AM,
Daniel-Constantin
Mierla <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0 0
0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div
bgcolor="#FFFFFF"
text="#000000">
Hello,<br>
<br>
can you watch
the sip traffic
on the network
to see if the
sip messages is
sent out? You
can use ngrep,
like:<br>
<br>
ngrep -d any -qt
-W byline "sip"
port 5060<br>
<br>
Cheers,<br>
Daniel
<div>
<div><br>
<br>
<div>On
14/07/14
19:56, Peter
Villeneuve
wrote:<br>
</div>
</div>
</div>
<blockquote
type="cite">
<div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>This is
most likely a
stupid mistake
on my route
config, but
msilo
correctly
stores
messages for
offline users,
but when they
come back
online, the
message never
arrives.</div>
<div><br>
</div>
<div>Looking
through the
debug logs
indeed there
is an error,
with status
408, which
suggests
kamaiio can't
find a route
to the user
that just
logged. Before
I spend hours
looking
through all
the routing
blocks,
perhaps
someone more
exprienced in
kamailio can
see the
problem right
away and offer
a solution?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>DEBUG:
msilo
[msilo.c:1148]:
m_dump(): msg
[1-12] for: <a
moz-do-not-send="true" href="mailto:sip%3A1010@my.domain.com"
target="_blank">sip:1010@my.domain.com</a></div>
<div>DEBUG:
<core>
[io_wait.h:617]:
io_watch_del():
DBG:
io_watch_del
(0x8e3040, 9,
-1, 0x10)
fd_no=2 called</div>
<div>DEBUG:
<core>
[tcp_read.c:1437]:
release_tcpconn():
releasing con
0x7f61ced1b1b0,
state 1, fd=9,
id=1</div>
<div> DEBUG:
<core>
[tcp_read.c:1438]:
release_tcpconn():
extra_data
0x7f61ced1c4f8</div>
<div>DEBUG:
<core>
[tcp_main.c:3385]:
handle_tcp_child():
handle_tcp_child:
reader
response=
7f61ced1b1b0,
1 from 0 </div>
<div>DEBUG:
<core>
[io_wait.h:390]:
io_watch_add():
DBG:
io_watch_add(0x89ec40,
26, 2,
0x7f61ced1b1b0),
fd_no=21</div>
<div>DEBUG:
<core>
[tcp_main.c:3515]:
handle_tcp_child():
handle_tcp_child:
CONN_RELEASE
0x7f61ced1b1b0
refcnt= 1</div>
<div>DEBUG: tm
[t_reply.c:1304]:
t_should_relay_response():
->>>>>>>>>
T_code=0,
new_code=408</div>
<div>DEBUG: tm
[t_reply.c:2086]:
local_reply():
DEBUG:
local_reply:
branch=0,
save=0,
winner=0</div>
<div>DEBUG: tm
[t_reply.c:2123]:
local_reply():
DEBUG: local
transaction
completed</div>
<div>DEBUG: tm
[t_hooks.c:288]:
run_trans_callbacks_internal():
DBG:
trans=0x7f61ced1d868,
callback type
1024, id 0
entered</div>
<div> DEBUG:
msilo
[msilo.c:1317]:
m_tm_callback():
<b>completed
with status
408</b> [mid:
140058058335472/13]</div>
<div>DEBUG:
msilo
[msilo.c:1325]:
m_tm_callback():
message
<13> was
not sent
successfully</div>
<div>DEBUG:
msilo
[ms_msg_list.c:236]:
msg_list_set_flag():
mid:13 fl:8</div>
<div>DEBUG: tm
[t_reply.c:1304]:
t_should_relay_response():
->>>>>>>>>
T_code=0,
new_code=408</div>
<div>DEBUG: tm
[t_reply.c:2086]:
local_reply():
DEBUG:
local_reply:
branch=0,
save=0,
winner=0</div>
<div>DEBUG: tm
[t_reply.c:2123]:
local_reply():
DEBUG: local
transaction
completed</div>
<div>DEBUG: tm
[t_hooks.c:288]:
run_trans_callbacks_internal():
DBG:
trans=0x7f61ced5f098,
callback type
1024, id 0
entered</div>
<div> DEBUG:
msilo
[msilo.c:1317]:
m_tm_callback():
completed with
status 408
[mid:
140058058329184/12]</div>
<div>DEBUG:
msilo
[msilo.c:1325]:
m_tm_callback():
message
<12> was
not sent
successfully</div>
<div>DEBUG:
msilo
[ms_msg_list.c:236]:
msg_list_set_flag():
mid:12 fl:8</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
<span><font
color="#888888">
</font></span></blockquote>
<span><font
color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
<br>
_______________________________________________<br>
SIP Express Router
(SER) and Kamailio
(OpenSER) -
sr-users mailing
list<br>
<a
moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a
moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>