[prev in list] [next in list] [prev in thread] [next in thread]
List: sr-users
Subject: Re: [SR-Users] [sr-dev] kamailio is returning 500
From: chanea <chanea () gmail ! com>
Date: 2013-02-27 15:30:27
Message-ID: CAKeQZXugx5av2izD4TkrRVq7nef+4vz_EbZnsGSeoSKL8YH+KA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Carsten,
Thanks for reply. No idea how this happen but after increase the shared
memory used to run Kamailio , this 500 issue is gone now.
BTW, REGISTER being routed seems wrong in my config file , therefore
after load balancing , client cannot reach each other by MESSAGE.
Client --- > Kamailio LB --->Sip01
\ ---->Sip02
Any idea??
Best Regards,
chanea
On Tue, Feb 26, 2013 at 10:39 PM, Carsten Bock <carsten@ng-voice.com> wrote:
> Hi,
>
> i see no point in your config, where the 500 should come from. It must
> come from the servers you are loadbalancing for.
>
> Kind regards,
> Carsten
>
> 2013/2/26 chanea <chanea@gmail.com>:
> > Hi Carsten,
> >
> > Thanks again for your kind reply.
> > I am quite newbie to kamailio, and I dont see why the load balancer is
> > replying "500".
> >
> > It will be great appreciated if you can point out what i am doing wrong
> in
> > my config file as below.
> > Actually, there is another issue for the setting below is that it cannot
> > load balancing the "REGISTER" correctly.
> >
> > best regards,
> >
> > chanea
> >
> > ==============================================================
> >
> > ####### Global Parameters #########
> > #!define WITH_NAT
> >
> >
> >
> > # - flags
> > # FLT_ - per transaction (message) flags
> > # FLB_ - per branch flags
> > #!define FLT_ACC 1
> > #!define FLT_ACCMISSED 2
> > #!define FLT_ACCFAILED 3
> > #!define FLT_NATS 5
> >
> > #!define FLB_NATB 6
> > #!define FLB_NATSIPPING 7
> >
> > ####### Global Parameters #########
> >
> > debug=-3
> > log_stderror=no
> >
> > memdbg=5
> > memlog=5
> >
> > log_facility=LOG_LOCAL0
> >
> > fork=yes
> > children=8
> >
> > disable_tcp=yes
> >
> > auto_aliases=no
> >
> > port=5060
> >
> >
> > sip_warning=no
> >
> > ####### Modules Section ########
> >
> > # set paths to location of modules
> > #!ifdef LOCAL_TEST_RUN
> > mpath="modules_k:modules"
> > #!else
> >
> mpath="/usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/"
> > #!endif
> > loadmodule "db_mysql.so"
> > loadmodule "mi_fifo.so"
> > loadmodule "kex.so"
> > loadmodule "tm.so"
> > loadmodule "tmx.so"
> > loadmodule "sl.so"
> > loadmodule "rr.so"
> > loadmodule "usrloc.so"
> > loadmodule "pv.so"
> > loadmodule "maxfwd.so"
> > loadmodule "textops.so"
> > loadmodule "siputils.so"
> > loadmodule "xlog.so"
> > loadmodule "sanity.so"
> > loadmodule "ctl.so"
> > loadmodule "mi_rpc.so"
> > loadmodule "acc.so"
> > loadmodule "dispatcher.so"
> >
> > #!ifdef WITH_NAT
> > loadmodule "nathelper.so"
> > loadmodule "rtpproxy.so"
> > #!endif
> >
> >
> > # ----- mi_fifo params -----
> > modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
> >
> >
> > # ----- rr params -----
> > # add value to ;lr param to cope with most of the UAs
> > modparam("rr", "enable_full_lr", 1)
> > # do not append from tag to the RR (no need for this script)
> > modparam("rr", "append_fromtag", 0)
> >
> >
> > # ----- acc params -----
> > modparam("acc", "log_flag", 1)
> > modparam("acc", "failed_transaction_flag", 3)
> > modparam("acc", "log_extra",
> >
> "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;src_ip=$si")
> >
> > # ----- tm params -----
> > modparam("tm", "fr_timer", 10000)
> > modparam("tm", "fr_inv_timer", 40000)
> >
> >
> > #!ifdef WITH_NAT
> > # ----- rtpproxy params -----
> > #modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
> > modparam("rtpproxy", "rtpproxy_sock", "udp:{myipaddr}:22222")
> > # ----- nathelper params -----
> > modparam("nathelper", "natping_interval", 600)
> > modparam("nathelper", "ping_nated_only", 1)
> > modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
> > modparam("nathelper", "sipping_from", "sip:pinger@{myipaddr}")
> >
> > # params needed for NAT traversal in other modules
> > modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
> > modparam("usrloc", "nat_bflag", FLB_NATB)
> > #!endif
> >
> >
> > # ----- dispatcher params -----
> > modparam("dispatcher", "db_url",
> > "mysql://{mydbsetting}")
> > modparam("dispatcher", "table_name", "dispatcher")
> > modparam("dispatcher", "flags", 2)
> > modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
> > modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
> > modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
> >
> > ####### Routing Logic ########
> >
> >
> > # main request routing logic
> >
> > route {
> >
> > # per request initial checks
> > route(REQINIT);
> >
> > # NAT detection
> > route(NAT);
> >
> > # handle requests within SIP dialogs
> > route(WITHINDLG);
> >
> > ### only initial requests (no To tag)
> >
> > # CANCEL processing
> > if (is_method("CANCEL"))
> > {
> > if (t_check_trans())
> > t_relay();
> > exit;
> > }
> >
> > t_check_trans();
> >
> > # record routing for dialog forming requests (in case they are routed)
> > # - remove preloaded route headers
> > remove_hf("Route");
> > if (is_method("INVITE|SUBSCRIBE"))
> > record_route();
> >
> > # account only INVITEs
> > if (is_method("INVITE"))
> > {
> > setflag(1); # do accounting
> > }
> >
> > # dispatch destinations
> > route(DISPATCH);
> >
> > route(RELAY);
> > }
> >
> >
> > route[RELAY] {
> > #!ifdef WITH_NAT
> > if (check_route_param("nat=yes")) {
> > setbflag(FLB_NATB);
> > }
> > if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
> > route(RTPPROXY);
> > }
> > #!endif
> > if (!t_relay()) {
> > sl_reply_error();
> > }
> > exit;
> > }
> >
> >
> > # Per SIP request initial checks
> > route[REQINIT] {
> > if (!mf_process_maxfwd_header("10")) {
> > sl_send_reply("483","Too Many Hops");
> > exit;
> > }
> >
> > if(!sanity_check("1511", "7"))
> > {
> > xlog("Malformed SIP message from $si:$sp\n");
> > exit;
> > }
> > }
> >
> > # Caller NAT detection route
> > route[NAT] {
> > #!ifdef WITH_NAT
> > force_rport();
> > if (nat_uac_test("19")) {
> > #xlog("L_INFO","ALERT: ua is behind NAT (ru:$ru)(IP:$si:$sp)\n");
> >
> > if (method=="REGISTER") {
> > fix_nated_register();
> > } else {
> > fix_nated_contact();
> > }
> > setflag(FLT_NATS);
> > }
> > #!endif
> > return;
> > }
> >
> > # RTPProxy control
> > route[RTPPROXY] {
> > #!ifdef WITH_NAT
> > if (is_method("BYE")) {
> > unforce_rtp_proxy();
> > } else if (is_method("INVITE")){
> > force_rtp_proxy();
> > }
> > if (!has_totag()) add_rr_param(";nat=yes");
> > #!endif
> > return;
> > }
> >
> >
> >
> > # Handle requests within SIP dialogs
> > route[WITHINDLG] {
> > if (has_totag()) {
> > # sequential request withing a dialog should
> > # take the path determined by record-routing
> > if (loose_route()) {
> > if (is_method("BYE")) {
> > setflag(1); # do accounting ...
> > setflag(3); # ... even if the transaction fails
> > }
> > route(RELAY);
> > } else {
> > if ( is_method("ACK") ) {
> > if ( t_check_trans() ) {
> > # non loose-route, but stateful ACK;
> > # must be ACK after a 487 or e.g. 404 from upstream server
> > t_relay();
> > exit;
> > } else {
> > # ACK without matching transaction ... ignore and discard.
> > exit;
> > }
> > }
> > sl_send_reply("404","Not here");
> > }
> > exit;
> > }
> > }
> >
> > # Dispatch requests
> > route[DISPATCH] {
> > # round robin dispatching on gateways group '1'
> > if(!ds_select_dst("1", "0"))
> > {
> > send_reply("404", "No destination");
> > exit;
> > }
> > xlog("L_INFO", "--- SCRIPT: going to <$ru> via <$du>\n");
> > t_on_failure("RTF_DISPATCH");
> > return;
> > }
> >
> > # Sample failure route
> > failure_route[RTF_DISPATCH] {
> > if (t_is_canceled()) {
> > exit;
> > }
> > # next DST - only for 500 or local timeout
> > if (t_check_status("500")
> > or (t_branch_timeout() and !t_branch_replied()))
> > {
> > if(ds_next_dst())
> > {
> > t_on_failure("RTF_DISPATCH");
> > route(RELAY);
> > exit;
> > }
> > }
> > }
> > =================================================================
> >
> >
> >
> > On Tue, Feb 26, 2013 at 8:32 PM, Carsten Bock <carsten@ng-voice.com>
> wrote:
> >>
> >> Hi,
> >>
> >> the dispatcher module doesn't create "500 Internal Server Error"
> replies.
> >> There must be another source for your error; most likely not the
> >> Kamailio Loadbalancer.
> >>
> >> Kind regards,
> >> Carsten
> >>
> >> 2013/2/26 chanea <chanea@gmail.com>:
> >> > Hi Carsten,
> >> >
> >> > Thanks for your quick reply.
> >> > The "500" is generated by the Kamailio server which is used as Load
> >> > balancer
> >> > ( using dispatcher module).
> >> >
> >> > I dont see any 500 number in my kamailio.cfg in the load balancer
> >> > kamailio.
> >> > Should I go deep into the dispatcher module itself?
> >> >
> >> >
> >> > Unluckily I cannot check the reason by checking the syslog since this
> >> > only
> >> > happen when thousands of request come in at the same time.
> >> >
> >> > chanea
> >> >
> >> >
> >> >
> >> > On Tue, Feb 26, 2013 at 7:24 PM, Carsten Bock <carsten@ng-voice.com>
> >> > wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> can you see, why the Kamailio is returning a "500 Server internal
> >> >> error"? This response must be either created by some module or by
> some
> >> >> upstream server (e.g. in case of loadbalancing).
> >> >> Kamailio itself would not create such response, you should (if at
> all)
> >> >> find the answer in the logs...
> >> >>
> >> >> Kind regards,
> >> >> Carsten
> >> >>
> >> >> 2013/2/26 chanea <chanea@gmail.com>:
> >> >> > Dear all
> >> >> >
> >> >> > While lots of request come to my Kamailio 3.1.x in the same time ,
> >> >> > server
> >> >> > is returning "500, Server Internal Error" to some of the request.
> >> >> >
> >> >> > What should i do if i want to reduce the number of "500" response?
> >> >> >
> >> >> >
> >> >> >
> >> >> > chanea
> >> >> >
> >> >> > _______________________________________________
> >> >> > sr-dev mailing list
> >> >> > sr-dev@lists.sip-router.org
> >> >> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Carsten Bock
> >> >> CEO (Geschäftsführer)
> >> >>
> >> >> =============================================================
> >> >> Visit us on the Kamailio World 2013, 16./17. April 2013
> >> >> => http://conference.kamailio.com/k01/
> See
> >> >> you there!
> >> >> =============================================================
> >> >>
> >> >> ng-voice GmbH
> >> >> Schomburgstr. 80
> >> >> D-22767 Hamburg / Germany
> >> >>
> >> >> http://www.ng-voice.com
> >> >> mailto:carsten@ng-voice.com
> >> >>
> >> >> Office +49 40 34927219
> >> >> Fax +49 40 34927220
> >> >>
> >> >> Sitz der Gesellschaft: Hamburg
> >> >> Registergericht: Amtsgericht Hamburg, HRB 120189
> >> >> Geschäftsführer: Carsten Bock
> >> >> Ust-ID: DE279344284
> >> >>
> >> >> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> >> >> http://www.ng-voice.com/imprint/
> >> >>
> >> >> _______________________________________________
> >> >> sr-dev mailing list
> >> >> sr-dev@lists.sip-router.org
> >> >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > sr-dev mailing list
> >> > sr-dev@lists.sip-router.org
> >> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >> >
> >>
> >>
> >>
> >> --
> >> Carsten Bock
> >> CEO (Geschäftsführer)
> >>
> >> =============================================================
> >> Visit us on the Kamailio World 2013, 16./17. April 2013
> >> => http://conference.kamailio.com/k01/ See
> >> you there!
> >> =============================================================
> >>
> >> ng-voice GmbH
> >> Schomburgstr. 80
> >> D-22767 Hamburg / Germany
> >>
> >> http://www.ng-voice.com
> >> mailto:carsten@ng-voice.com
> >>
> >> Office +49 40 34927219
> >> Fax +49 40 34927220
> >>
> >> Sitz der Gesellschaft: Hamburg
> >> Registergericht: Amtsgericht Hamburg, HRB 120189
> >> Geschäftsführer: Carsten Bock
> >> Ust-ID: DE279344284
> >>
> >> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> >> http://www.ng-voice.com/imprint/
> >>
> >> _______________________________________________
> >> sr-dev mailing list
> >> sr-dev@lists.sip-router.org
> >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >
> >
> >
> > _______________________________________________
> > sr-dev mailing list
> > sr-dev@lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >
>
>
>
> --
> Carsten Bock
> CEO (Geschäftsführer)
>
> =============================================================
> Visit us on the Kamailio World 2013, 16./17. April 2013
> => http://conference.kamailio.com/k01/ See
> you there!
> =============================================================
>
> ng-voice GmbH
> Schomburgstr. 80
> D-22767 Hamburg / Germany
>
> http://www.ng-voice.com
> mailto:carsten@ng-voice.com
>
> Office +49 40 34927219
> Fax +49 40 34927220
>
> Sitz der Gesellschaft: Hamburg
> Registergericht: Amtsgericht Hamburg, HRB 120189
> Geschäftsführer: Carsten Bock
> Ust-ID: DE279344284
>
> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> http://www.ng-voice.com/imprint/
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
[Attachment #5 (text/html)]
<div>Hi Carsten,</div><div><br></div><div>Thanks for reply. No idea how this \
happen but after increase the shared memory used to run Kamailio , this 500 issue is \
gone now. </div><div><br></div><div>BTW, REGISTER being routed seems wrong in \
my config file , therefore after load balancing , client cannot reach each other by \
MESSAGE.</div> <div><br></div><div>Client --- > Kamailio LB \
--->Sip01</div><div> \ \
---->Sip02</div><div><br></div>Any \
idea??<div><div><br></div><div><br></div><div>Best Regards,</div><div><br></div> \
<div>chanea<br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 10:39 PM, Carsten \
Bock <span dir="ltr"><<a href="mailto:carsten@ng-voice.com" \
target="_blank">carsten@ng-voice.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hi,<br>
<br>
i see no point in your config, where the 500 should come from. It must<br>
come from the servers you are loadbalancing for.<br>
<div><div class="h5"><br>
Kind regards,<br>
Carsten<br>
<br>
2013/2/26 chanea <<a href="mailto:chanea@gmail.com">chanea@gmail.com</a>>:<br>
> Hi Carsten,<br>
><br>
> Thanks again for your kind reply.<br>
> I am quite newbie to kamailio, and I dont see why the load balancer is<br>
> replying "500".<br>
><br>
> It will be great appreciated if you can point out what i am doing wrong in<br>
> my config file as below.<br>
> Actually, there is another issue for the setting below is that it cannot<br>
> load balancing the "REGISTER" correctly.<br>
><br>
> best regards,<br>
><br>
> chanea<br>
><br>
> ==============================================================<br>
><br>
> ####### Global Parameters #########<br>
> #!define WITH_NAT<br>
><br>
><br>
><br>
> # - flags<br>
> # FLT_ - per transaction (message) flags<br>
> # FLB_ - per branch flags<br>
> #!define FLT_ACC 1<br>
> #!define FLT_ACCMISSED 2<br>
> #!define FLT_ACCFAILED 3<br>
> #!define FLT_NATS 5<br>
><br>
> #!define FLB_NATB 6<br>
> #!define FLB_NATSIPPING 7<br>
><br>
> ####### Global Parameters #########<br>
><br>
> debug=-3<br>
> log_stderror=no<br>
><br>
> memdbg=5<br>
> memlog=5<br>
><br>
> log_facility=LOG_LOCAL0<br>
><br>
> fork=yes<br>
> children=8<br>
><br>
> disable_tcp=yes<br>
><br>
> auto_aliases=no<br>
><br>
> port=5060<br>
><br>
><br>
> sip_warning=no<br>
><br>
> ####### Modules Section ########<br>
><br>
> # set paths to location of modules<br>
> #!ifdef LOCAL_TEST_RUN<br>
> mpath="modules_k:modules"<br>
> #!else<br>
> mpath="/usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/"<br>
> #!endif<br>
> loadmodule "db_mysql.so"<br>
> loadmodule "mi_fifo.so"<br>
> loadmodule "kex.so"<br>
> loadmodule "tm.so"<br>
> loadmodule "tmx.so"<br>
> loadmodule "sl.so"<br>
> loadmodule "rr.so"<br>
> loadmodule "usrloc.so"<br>
> loadmodule "pv.so"<br>
> loadmodule "maxfwd.so"<br>
> loadmodule "textops.so"<br>
> loadmodule "siputils.so"<br>
> loadmodule "xlog.so"<br>
> loadmodule "sanity.so"<br>
> loadmodule "ctl.so"<br>
> loadmodule "mi_rpc.so"<br>
> loadmodule "acc.so"<br>
> loadmodule "dispatcher.so"<br>
><br>
> #!ifdef WITH_NAT<br>
> loadmodule "nathelper.so"<br>
> loadmodule "rtpproxy.so"<br>
> #!endif<br>
><br>
><br>
> # ----- mi_fifo params -----<br>
> modparam("mi_fifo", "fifo_name", \
"/tmp/kamailio_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>
> # do not append from tag to the RR (no need for this script)<br>
> modparam("rr", "append_fromtag", 0)<br>
><br>
><br>
> # ----- acc params -----<br>
> modparam("acc", "log_flag", 1)<br>
> modparam("acc", "failed_transaction_flag", 3)<br>
> modparam("acc", "log_extra",<br>
> "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;src_ip=$si")<br>
><br>
> # ----- tm params -----<br>
> modparam("tm", "fr_timer", 10000)<br>
> modparam("tm", "fr_inv_timer", 40000)<br>
><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>")<br> > \
modparam("rtpproxy", "rtpproxy_sock", \
"udp:{myipaddr}:22222")<br> > # ----- nathelper params -----<br>
> modparam("nathelper", "natping_interval", 600)<br>
> modparam("nathelper", "ping_nated_only", 1)<br>
> modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)<br>
> modparam("nathelper", "sipping_from", \
"sip:pinger@{myipaddr}")<br> ><br>
> # params needed for NAT traversal in other modules<br>
> modparam("nathelper|registrar", "received_avp", \
"$avp(RECEIVED)")<br> > modparam("usrloc", \
"nat_bflag", FLB_NATB)<br> > #!endif<br>
><br>
><br>
> # ----- dispatcher params -----<br>
> modparam("dispatcher", "db_url",<br>
> "mysql://{mydbsetting}")<br>
> modparam("dispatcher", "table_name", \
"dispatcher")<br> > modparam("dispatcher", "flags", \
2)<br> > modparam("dispatcher", "dst_avp", \
"$avp(AVP_DST)")<br> > modparam("dispatcher", \
"grp_avp", "$avp(AVP_GRP)")<br> > \
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")<br> \
><br> > ####### Routing Logic ########<br>
><br>
><br>
> # main request routing logic<br>
><br>
> route {<br>
><br>
> # per request initial checks<br>
> route(REQINIT);<br>
><br>
> # NAT detection<br>
> route(NAT);<br>
><br>
> # handle requests within SIP dialogs<br>
> route(WITHINDLG);<br>
><br>
> ### only initial requests (no To tag)<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>
> # record routing for dialog forming requests (in case they are routed)<br>
> # - remove preloaded route headers<br>
> remove_hf("Route");<br>
> if (is_method("INVITE|SUBSCRIBE"))<br>
> record_route();<br>
><br>
> # account only INVITEs<br>
> if (is_method("INVITE"))<br>
> {<br>
> setflag(1); # do accounting<br>
> }<br>
><br>
> # dispatch destinations<br>
> route(DISPATCH);<br>
><br>
> route(RELAY);<br>
> }<br>
><br>
><br>
> route[RELAY] {<br>
> #!ifdef WITH_NAT<br>
> if (check_route_param("nat=yes")) {<br>
> setbflag(FLB_NATB);<br>
> }<br>
> if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {<br>
> route(RTPPROXY);<br>
> }<br>
> #!endif<br>
> if (!t_relay()) {<br>
> sl_reply_error();<br>
> }<br>
> exit;<br>
> }<br>
><br>
><br>
> # Per SIP request initial checks<br>
> route[REQINIT] {<br>
> if (!mf_process_maxfwd_header("10")) {<br>
> sl_send_reply("483","Too Many Hops");<br>
> exit;<br>
> }<br>
><br>
> if(!sanity_check("1511", "7"))<br>
> {<br>
> xlog("Malformed SIP message from $si:$sp\n");<br>
> exit;<br>
> }<br>
> }<br>
><br>
> # Caller NAT detection route<br>
> route[NAT] {<br>
> #!ifdef WITH_NAT<br>
> force_rport();<br>
> if (nat_uac_test("19")) {<br>
> #xlog("L_INFO","ALERT: ua is behind NAT \
(ru:$ru)(IP:$si:$sp)\n");<br> ><br>
> if (method=="REGISTER") {<br>
> fix_nated_register();<br>
> } else {<br>
> fix_nated_contact();<br>
> }<br>
> setflag(FLT_NATS);<br>
> }<br>
> #!endif<br>
> return;<br>
> }<br>
><br>
> # RTPProxy control<br>
> route[RTPPROXY] {<br>
> #!ifdef WITH_NAT<br>
> if (is_method("BYE")) {<br>
> unforce_rtp_proxy();<br>
> } else if (is_method("INVITE")){<br>
> force_rtp_proxy();<br>
> }<br>
> if (!has_totag()) add_rr_param(";nat=yes");<br>
> #!endif<br>
> return;<br>
> }<br>
><br>
><br>
><br>
> # Handle requests within SIP dialogs<br>
> route[WITHINDLG] {<br>
> if (has_totag()) {<br>
> # sequential request withing a dialog should<br>
> # take the path determined by record-routing<br>
> if (loose_route()) {<br>
> if (is_method("BYE")) {<br>
> setflag(1); # do accounting ...<br>
> setflag(3); # ... even if the transaction fails<br>
> }<br>
> route(RELAY);<br>
> } else {<br>
> if ( is_method("ACK") ) {<br>
> if ( t_check_trans() ) {<br>
> # non loose-route, but stateful ACK;<br>
> # must be ACK after a 487 or e.g. 404 from upstream server<br>
> t_relay();<br>
> exit;<br>
> } else {<br>
> # ACK without matching transaction ... ignore and discard.<br>
> exit;<br>
> }<br>
> }<br>
> sl_send_reply("404","Not here");<br>
> }<br>
> exit;<br>
> }<br>
> }<br>
><br>
> # Dispatch requests<br>
> route[DISPATCH] {<br>
> # round robin dispatching on gateways group '1'<br>
> if(!ds_select_dst("1", "0"))<br>
> {<br>
> send_reply("404", "No destination");<br>
> exit;<br>
> }<br>
> xlog("L_INFO", "--- SCRIPT: going to <$ru> via \
<$du>\n");<br> > t_on_failure("RTF_DISPATCH");<br>
> return;<br>
> }<br>
><br>
> # Sample failure route<br>
> failure_route[RTF_DISPATCH] {<br>
> if (t_is_canceled()) {<br>
> exit;<br>
> }<br>
> # next DST - only for 500 or local timeout<br>
> if (t_check_status("500")<br>
> or (t_branch_timeout() and !t_branch_replied()))<br>
> {<br>
> if(ds_next_dst())<br>
> {<br>
> t_on_failure("RTF_DISPATCH");<br>
> route(RELAY);<br>
> exit;<br>
> }<br>
> }<br>
> }<br>
> =================================================================<br>
><br>
><br>
><br>
> On Tue, Feb 26, 2013 at 8:32 PM, Carsten Bock <<a \
href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a>> wrote:<br> \
>><br> >> Hi,<br>
>><br>
>> the dispatcher module doesn't create "500 Internal Server \
Error" replies.<br> >> There must be another source for your error; most \
likely not the<br> >> Kamailio Loadbalancer.<br>
>><br>
>> Kind regards,<br>
>> Carsten<br>
>><br>
>> 2013/2/26 chanea <<a \
href="mailto:chanea@gmail.com">chanea@gmail.com</a>>:<br> >> > Hi \
Carsten,<br> >> ><br>
>> > Thanks for your quick reply.<br>
>> > The "500" is generated by the Kamailio server which is used \
as Load<br> >> > balancer<br>
>> > ( using dispatcher module).<br>
>> ><br>
>> > I dont see any 500 number in my kamailio.cfg in the load balancer<br>
>> > kamailio.<br>
>> > Should I go deep into the dispatcher module itself?<br>
>> ><br>
>> ><br>
>> > Unluckily I cannot check the reason by checking the syslog since \
this<br> >> > only<br>
>> > happen when thousands of request come in at the same time.<br>
>> ><br>
>> > chanea<br>
>> ><br>
>> ><br>
>> ><br>
>> > On Tue, Feb 26, 2013 at 7:24 PM, Carsten Bock <<a \
href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a>><br> >> > \
wrote:<br> >> >><br>
>> >> Hi,<br>
>> >><br>
>> >> can you see, why the Kamailio is returning a "500 Server \
internal<br> >> >> error"? This response must be either created by \
some module or by some<br> >> >> upstream server (e.g. in case of \
loadbalancing).<br> >> >> Kamailio itself would not create such response, \
you should (if at all)<br> >> >> find the answer in the logs...<br>
>> >><br>
>> >> Kind regards,<br>
>> >> Carsten<br>
>> >><br>
>> >> 2013/2/26 chanea <<a \
href="mailto:chanea@gmail.com">chanea@gmail.com</a>>:<br> >> >> > \
Dear all<br> >> >> ><br>
>> >> > While lots of request come to my Kamailio 3.1.x in the same \
time ,<br> >> >> > server<br>
>> >> > is returning "500, Server Internal Error" to some of \
the request.<br> >> >> ><br>
>> >> > What should i do if i want to reduce the number of \
"500" response?<br> >> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > chanea<br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > sr-dev mailing list<br>
>> >> > <a \
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br> \
>> >> > <a \
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
>> >> ><br> >> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Carsten Bock<br>
>> >> CEO (Geschäftsführer)<br>
>> >><br>
>> >> =============================================================<br>
>> >> Visit us on the Kamailio World 2013, 16./17. April 2013<br>
>> >> => <a href="http://conference.kamailio.com/k01/" \
target="_blank">http://conference.kamailio.com/k01/</a> \
See<br> >> >> you there!<br>
>> >> =============================================================<br>
>> >><br>
>> >> ng-voice GmbH<br>
>> >> Schomburgstr. 80<br>
>> >> D-22767 Hamburg / Germany<br>
>> >><br>
>> >> <a href="http://www.ng-voice.com" \
target="_blank">http://www.ng-voice.com</a><br> >> >> mailto:<a \
href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br> >> >><br>
>> >> Office <a href="tel:%2B49%2040%2034927219" \
value="+494034927219">+49 40 34927219</a><br> >> >> Fax <a \
href="tel:%2B49%2040%2034927220" value="+494034927220">+49 40 34927220</a><br> \
>> >><br> >> >> Sitz der Gesellschaft: Hamburg<br>
>> >> Registergericht: Amtsgericht Hamburg, HRB 120189<br>
>> >> Geschäftsführer: Carsten Bock<br>
>> >> Ust-ID: DE279344284<br>
>> >><br>
>> >> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
>> >> <a href="http://www.ng-voice.com/imprint/" \
target="_blank">http://www.ng-voice.com/imprint/</a><br> >> >><br>
>> >> _______________________________________________<br>
>> >> sr-dev mailing list<br>
>> >> <a \
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br> \
>> >> <a \
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
>> ><br> >> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > sr-dev mailing list<br>
>> > <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
>> > <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
>> ><br> >><br>
>><br>
>><br>
>> --<br>
>> Carsten Bock<br>
>> CEO (Geschäftsführer)<br>
>><br>
>> =============================================================<br>
>> Visit us on the Kamailio World 2013, 16./17. April 2013<br>
>> => <a href="http://conference.kamailio.com/k01/" \
target="_blank">http://conference.kamailio.com/k01/</a> \
See<br> >> you there!<br>
>> =============================================================<br>
>><br>
>> ng-voice GmbH<br>
>> Schomburgstr. 80<br>
>> D-22767 Hamburg / Germany<br>
>><br>
>> <a href="http://www.ng-voice.com" \
target="_blank">http://www.ng-voice.com</a><br> >> mailto:<a \
href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br> >><br>
>> Office <a href="tel:%2B49%2040%2034927219" value="+494034927219">+49 40 \
34927219</a><br> >> Fax <a href="tel:%2B49%2040%2034927220" \
value="+494034927220">+49 40 34927220</a><br> >><br>
>> Sitz der Gesellschaft: Hamburg<br>
>> Registergericht: Amtsgericht Hamburg, HRB 120189<br>
>> Geschäftsführer: Carsten Bock<br>
>> Ust-ID: DE279344284<br>
>><br>
>> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
>> <a href="http://www.ng-voice.com/imprint/" \
target="_blank">http://www.ng-voice.com/imprint/</a><br> >><br>
>> _______________________________________________<br>
>> sr-dev mailing list<br>
>> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
><br> ><br>
><br>
> _______________________________________________<br>
> sr-dev mailing list<br>
> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
><br> <br>
<br>
<br>
--<br>
Carsten Bock<br>
CEO (Geschäftsführer)<br>
<br>
=============================================================<br>
Visit us on the Kamailio World 2013, 16./17. April 2013<br>
=> <a href="http://conference.kamailio.com/k01/" \
target="_blank">http://conference.kamailio.com/k01/</a> \
See<br> you there!<br>
=============================================================<br>
<br>
ng-voice GmbH<br>
Schomburgstr. 80<br>
D-22767 Hamburg / Germany<br>
<br>
<a href="http://www.ng-voice.com" target="_blank">http://www.ng-voice.com</a><br>
mailto:<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br>
<br>
Office <a href="tel:%2B49%2040%2034927219" value="+494034927219">+49 40 \
34927219</a><br> Fax <a href="tel:%2B49%2040%2034927220" value="+494034927220">+49 40 \
34927220</a><br> <br>
Sitz der Gesellschaft: Hamburg<br>
Registergericht: Amtsgericht Hamburg, HRB 120189<br>
Geschäftsführer: Carsten Bock<br>
Ust-ID: DE279344284<br>
<br>
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
<a href="http://www.ng-voice.com/imprint/" \
target="_blank">http://www.ng-voice.com/imprint/</a><br> <br>
_______________________________________________<br>
</div></div>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing \
list<br> <a href="mailto:sr-users@lists.sip-router.org">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/cgi-bin/mailman/listinfo/sr-users</a><br> \
</blockquote></div><br></div></div>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic