Tomasz,

The assumption was that the SUT was exposing a single IP address like it
would be the case with a load balancer in front of your multiple
application servers.

Code changes are required for IMS Bench SIPp to behave the way you are
trying to use it. It might be pretty simple though: I would suggest you
look at sudp.cpp (UDP socket) and do something along the following
lines: When the first SIP message of an expected call arrives, set the
call->m_DstAddr to the address the UDP message was received from. You
could also do it every time a message is received but that would
probably be overkill (unless you expect a call to move from one SUT to
another SUT in the middle of the scenario).

void CSipUspSocket::HandleEvent(int evtype)
{
  ...
  if (!call_ptr) {
        char* ptr = strstr(msg, "From:";
        if (ptr) {
                call_ptr = CheckExpectedCall(ptr, call_id);
                if (call_ptr) {
->                      call_ptr->SetDestAddr(&m_RcvAddr,
m_RcvAddrSize);
                }
        }
  ...
}

And in call.hpp, implement SetDestAddr():

class call {
public:
        ...
        void SetDestAddr(SockAddrStorage* dstAddr, socklen_t addrSz) {
                memcpy(&m_DstAddr, dstAddr, addrSz);
        }
        ...
};

Hope this helps,
-David

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tomasz
Radziszewski
Sent: lundi 28 avril 2008 17:26
To: [email protected]
Subject: Re: [Sipp-users] IMS bench SIPp - multiple SUTs support

I did as described in previous mail, but there is a problem: the UAS
sipp 
sends responses to different SUT instance than it has received request
from. 
Is there a way to change it?

I'm putting below INVITE and 180 captured by Wireshark, exported as
text. 
INVITE comes from 192.168.96.85:5062, but the response 180 goes to 
192.168.96.86:5061. These addresses are two of my servers, but there is
a 
problem when response comes to different server than the one that sent
the 
request.

Frame 170 (639 bytes on wire, 639 bytes captured)
Linux cooked capture
Internet Protocol, Src: 192.168.96.85 (192.168.96.85), Dst:
192.168.96.102 
(192.168.96.102)
User Datagram Protocol, Src Port: 5062 (5062), Dst Port: 10797 (10797)
Session Initiation Protocol
    Request-Line: INVITE sip:[EMAIL PROTECTED]:10797 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 
127.0.0.1:5062;branch=z9hG4bKa8XWm_SjsllCeyKHNvM6Tg;rport
        Max-Forwards: 70
        From: "subs017011" <sip:[EMAIL PROTECTED]>;tag=s4Ndag
        To: "subs009796" <sip:[EMAIL PROTECTED]:10797>
        Call-ID: dRaZANcYpZ73oMJUdH9U4Q
        CSeq: 1 INVITE
        Contact: <sip:127.0.0.1:5062;transport=udp>
        Content-Type: application/sdp
        Content-Length: 139
        X-Original-CallID: [EMAIL PROTECTED]
    Message body

Frame 171 (412 bytes on wire, 412 bytes captured)
Linux cooked capture
Internet Protocol, Src: 192.168.96.102 (192.168.96.102), Dst:
192.168.96.86 
(192.168.96.86)
User Datagram Protocol, Src Port: 10797 (10797), Dst Port: 5061 (5061)
Session Initiation Protocol
    Status-Line: SIP/2.0 180 Ringing
    Message Header
        Via: SIP/2.0/UDP 
127.0.0.1:5062;branch=z9hG4bKa8XWm_SjsllCeyKHNvM6Tg;rport
        From: "subs017011" <sip:[EMAIL PROTECTED]>;tag=s4Ndag
        To: "subs009796" 
<sip:[EMAIL PROTECTED]:10797>;tag=11838SIPpTag011
        Call-ID: dRaZANcYpZ73oMJUdH9U4Q
        CSeq: 1 INVITE
        Contact: <sip:[EMAIL PROTECTED]:10797;transport=UDP>
        Content-Length: 0


-- 
Tomasz Radziszewski
Senior Software Engineer
Ericpol Telecom sp. z o.o.
Madalinskiego 9, 30-303 Krakow, Poland
e-mail: [EMAIL PROTECTED]
http://www.ericpol.pl/

> Hi
>
> I have an environment with a cluster of SIP application servers. These
> servers are the SUTs (Systems Under Test). Each server is listening
for SIP
> on different host/port combination. I would like to run traffic that
is
> distributed among all of these servers. However, I don't have a load
> balancer in this environment.
>
> Is it possible to configure IMS bench so that it will distribute load
among
> these servers? I need the same amount of load on each server (SUT).
I'm
> going to try the following solution:
>
> 1. Using ims_bench.pl script, define as many Test Systems as the
number of
> SUTs.
> 2. For each Test System, modify the script run_x.sh, changing the
> destination address to one of the SUTs.
>
> Is it correct? Or will it have some side effects?
>
> Kind regards



------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
---------------------------------------------------------------------
Intel Corporation NV/SA
Rond point Schuman 6, B-1040 Brussels
RPM (Bruxelles) 0415.497.718. 
Citibank, Brussels, account 570/1031255/09

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to