Solved

i did this

<nop>
  <action>
    <assignstr assign_to="99" value="[field0]" />
  </action>
</nop>

<nop>
  <action>
    <ereg regexp="1" search_in="var" variable="99" assign_to="1"/>
    <ereg regexp="2" search_in="var" variable="99" assign_to="2"/>
    <ereg regexp="3" search_in="var" variable="99" assign_to="3"/>
    <ereg regexp="4" search_in="var" variable="99" assign_to="4"/>
    <ereg regexp="5" search_in="var" variable="99" assign_to="5"/>
    <ereg regexp="6" search_in="var" variable="99" assign_to="6"/>
    <ereg regexp="7" search_in="var" variable="99" assign_to="7"/>
    <ereg regexp="8" search_in="var" variable="99" assign_to="8"/>
    <ereg regexp="9" search_in="var" variable="99" assign_to="9"/>
    <ereg regexp="10" search_in="var" variable="99" assign_to="10"/>

  </action>
</nop>


<nop condexec="1">
  <action>
    <exec rtp_stream="/root/sipp-3.5.1/talago/audio1.wav,-1,18" />
     <exec command="echo audio1 >> from_list.log"/>
  </action>
</nop>
<nop condexec="2">
  <action>
    <exec rtp_stream="/root/sipp-3.5.1/talago/audio2.wav,-1,18" />
    <exec command="echo audio2 >> from_list.log"/>
  </action>
</nop>
<nop condexec="3">
  <action>
    <exec rtp_stream="/root/sipp-3.5.1/talago/audio3.wav,-1,18" />
    <exec command="echo audio3 >> from_list.log"/>
  </action>
</nop>

Thanks for your help!



Sent with MailTrack
<https://mailtrack.io/install?source=signature&lang=en&referral=xdu...@gmail.com&idSignature=22>

2016-03-30 19:55 GMT-06:00 Octavio Duarte <xdu...@gmail.com>:

> I tried something like this
>
> <nop>
>   <action>
>     <assignstr assign_to="99" value="[field0]" />
>   </action>
> </nop>
>
> <nop>
>   <action>
>     <test assign_to="1" variable="99" compare="equal" value="1" />
>     <test assign_to="2" variable="99" compare="equal" value="2" />
>     <test assign_to="3" variable="99" compare="equal" value="3" />
>     <test assign_to="4" variable="99" compare="equal" value="4" />
>     <test assign_to="5" variable="99" compare="equal" value="5" />
>     <test assign_to="6" variable="99" compare="equal" value="6" />
>     <test assign_to="7" variable="99" compare="equal" value="7" />
>     <test assign_to="8" variable="99" compare="equal" value="8" />
>     <test assign_to="9" variable="99" compare="equal" value="9" />
>     <test assign_to="10" variable="99" compare="equal" value="10" />
>
>   </action>
> </nop>
>
> <nop condexec="1">
>   <action>
>     <exec rtp_stream="/root/sipp/talago/audio1.wav,-1,18" />
>   </action>
> </nop>
> <nop condexec="2">
>   <action>
>     <exec rtp_stream="/root/sipp/talago/audio2.wav,-1,18" />
>   </action>
> </nop>
> <nop condexec="3">
>   <action>
>     <exec rtp_stream="/root/sipp/talago/audio3.wav,-1,18" />
>   </action>
> </nop>
>
> But all variables were set,
>
>
>
>
> Sent with MailTrack
> <https://mailtrack.io/install?source=signature&lang=en&referral=xdu...@gmail.com&idSignature=22>
>
> 2016-03-30 19:02 GMT-06:00 Octavio Duarte <xdu...@gmail.com>:
>
>> Thanks Pavel
>>
>> actually the audios.csv file is like this
>> RANDOM
>> audio0.wav
>> audio1.wav
>> audio2.wav
>> audio3.wav
>> audio4.wav
>> ....
>> audioN.wav
>>
>>
>> i just want to play audio randomly
>> as you say i have to do something like this
>> <nop condexec="1">
>>   <action>
>>     <exec rtp_stream="/root/sipp/talago/audio1.wav,-1,18" />
>>   </action>
>> </nop>
>> <nop condexec="2">
>>   <action>
>>     <exec rtp_stream="/root/sipp/talago/audio2.wav,-1,18" />
>>   </action>
>> </nop>
>> <nop condexec="3">
>>   <action>
>>     <exec rtp_stream="/root/sipp/talago/audio3.wav,-1,18" />
>>   </action>
>> </nop>
>>
>> but i don't know how to set just one variable  to play just one audio,
>> because with a regex i will always set the same variable
>> <nop>
>>   <action>
>>     <assignstr assign_to="1" value="[field0 file="randomnumber.csv"]" />
>>   </action>
>> </nop>
>>
>>
>> is there a way to do this?
>>
>> thanks in advance for your help!
>>
>>
>>
>>
>> 2016-03-30 15:49 GMT-06:00 sindelka <sinde...@ttc.cz>:
>>
>>> Hi Octavio,
>>>
>>> not this direct way. sipp needs to pre-cache the files to be played
>>> before actually starting to execute the scenario, so you'd have to prepare
>>> a sequence of <nop condexec="variable_name_N"><action><exec
>>> rtp_stream.../></action></nop> statements, and use a set of <ereg .../>
>>> before to set exactly one of variable_name_N depending on the contents of
>>> the [field0 file=audios.csv].
>>>
>>> This makes sense if you have at most low tens of different files to
>>> play; for more, sipp is probably not the best choice.
>>>
>>> Pavel
>>>
>>> Dne 30.3.2016 v 22:19 Octavio Duarte napsal(a):
>>>
>>> Hello everyone
>>>
>>> i am wondering if there is a way to play a wav audio from a file,
>>> something like this
>>>
>>> <action>
>>>      <!--<exec rtp_stream="/root/sipp/filipino1.wav,-1,18" />-->
>>>      <exec rtp_stream="/root/sipp/talago/[field0
>>> file="audios.csv"],-1,18" />
>>>    </action>
>>>  </nop>
>>>
>>> when i try to test this i get this error
>>>
>>> 2016-03-30      14:04:45.887580 1459368285.887580: Cannot read/cache
>>> rtpstream file /root/sipp/talago/[field0 file=
>>>
>>>
>>> Thanks in advance!
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Transform Data into Opportunity.
>>> Accelerate data analysis in your applications with
>>> Intel Data Analytics Acceleration Library.
>>> Click to learn 
>>> more.http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
>>>
>>>
>>>
>>> _______________________________________________
>>> Sipp-users mailing 
>>> listSipp-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sipp-users
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Transform Data into Opportunity.
>>> Accelerate data analysis in your applications with
>>> Intel Data Analytics Acceleration Library.
>>> Click to learn more.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
>>> _______________________________________________
>>> Sipp-users mailing list
>>> Sipp-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/sipp-users
>>>
>>>
>>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to