Hi Octavio,
this is what I had in mind, but there is still a catch you have to
address. If the contents of variable 99 is "10", both regexp="1" and
regexp="10" match so both output variables become defined, because
regular expressions operate on strings, not numbers, and "1" is a
substring of "10". To avoid this:
- either replace the multi-digit values by single-letter ones ("10" =>
"A", "11" => "B" etc.),
- or use more strict regular expressions, regexp="^1$", where ^
indicates the beginning of the string and $ the end of it, so "10"
doesn't match because the string does not end after the "1".
P.
Dne 31.3.2016 v 4:48 Octavio Duarte napsal(a):
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
<mailto: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
<mailto: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
<mailto: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 list
Sipp-users@lists.sourceforge.net
<mailto: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
<mailto: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