Hello Rami,

you have to change the way you look at SIPp scenario execution. A scenario describes the steps of a single "call", and it is executed multiple times in parallel (or rather in sequence with overlap); each pass through the scenario (a SIP "call") is identified by a distinct identifier which is the SIP Call-ID. The Call-ID value, represented by scenario variable [call_id], is either generated by SIPp itself (for UAC scenarios, like your case) or by external user agent(s) (for UAS scenarios).

So to answer your question: you have to merge your two scenarios (the one starting with REGISTER and the one starting with INVITE) into one, and the choice of one of the two possible paths through it (the one starting with REGISTER or the one starting with INVITE) has to be done at its beginning, based on the [call_number] which is an integer variable monotonously growing from 1 with each new pass through the scenario (and not the same as [call_id] which is more complex string, although it contains the [call_number] value in UAC scenarios).

So calls 1 to 5 (in your case) would take the REGISTER path, and all the rest would take the the INVITE path. The call number modulo 5 would be your index to the csv file. The REGISTER branch has to be looped (forever or for a pre-defined number of repetitions) because RFC3261 recommends that registration extensions (re-registrations) maintain the same Call-ID. On the other hand, the INVITE branch must not be looped, because the Call-ID has to be distinct for distinct calls.

The command line parameters you give to sipp at start will determine how many calls will be spawned per unit of time and what would be the total number of calls.

The SEQUENTIAL mode of the csv file means that a new row is used for each new pass through the scenario, not with each reference to it within a single pass (this is why your current scenario sends all 5 REGISTERs with the same user ID). I am not sure whether it wraps around after reaching the end of the csv file; if it does, you don't need to bother about the arithmetic converting [call_number] into row index; if it doesn't, you have to use the USER mode and compute the row index as ([call number] modulo 5) which isn't exactly easy.

Pavel

Dne 22.6.2016 v 19:47 rami deis napsal(a):

Hello everyone,


this is my first post, and fairly new to sipp. what im trying to do in summary is combine the execution of 2 sipp scenarios into 1.


First, i would like to register a set of users (for example 5) users from a csv file; example:

SEQUENTIAL
sipphone1000000;test.lab;[authentication [email protected] password=IP30];sipphone1001000 sipphone1000001;test.lab;[authentication [email protected] password=IP30];sipphone1001001 sipphone1000002;test.lab;[authentication [email protected] password=IP30];sipphone1001002 sipphone1000003;test.lab;[authentication [email protected] password=IP30];sipphone1001003 sipphone1000004;test.lab;[authentication [email protected] password=IP30];sipphone1001004

Once the users are registered, then we make calls for those users for limited time, then we re-register those users again, and make calls again, and keeps on going.

This is how the scenario looks like:

Remote              SIPp UAS

    |(1) REGISTER U1      |  Register with Expiry Timer set to 2Hrs
    |-------------------->|
    |(2) 200              |
    |<--------------------|
    |         .           |
    |         .           |
    |         .           |
    |(3) REGISTER U5      |
    |-------------------->|
    |(4) 200              |
    |<--------------------|
    |                     |  set Timer 2Hrs
    |(5) INVITE U1        |  -----+
    |-------------------->|     |
    |(6) 180              |   |
    |<--------------------|   |
    |         .           |   |
    |         .           |   |
    |         .           |  |
    |(7) INVITE U5        |   |
|-------------------->| +---- Loop until a timer expires (example 2Hrs)
    |(8) 180              |   |
    |<--------------------|     |
    |(9) 200              |   |
    |<--------------------|     |
    |(10) ACK             |   |
    |-------------------->|     |
    |(11) BYE             |   |
    |-------------------->|     |
    |(12) 200             |   |
    |<--------------------|  -----+
    |                     | After 2 Hrs - Re-Register same users again
    |(13) RE-REGISTER U1  |
    |-------------------->|
    |(14) 200             |
    |<--------------------|
    |         .           |
    |         .           |
|         .           |
    |(15) RE-REGISTER U5  |
    |-------------------->|
    |(16) 200             |
    |<--------------------|
    |                     |  set Timer 2Hrs
    |(17) INVITE U1       |  -----+
    |-------------------->|     |
    |(18) 180             |   |
    |<--------------------|   |
    |         .           |   |
| . | +---- Loop until a timer expires (example 2Hrs)

And so on...

this is what i was able to do so far:


<scenario name="User A Registration + INVITE">

 <nop>
   <action>
      <assign assign_to="counter" value="0"/>
  </action>
 </nop>

 <label id="start_of_loop" />

<send retrans="500">
  <![CDATA[
    REGISTER sip:[field1] SIP/2.0
    ...
  ]]>
</send>

<!-- Begining of no authentication scenario -->
<label id="1"/>

<!-- <recv response="200" next="2"></recv> -->
<recv response="200"></recv>

  <nop>
    <action>
      <add assign_to="counter" value="1"/>
<test assign_to="flag_limit" variable="counter" compare="greater_than_equal" value="5"/>
    </action>
  </nop>

  <nop next="2" test="flag_limit"/>

  <nop next="start_of_loop"/>

<!-- No Authentication scenario is completed - Jump to scenario INVITE, i.e. label 2 -->

<label id="2" />

<!-- Begining of the INVITE scenario -->
  <send retrans="500">
    <![CDATA[
      INVITE sip:[field3]@[field1] SIP/2.0
      ...
    ]]>
  </send>
...
to end of file

however, when i run this scenario, it registers the same user (sipphone1000000) 5 times, then it send the 1st INVITE. What im trying to do is to register all 5 users in the csv file before it sends the 1st INVITE. would it be possible to perform such flow with sipp?


Thanks alot for any suggestion.

Rami D.






------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to