<div dir="ltr">Thank you Klaus i am trying to do that myself if you see on my config on the body of the message i log everything i solve the issue by providing a specific route and eliminating 0 in from of the prefix, it is ok but kamailio still not recognizes itself on aws setup even when i had advertise both ips and i had alias for both ips, if i dont define enything it will loop over until exhaustion, for now i reply with 488 wich tell me something is bad but i thought that kamailio will know when a message is send from itself to itself.<div>
<br></div><div>i appreciate your recommendations, unfortunately since i solved that way i have no more traces i will take the routing i added then i will sent some packed traces.</div><div><br></div><div>thank you.</div><div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 11:05 AM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's difficult and time consuming to debug issues without seeing the config file and without seeing the packet traces (ngrep -W byline -d any -t -q -p "" port 5060).<br>
<br>
Anyway, as an admin you should understand how Kamailio works. Thus it would be a good exercise to find the problem yourself. In severl places in your config you have routing decisions (if ... {}). Identify these places, and put meaningful logging (xlog("...") ) before and after the if statement.<br>
<br>
Then make a call and watch the logfile. This will give you an understanding how Kamailio works.<br>
<br>
regards<br>
Klaus<div class="im"><br>
<br>
On 21.10.2013 16:04, julian arsanches wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Daniel, Klaus thanks a lot for your responses i do appreciate them, just got me a bit confuse because on the documents as what Daniel suggest to advertise directive for listen parameter, I do if you see my config below that i advertise it and have an alias, kamailio still sends an invite to itself without recognizing that it came from the internal ip.<br>
<br>
<br>
Is there anything else wrong that i am not putting on my advertise line ?<br>
<br>
thanks i really apreciate your input.<br>
<br>
Julian.<br>
<br></div>
/listen=udp:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>> advertise2.2.2.2:5060 <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>><br>
/>>/<br>
/>>/<br>
/>>/ alias=<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060/" target="_blank">http://1.1.1.1:5060/</a>>><br>
/>>/ alias=1.1.1.1<br>
/>>/ alias=<a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060/" target="_blank">http://2.2.2.2:5060/</a>>><br>
/>>/ alias=<a href="http://2.2.2.2/" target="_blank">2.2.2.2/</a><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hello,<br>
<br>
for reference, in case kamailio is running behind nat, like on AWS, one<br>
should just use advertise directive for listen parameter, like:><br>
<br>
listen=proto:privateip:port advertise publicip:port><br>
<br>
<br>
See:<br>
<br>
<a href="http://www.kamailio.org/wiki/cookbooks/4.0.x/core#listen" target="_blank">http://www.kamailio.org/wiki/<u></u>cookbooks/4.0.x/core#listen</a><br>
<br>
It simplifies the config by not needing to use alias parameter,<br>
advertised_address/set_<u></u>addvertised_address() and record_route_preset().><br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 10/18/13 8:23 AM, Klaus Darilion wrote:<br></div>
/<br>
</blockquote>
/>/<br>
/>/ On 17.10.2013 17:31, julian arsanches wrote:<br>
/>>/ Hi all, before hand thanks for all the support received on this channel.<br>
/>>/<br>
/>>/ I have an issue with an installed server on a aws instance which is<br>
/>>/ giving me routing loops, my setup is simple, i have alias set for both<br>
/>>/ ips internal and external and the loop still present when t_relay don't<br>
/>>/ find any routes to relay it just sent it to itself with the public ip<br>
/>>/ then the loop starts.<br>
/>>/<br>
/>>/ can any one please advise how can i prevent that or just tell t_relay<br>
/>>/ that if there is no more routes just respond with a cancel or stop<br>
/>>/ searching.<br>
/>/<br>
/>/ If you call t_relay, then the message will be forwarded to $ru (or to<br>
/>/ $du if $du is set). t_relay itself does not have any logic inside.<br>
/>/<br>
/>/ Thus, if you do not want a message to be forwarded, then you must not<br>
/>/ call t_relay.<br>
/>/<br>
/>/ If you do not want to send a message to a certain destination, then<br>
/>/ set $ru (the domain part) to the respective destination.<br>
/>/<br>
/>/ One issue may be the aliases. If Kamailio thinks that it is not<br>
/>/ authoritative for a domain, then it forwards the message to the<br>
/>/ domain. Kamailio by default feels authoritative for the IP addresses<br>
/>/ on which it listens (the private IP addresses). Thus if a request is<br>
/>/ received by Kamailio, but the RURI (request URI, $ru) indicated the<br>
/>/ public IP address, KAmailio by default forwards the message to the<br>
/>/ respective RURI (which my be forward again by AWS NAT to Kamailio).<br>
/>/<br>
/>/ Thus, alias=public.ip.addr.ess must be added to the config.<br>
/>/<br>
/>/ If there are still problems you have set debug=4 and track in the log<br>
/>/ file how the message is processed, and where the routing decision<br>
/>/ takes the wrong direction.<br>
/>/<br>
/>/ regards<br>
/>/ Klaus<br>
/>/<br>
/>>/<br>
/>>/ same thing happens when a gw code is not found on the dispatcher list<br>
/>>/ file.<br>
/>>/<br>
/>>/ as i had read by just specifying the alias=domain it should take care of<br>
/>>/ it but it is not happening perhaps because it is a AWS instance, or most<br>
/>>/ likely i am missing something after the T_relay to stop the call from<br>
/>>/ looping.<br>
/>>/<br>
/>>/ I do have several headers fix because i have an asterisk sending calls<br>
/>>/ with lots of signalling calls added to the call that i need to remove<br>
/>>/ before the call is passed out to a carrier or another UA, Kamailio is<br>
/>>/ just proxing the calls between asterisk and the outside world no Media<br>
/>>/ handling, No registrations.<br>
/>>/<br>
/>>/ Again thanks for any tips to find my answer or if anyone had a similar<br>
/>>/ issue thanks again.<br>
/>>/<br>
/>>/ thanks for any help .<br>
/>>/<br>
/>>/ Julian.<br>
/>>/<br>
/>>/ on this setup i have<br>
/>>/<br>
/>>/ public ip as 2.2.2.2<br>
/>>/<br>
/>>/ private IP as 1.1.1.1<br>
/>>/<br>
/>>/<br>
/>>/ #!KAMAILIO<br>
/>>/ ####### Global Parameters #########<br>
/>>/<br>
/>>/ #!ifdef WITH_DEBUG<br>
/>>/ debug=4<br>
/>>/ log_stderror=yes<br>
/>>/ #!else<br>
/>>/ #debug=2<br>
/>>/ #log_stderror=yes<br>
/>>/ #!endif<br>
/>>/<br>
/>>/ memdbg=5<br>
/>>/ memlog=5<br>
/>>/<br>
/>>/ log_facility=LOG_LOCAL7<br>
/>>/<br>
/>>/ fork=yes<br>
/>>/ children=6<br>
/>>/<br>
/>>/ auto_aliases=no<br>
/>>/<br>
/>>/<br>
/>>/ listen=udp:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060/" target="_blank">http://1.1.1.1:5060/</a>>> advertise2.2.2.2:5060 <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>><br>
/>>/ <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060/" target="_blank">http://2.2.2.2:5060/</a>>><br>
/>>/<br>
/>>/ alias=<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060/" target="_blank">http://1.1.1.1:5060/</a>>><br>
/>>/ alias=1.1.1.1<br>
/>>/ alias=<a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060/" target="_blank">http://2.2.2.2:5060/</a>>><br>
/>>/ alias=2.2.2.2<br>
/>>/<br>
/>>/<br>
/>>/ port=5060<br>
/>>/<br>
/>>/ enable_tls=no<br>
/>>/<br>
/>>/ #tcp_connection_lifetime=3605<br>
/>>/<br>
/>>/ #!ifdef WITH_SRCPATH<br>
/>>/ mpath="modules_k:modules"<br>
/>>/ #!else<br>
/>>/ mpath="/usr/lib64/kamailio/<u></u>modules_k/:/usr/lib64/<u></u>kamailio/modules/"<br>
/>>/<br>
/>>/ #!endif<br>
/>>/ loadmodule "db_mysql.so"<br>
/>>/ ##loadmodule "mi_fifo.so"<br>
/>>/ loadmodule "tm.so"<br>
/>>/ loadmodule "sl.so"<br>
/>>/ loadmodule "acc.so"<br>
/>>/ loadmodule "rr.so"<br>
/>>/ loadmodule "maxfwd.so"<br>
/>>/ loadmodule "uac.so"<br>
/>>/ loadmodule "textops.so"<br>
/>>/ loadmodule "pv.so"<br>
/>>/ loadmodule "dispatcher.so"<br>
/>>/ loadmodule "usrloc.so"<br>
/>>/ loadmodule "registrar.so"<br>
/>>/ loadmodule "siputils.so"<br>
/>>/ loadmodule "sanity.so"<br>
/>>/ loadmodule "ctl.so"<br>
/>>/ loadmodule "mi_rpc.so"<br>
/>>/ loadmodule "avpops.so"<br>
/>>/ #!ifdef WITH_NAT<br>
/>>/ loadmodule "nathelper.so"<br>
/>>/ loadmodule "rtpproxy.so"<br>
/>>/ #!endif<br>
/>>/ loadmodule "xlog.so"<br>
/>>/ ##mysqlcdr<br>
/>>/ modparam("acc", "db_flag", 2)<br>
/>>/ modparam("acc", "db_missed_flag", 3)<br>
/>>/ modparam("acc", "report_cancels", 1)<br>
/>>/ modparam("acc", "db_url", "mysql://<a href="http://openser:password@1.1.1.2/openser" target="_blank">openser:password@1.1.<u></u>1.2/openser</a><br>
/>>/ <<a href="http://openser:password@1.1.1.2/openser" target="_blank">http://openser:password@1.1.<u></u>1.2/openser</a>>")<br>
/>>/ modparam("acc", "db_extra", "from_uri=$fu; to_uri=$tu; intid=$fU;<br>
/>>/ type_call=$si; dst_ip=$ru; carriercode=$tu;callmode=$var(<u></u>out)" )<br>
/>>/<br>
/>>/ #loadmodule "carrierroute"<br>
/>>/ modparam("tm", "cancel_b_method", 1)<br>
/>>/ modparam("tm", "failure_reply_mode", 3)<br>
/>>/ modparam("tm", "fr_timer", 30000)<br>
/>>/ modparam("tm", "fr_inv_timer", 120000)<br>
/>>/<br>
/>>/ modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.lst"<u></u>)<br>
/>>/ modparam("rr", "enable_full_lr", 1)<br>
/>>/<br>
/>>/ #!ifdef WITH_NAT<br>
/>>/ # ----- rtpproxy params -----<br>
/>>/ modparam("rtpproxy", "rtpproxy_sock", "udp:<a href="http://127.0.0.1:7722" target="_blank">127.0.0.1:7722</a> <<a href="http://127.0.0.1:7722" target="_blank">http://127.0.0.1:7722</a>><br>
/>>/ <<a href="http://127.0.0.1:7722" target="_blank">http://127.0.0.1:7722</a> <<a href="http://127.0.0.1:7722/" target="_blank">http://127.0.0.1:7722/</a>>>")<br>
/>>/<br>
/>>/ # ----- nathelper params -----<br>
/>>/ modparam("nathelper", "natping_interval", 30)<br>
/>>/ modparam("nathelper", "ping_nated_only", 1)<br>
/>>/ modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)<br>
/>>/ modparam("nathelper", "sipping_from", "sip:pinger at <a href="http://kamailio.org" target="_blank">kamailio.org</a> <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>><br>
/>>/ <mailto:<a href="mailto:sip%25" target="_blank">sip%</a> <mailto:<a href="mailto:sip%2525" target="_blank">sip%25</a>>3Apinger at <a href="http://kamailio.org" target="_blank">kamailio.org</a> <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>>>")<br>
/>>/ # ----- mi_fifo params -----<br>
/>>/<br>
/>>/ ##modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")<br>
/>>/<br>
/>>/ # params needed for NAT traversal in other modules<br>
/>>/ modparam("nathelper|registrar"<u></u>, "received_avp", "$avp(RECEIVED)")<br>
/>>/ modparam("usrloc", "nat_bflag", FLB_NATB)<br>
/>>/ #!endif<br>
/>>/ modparam("xlog", "buf_size", 8192)<br>
/>>/ modparam("xlog", "force_color", 1)<br>
/>>/ #carrierroute<br>
/>>/ #modparam("carrierroute", "config_file",<br>
/>>/ "/etc/kamailio/carrierroute.<u></u>conf")<br>
/>>/ #end carrierroute<br>
/>>/<br>
/>>/ modparam("pv", "shvset", "ruta=s:$ru")<br>
/>>/ modparam("pv", "varset","in=s:IN")<br>
/>>/ modparam("pv", "varset","out=s:OUT")<br>
/>>/ #################BEGINING MAINROUTE##################<br>
/>>/ request_route {<br>
/>>/<br>
/>>/ if (!mf_process_maxfwd_header("4"<u></u>)) {<br>
/>>/ sl_send_reply("483","Too Many Hops");<br>
/>>/ drop;<br>
/>>/ exit;<br>
/>>/ }<br>
/>>/ ##<br>
/>>/ # initial sanity checks -- too long messages<br>
/>>/ if (msg:len >= 2048 ) {<br>
/>>/ sl_send_reply("513", "Message too big");<br>
/>>/ xlog("out header CHECK 513 baderror from_uri=$fu;($ct++)<$tU---=$<u></u>var(n)><br>
/>>/ to_uri=$tu; intid=$fU; type_call=$si; dst_ip=$ru;<br>
/>>/ carriercode=$var(z);callmode=$<u></u>var(out)");<br>
/>>/ drop;<br>
/>>/ exit;<br>
/>>/ };<br>
/>>/ #<br>
/>>/ if(is_method("OPTIONS")) {<br>
/>>/ # send reply for each options request<br>
/>>/ sl_send_reply("200", "ok");<br>
/>>/ exit();<br>
/>>/ }<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/ #<br>
/>>/ if ( is_method("ACK") ) {<br>
/>>/ if ( t_check_trans() ) {<br>
/>>/ # no loose-route, but stateful ACK;<br>
/>>/ # must be an ACK after a 487<br>
/>>/ # or e.g. 404 from upstream server<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig');<br>
/>>/<br>
/>>/ # Remove prefixes numbers from Contact\<br>
/>>/ t_relay();<br>
/>>/ exit;<br>
/>>/ } else {<br>
/>>/ # ACK without matching transaction ... ignore and discard<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig');<br>
/>>/ t_relay();<br>
/>>/ exit;<br>
/>>/ }<br>
/>>/ }<br>
/>>/ ##responding to bye requests and modifying headers to match invite<br>
/>>/ if(method=="BYE") {<br>
/>>/ #Account BYE transactions<br>
/>>/ #$var(d) = $tu;<br>
/>>/ #$var(e)=$(var(d){s.substr,4,<u></u>3});<br>
/>>/ setflag(2);<br>
/>>/ setflag(10);<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig');<br>
/>>/ t_relay();<br>
/>>/ exit;<br>
/>>/ };<br>
/>>/<br>
/>>/ #CANCEL processing<br>
/>>/ if (method=="CANCEL") {<br>
/>>/ setflag(2);<br>
/>>/ setflag(3);<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig');<br>
/>>/ t_relay();<br>
/>>/ exit;<br>
/>>/ ##if (t_check_trans()) t_relay();<br>
/>>/<br>
/>>/ exit;<br>
/>>/ };<br>
/>>/<br>
/>>/<br>
/>>/ #<br>
/>>/<br>
/>>/<br>
/>>/ #<br>
/>>/ if (loose_route()) {<br>
/>>/<br>
/>>/<br>
/>>/ ##<br>
/>>/ if(is_method("OPTIONS")) {<br>
/>>/ # send reply for each options request<br>
/>>/ sl_send_reply("200", "ok");<br>
/>>/ exit();<br>
/>>/ }<br>
/>>/ ##<br>
/>>/ if(method=="BYE") {<br>
/>>/ #Account BYE transactions<br>
/>>/ setflag(2);<br>
/>>/ };<br>
/>>/<br>
/>>/<br>
/>>/ ##CANCEL processing<br>
/>>/ if (method=="CANCEL") {<br>
/>>/ setflag(3);<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>11811(.*)/"\1/});<br>
/>>/<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig');<br>
/>>/ if (t_check_trans()) t_relay();<br>
/>>/ exit;<br>
/>>/ };<br>
/>>/<br>
/>>/ if (!t_relay()) {<br>
/>>/ sl_reply_error();<br>
/>>/ }<br>
/>>/ exit;<br>
/>>/ }<br>
/>>/<br>
/>>/<br>
/>>/ if (is_method("INVITE")) { #Procesing invites<br>
/>>/<br>
/>>/<br>
/>>/ record_route();<br>
/>>/ }<br>
/>>/ ##LOGGING CALL BEFORE IS PROCESSED<br>
/>>/ xlog("before strip,< time [$Tf] > Aip= $src_ip, r-uri($ru\n");<br>
/>>/ xlog("before from_uri=$fu; to_uri=$tu; pai=<<$ct>>;intid=$fU;<br>
/>>/ type_call=$si; dst_ip=$ru; carriercode=$tu;callmode=$var(<u></u>out)<br>
/>>/ --$$--$ou");<br>
/>>/ #creando rutas<br>
/>>/ setflag(2);<br>
/>>/ # Account Missed calls<br>
/>>/ setflag(3);<br>
/>>/ ###VARIABLES FOR MODIFICATIONS<br>
/>>/ $var(x) = $(ru);<br>
/>>/<br>
/>>/ $var(y)=$(var(x){s.substr,4,3}<u></u>);<br>
/>>/<br>
/>>/ $var(z)=$(var(y){<a href="http://s.int" target="_blank">s.int</a> <<a href="http://s.int" target="_blank">http://s.int</a>> <<a href="http://s.int" target="_blank">http://s.int</a> <<a href="http://s.int/" target="_blank">http://s.int/</a>>>});<br>
/>>/<br>
/>>/ $var(t)=$(var(x){s.substr,7,0}<u></u>);<br>
/>>/<br>
/>>/ $var(h)=$(var(x){s.substr,0,7}<u></u>);<br>
/>>/<br>
/>>/ $var(o)=$(fU{s.substr,14,0});<br>
/>>/<br>
/>>/ if($(var(x){s.len}) < 3)<br>
/>>/ {<br>
/>>/ $var(z)='0'+ $var(z);<br>
/>>/ }<br>
/>>/<br>
/>>/ xlog("dsroute $var(z)fullruri($ru)\n");<br>
/>>/<br>
/>>/<br>
/>>/ strip(3);<br>
/>>/<br>
/>>/ xlog("after strip time [$Tf] method ($rm) via el code<br>
/>>/ ($var(z)--varhex($var(h))-- ($var(y))\n");<br>
/>>/ xlog("after from_uri=$fu; to_uri=$tu; intid=$fU; type_call=$si;<br>
/>>/ dst_ip=$ru; carriercode=$var(z);callmode=$<u></u>var(out)");<br>
/>>/<br>
/>>/ ds_select_domain ("$var(z)", "4");#carrer dynamic<br>
/>>/<br>
/>>/<br>
/>>/ ###########KILLING BUGGIES#######when t_realy fails to find a route a<br>
/>>/ loop is generate then strip takes off a digit until0 at 2.2.2.2 <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>><br>
/>>/ <mailto:<a href="mailto:0" target="_blank">0</a> at 2.2.2.2 <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>>> is left for to: user this kills that call.#####<br>
/>>/ if ($(tU{s.len}) < 4) {<br>
/>>/ xlog("CHECK TU 1bad kILLING BUGGIES>>> $tu--$td-$tU-$tt--$dd-$dd-$du-<br>
/>>/ -<<$rd>$ru --- $oU> pai+++ <<$ct>>++ from_uri=$fu;<$tU---=$var(n)><br>
/>>/ to_uri=$tu; }pai<$ai> id=$fU; type_call=$si; dst_ip=$ru;<br>
/>>/ carriercode=$var(z);callmode=$<u></u>var(out)");<br>
/>>/ ##sl_reply_error();<br>
/>>/ ##sl_send_reply("513", "Message too big");<br>
/>>/ ##sl_send_reply("488","Not Acceptable Here");<br>
/>>/ sl_send_reply("488","Not Acceptable Here");<br>
/>>/ #t_reset_retr();<br>
/>>/ #t_release();<br>
/>>/ ##if(!t_relay()){ sl_reply_error(); drop; exit;}<br>
/>>/<br>
/>>/ #if (!t_relay()) { sl_reply_error(); break; };<br>
/>>/ # t_relay();<br>
/>>/ #setflag(2);<br>
/>>/ drop;<br>
/>>/ exit;<br>
/>>/<br>
/>>/ }; ## Endif less than 4<br>
/>>/ ##############END KILLING###########<br>
/>>/ ################ROUTE SELECTION###############<br>
/>>/ if($(fn{s.len}) > 10) { # IF WE CHECK FOR FROM: ROUTEID MUST BE LONGER<br>
/>>/ THAN 10 DIGITS TO BE A VALID ROUTE<br>
/>>/<br>
/>>/ xlog("out header CHECK more than 10 digits BEFORE<br>
/>>/ from_uri=$fu;($ct++)<$tU---=$<u></u>var(n)> to_uri=$tu; intid=$fU;<br>
/>>/ type_call=$si; dst_ip=$ru; carriercode=$var(z);callmode=$<u></u>var(out)");<br>
/>>/ $var(n)=$(tU{s.substr,3,0});<br>
/>>/ $var(i)=$(ct{re.subst,/^.*<u></u>00700(.*)/"\1/});<br>
/>>/ $var(t)=$(fn{re.subst,/^.*<u></u>00700(.*)/"\1/});<br>
/>>/ $var(r)=$rd; ##to domain<br>
/>>/ $fU=$(fU{s.substr,14,0});<br>
/>>/ $fn=$var(t);<br>
/>>/ $tU=$var(n);<br>
/>>/ $td=$var(r);<br>
/>>/<br>
/>>/ subst('/^Contact:.*11811(.*)$/<u></u>Contact: <sip:\1\2/ig'); # Remove number<br>
/>>/ from Contact<br>
/>>/<br>
/>>/ ##if(!t_relay()){ sl_reply_error(); drop; exit;}<br>
/>>/<br>
/>>/ if (!t_relay()) { sl_reply_error(); break; };<br>
/>>/<br>
/>>/ # t_relay();<br>
/>>/<br>
/>>/ drop;<br>
/>>/ exit;<br>
/>>/<br>
/>>/ };<br>
/>>/<br>
/>>/ ################<u></u>ENDrouteselect################<u></u>##############<br>
/>>/<br>
/>>/<br>
/>>/ ###############AFTER LAST IF##############reply 488 ANY CALL THAT DID<br>
/>>/ NOT FOUND A ROUTE.<br>
/>>/ sl_send_reply("488","Not Acceptable Here");<br>
/>>/ drop;<br>
/>>/ exit;<br>
/>>/ }<br>
/>>/<br>
/>>/ ###################END MAINROUTE#################<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/ On My dispatcher.lst i have<br>
/>>/<br>
/>>/<br>
/>>/ 1 sip:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>> <<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a> <<a href="http://1.1.1.1:5060/" target="_blank">http://1.1.1.1:5060/</a>>><br>
/>>/ 2 sip:<a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>> <<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a> <<a href="http://2.2.2.2:5060/" target="_blank">http://2.2.2.2:5060/</a>>><br>
/>>/ 3 sip:<a href="http://3.3.3.3:5060" target="_blank">3.3.3.3:5060</a> <<a href="http://3.3.3.3:5060" target="_blank">http://3.3.3.3:5060</a>> <<a href="http://3.3.3.3:5060" target="_blank">http://3.3.3.3:5060</a> <<a href="http://3.3.3.3:5060/" target="_blank">http://3.3.3.3:5060/</a>>><br>
/>>/ 3 sip:<a href="http://3.3.3.5:5060" target="_blank">3.3.3.5:5060</a> <<a href="http://3.3.3.5:5060" target="_blank">http://3.3.3.5:5060</a>> <<a href="http://3.3.3.5:5060" target="_blank">http://3.3.3.5:5060</a> <<a href="http://3.3.3.5:5060/" target="_blank">http://3.3.3.5:5060/</a>>><br>
/>>/ ...<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/<br>
/>>/ ______________________________<u></u>_________________<br>
/>>/ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
/>>/ sr-users at <a href="http://lists.sip-router.org" target="_blank">lists.sip-router.org</a> <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>><br>
/>>/ <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
/>>/<br>
/>/<br>
/>/ ______________________________<u></u>_________________<br>
/>/ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
/>/ sr-users at <a href="http://lists.sip-router.org" target="_blank">lists.sip-router.org</a> <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>><br>
/>/ <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
/<br>
--<br>
Daniel-Constantin Mierla -<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> <<a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>><br>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> -<a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/<u></u>miconda</a><div class="im"><br>
Kamailio Advanced Trainings - Berlin, Nov 25-28; Miami, Nov 18-20, 2013<br></div>
- more details about Kamailio trainings athttp://<a href="http://www.asipto.com" target="_blank">www.asipto.com</a> <<a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>> -<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>------------<br>
<br>
* Previous message: [SR-Users] Loop detected on aws setup<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/080128.html" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/080128.html</a>><br>
* Next message: [SR-Users] Proxy-Registrar call issues<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/080126.html" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/080126.html</a>><br>
* *Messages sorted by:* [ date ]<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/date.html#80129" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/date.html#80129</a>><br>
[ thread ]<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/thread.html#80129" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/thread.html#80129</a>><br>
[ subject ]<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/subject.html#80129" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/subject.html#80129</a>><br>
[ author ]<br>
<<a href="http://lists.sip-router.org/pipermail/sr-users/2013-October/author.html#80129" target="_blank">http://lists.sip-router.org/<u></u>pipermail/sr-users/2013-<u></u>October/author.html#80129</a>><br>
<br>
------------------------------<u></u>------------------------------<u></u>------------<div class="im"><br>
More information about the sr-users mailing list<br></div><div class="im">
<<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>><br>
<br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
</div><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
<br>
</blockquote>
</blockquote></div><br></div>