[Kamailio-Users] SIPp dispatcher load testing failure with too many hops - why?

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 18 19:23:53 CEST 2008


Hello,

is your sipp script dealing with record routing properly? Can you post a 
sample sip call from invite to bye (e.g., ngrep trace)? Will show better 
whose fault is. I doubt it has something to do with openser.

Cheers,
Daniel


On 08/18/08 18:48, sergejf wrote:
> Hello,
>
> I'm attempting to load test a simple dispatcher script in OpenSER 1.3.x
> using SIPp (built-in UAC and UAS scenarios). My dispatcher.list only has one
> address 8.XX.XX.12 (a SIPp instance, UAS). SIPp on 8.XX.XX.10 sends the
> INVITE messages to 63.XXX.XXX.110. Everything goes well until the UAC sends
> ACK and BYE in quick sequence. OpenSER tries to t_relay() it to itself,
> which results in a "too many hops" error: 
>
> 2008-08-18	11:16:56:708	1219072616.708649: Aborting call on unexpected
> message for Call-Id '1-3548 at 8.XX.XX.10': while expecting '200' (index 8),
> received 'SIP/2.0 483 To Many Hops
> Via: SIP/2.0/UDP 8.XX.XX.10:5061;branch=z9hG4bK-3548-1-7
> From: sipp <sip:sipp at 8.XX.XX.10:5061>;tag=3548SIPpTag001
> To: sut <sip:service at 63.XXX.XXX.110:5060>;tag=2148SIPpTag011
> Call-ID: 1-3548 at 8.XX.XX.10
> CSeq: 2 BYE
> Server: OpenSER (1.3.2-notls (x86_64/linux))
> Content-Length: 0
>
> I have tried modifying the SIPp UAC script to re-use the Contact: header
> from the SIP 200 OK message in the R-URI of the SIP ACK and SIP BYE, to no
> avail. I have loaded the TM module but I suppose that since the SIP 200 OK
> is the final message of the transaction, SIP ACK and SIP BYE won't
> automatically be relayed to 8.XX.XX.12.
>
> Is this an OpenSER issue or a SIPp scripting issue? Any advice would be
> appreciated. Please find below some relevant lines from my openser.cfg:
>
> route{
>         xlog("TRACE:ROUTE: src($si:$sp) dst($Ri:$Rp) msg($mb)\n");
>
>         # initial checkings
>         if ( !mf_process_maxfwd_header("10") ) {
>                 xlog("SCRIPT:ERROR: $rm (from $si:$sp) too many hops\n");
>                 sl_send_reply("483","To Many Hops");
>                 exit;
>         };
>
>         if (method==CANCEL) {
>                 if (t_check_trans())
>                         t_relay();
>                 exit;
>         }
>
>         # routing
>         if (has_totag()) {
>                 xlog("SCRIPT0:INFO: $rm RURI=[$ru] - routing to dst-uri
> [$du] cnt [$avp(i:273)] dst set [$avp(i:271)]\n");
>                 loose_route();
>                 if (method=="INVITE")
>                         record_route();
>                 route(1);
>                 exit;
>         }
>
> The SIP ACK and SIP BYE follow the route defined in the above if {}
> statement. The SIP INVITE follows the dispatcher route shown below:
>
>         record_route();
>
>         # perform load balancing
>
>         # set algorithm (4 = round robin)
>         $avp(alg) = 4;
>         # set the group 
>         $avp(grp) = 2;
>
>         if (method=="INVITE")
>                 xlog("CALL_START: RURI=[$ru] group=[$avp(grp)]
> callid=$ci\n");
>
>         # do balancing
>         if(!ds_select_dst("$avp(grp)", "$avp(alg)")) {
>                 xlog("CALL_DROP:INTERNAL: no destinations for [$ru]
> group=[$avp(grp)], callid=$ci\n");
>                 sl_send_reply("404", "no dst");
>                 exit;
>         }
>
>         if(avp_check("$avp(i:273)", "eq/i:1")) {
>                 if(!avp_pushto("$ruri","$avp(i:271)")) {
>                         xlog("CALL_DROP:INTERNAL: cannot push to ruri
> [$avp(i:271)], group=[$avp(grp)], callid=$ci\n");
>                         sl_send_reply("500", "cannot get dst");
>                         exit;
>                 }
>         } else {
>                 # redundancy
>                 t_on_failure("1");
>         }
>
>         xlog("SCRIPT:INFO: $rm RURI=[$ru] - routing to dst-uri [$du] cnt
> [$avp(i:273)] dst set [$avp(i:271)]\n");
>
>         # do forward
>         route(1);
>         exit;
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list