HI
I have the same problem that sipp performs the nop block before it jumps
to the label.
I attached the xml scenario file and the log file to show the problem. 

PS: I'm using sipp version 3.0


Regards,
 
Evgeny Miloslavsky
Systest Engineer
Juniper Networks Solutions Israel LTD.
Office: 972-9-9712355 / 7320
 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ricardo
Fernandes
Sent: Friday, July 25, 2008 1:43 PM
To: [email protected]
Subject: [Sipp-users] Jumping to a Label resets variables

Hello,

I have a scenario of a client that registers and then must quit after
receiving x calls.
The scenario goes like this:

<nop>
        <action>
                <assignstr assign_to="NumberOfCallsToAwnserTemp"
value="[field1]"/>
-- field[1] contains the value 2
                <todouble assign_to="NumberOfCallsToAwnser"
variable="NumberOfCallsToAwnserTemp"/>
        </action>
</nop>
<label id="ReceiveCall"/>

<recv request="INVITE" rrs="true"> </recv>
<send><![CDATA[....]]></send>
<recv request="ACK" rrs="true"/>
<recv request="BYE><\recv>
<send><![CDATA[...]]></send>
<nop>
    <action>
         <exec command="echo '[$NumberOfCallsToAwnser]' >> file.log"/>
---> This will always print 2 that is the value of [field1]
         <subtract assign_to="NumberOfCallsToAwnser" value="1" />
        <exec command="echo '[$NumberOfCallsToAwnser]' >> file.log"/>
---> This will always print 1
        <test assign_to="NumberOfCallsToAwnserIsZero"
variable="NumberOfCallsToAwnser" compare="equal" value="0"/>
        <test assign_to="NumberOfCallsToAwnserGreaterZero"
variable="NumberOfCallsToAwnser" compare="greater_than" value="0"/>
    </action>
</nop>
<nop hide="true" test="NumberOfCallsToAwnserIsZero" next="Unregister" />
<nop hide="true" test="NumberOfCallsToAwnserGreaterZero"
next="ReceiveCall" /> -- here i go to ReceiveCall to make a loop

<label id="Unregister"/>
....Unregister part

The problem is that when i go to ReceiveCall label the variable
NumberOfCallsToAwnser is always reset to the inicial value of 2.
Is there a way to prevent the reset of this variable ??

I am using the latest version of the sipp for snapshots for windows, I
have noticied that the other versions do the same.

TIA
Ricardo Fernandes

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
<?xml version="1.0" encoding="ISO-8859-1" ?>
   <!DOCTYPE scenario SYSTEM "sipp.dtd">
   
   <!-- This program is free software; you can redistribute it and/or      -->
   <!-- modify it under the terms of the GNU General Public License as     -->
   <!-- published by the Free Software Foundation; either version 2 of the -->
   <!-- License, or (at your option) any later version.                    -->
   <!--                                                                    -->
   <!-- This program is distributed in the hope that it will be useful,    -->
  <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
  <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
  <!-- GNU General Public License for more details.                       -->
  <!--                                                                    -->
  <!-- You should have received a copy of the GNU General Public License  -->
  <!-- along with this program; if not, write to the                      -->
  <!-- Free Software Foundation, Inc.,                                    -->
  <!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
  <!--                                                                    -->
  <!--                 Sipp default 'uas' scenario.                       -->
  <!--                                                                    -->
  
  <scenario name="Basic UAS responder">

    <nop>
      <action>
         <assign assign_to="1" value="0" />
        <log message ="variable 1=[$1]"/>
      </action>
    </nop>

  <label id="1"/>

    <recv request="INVITE" test="2" next="2">
      <action>
        <add assign_to="1" value="1"/>
        <log message="variable 1=[$1]"/>
        <test assign_to="2" variable="1" compare="equal" value="2"/>
	<log message="variable 2=[$2]" />
      </action>
    </recv>
  
    <send>
      <![CDATA[
  
        SIP/2.0 302 Multiple Choices
        [last_Via:]
        [last_From:]
        [last_To:]
        [last_Call-ID:]
        [last_CSeq:]
        Contact: sip:70.1.2.100:5060;transport=UDP
  
      ]]>
    </send>
  
   <recv request="ACK" next="1" >
   </recv>

 <label id="2"/>

  <send>
    <![CDATA[

      SIP/2.0 180 Ringing
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </send>

  <send retrans="500">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv request="ACK">
  </recv>

  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </send>

  <!-- Keep the call open for a while in case the 200 is lost to be     -->
  <!-- able to retransmit it if we receive the BYE again.               -->
  <pause milliseconds="4000"/>


  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>

 

Attachment: uas_5.3.1-redirector.undertest_17860_logs.log
Description: uas_5.3.1-redirector.undertest_17860_logs.log

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to