Ok, I solved it.

First I had not closed the action element containing the variable manipulation and testing elements. That enabled the scenario to at least run to completion, but it still always executed the supposedly conditional action. I had to add a noop element containing only the test and jump-to-label first, like this:

<nop>
<action>
<assignstr assign_to="1" value="[field2]" />
<todouble assign_to="2" variable="1" />
<test assign_to="3" variable="2" compare="not_equal" value="0" />
</action>
</nop>

<nop next="1" test="3">
</nop>

<nop>
<action>
<exec play_dtmf="[field4]#" />
</action>
</nop>

<label id="1"/>

One question still remains though: Is there any easier way to express this?

Regards
Ingemar

On 2011-11-17 18:45, Ingemar Nilsson wrote:
Hi,

I'm trying to execute an action depending on a value from an injection
file, but I can't make it work. I have the following working code (using
the DTMF patch from Dimitry Kunilov):

<nop>
<action>
<exec play_dtmf="[field4]#" />
</action>
</nop>

I want to only execute this action if a field from the injection file is
0, so I tried the following:

<nop>
<action>
<assignstr assign_to="1" value="[field2]" />
<todouble assign_to="2" variable="1" />
<test assign_to="3" variable="2" compare="not_equal" value="0" />
<action>
</nop>

<nop next="1" test="3">
<action>
<exec play_dtmf="[field4]#" />
</action>
</nop>

<label id="1"/>

But it doesn't work. SIPp gives the following complaint:

2011-11-17    18:35:39:880    1321551339.880024: Unknown action: action.

Any ideas?

By the way, the code above seems overly complicated just to express
"execute this action if field2 is 0". Is there any better way to express
this?

I'm using SIPp 3.1.9 patched with the DTMF patch mentioned above on
CentOS 5.

Regards
Ingemar


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users


--
Confy AB
Ingemar Nilsson
Software Developer and Operations Manager

Mob: +46 73 524 02 33 | E-mail: [email protected] <mailto:[email protected]> Office: Eriksbergsgatan 10, 116 20 Stockholm | Phone: +46 774 10 10 35 | Web: www.confy.se <http://www.confy.se/> Confy support: +46 774 10 10 49 | E-mail: [email protected] <mailto:[email protected]>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to