0

How to inject a string from SIPP command line into <exec> section of script ?

SIPP wiki talks about declaration but not how to use it inside <exec>

CMD:

    sipp -sf sipp_pcap.txt ........ -key k1 "5060" -set pcap_file "abc.pcap"

sipp_pcap.txt

    <scenario name=" UAC">
    <Global variables="pcap_file" />
    <Reference variables="pcap_file" />

    ………..
    ……….


                     <exec play_pcap_video="/root/backup/[$pcap_file]” />

    …………..
    ……………..
Makesh
  • 1,236
  • 1
  • 11
  • 25

1 Answers1

0

There was issue with sipp v.3.3 and in sipp v.3.5 its working, if you use key instead of set like below:

CMD:

    sipp -sf sipp_pcap.txt ........ -key k1 "5060" -key pcap_file "abc.pcap"

sipp_pcap.txt

    <scenario name=" UAC">
    <Global variables="pcap_file" />
    <Reference variables="pcap_file" />

    ………..
    ……….

                     // no $ symbol
                     <exec play_pcap_video="/root/backup/[pcap_file]” />

    …………..
    ……………..

PS: Still do not know how to use with set

Makesh
  • 1,236
  • 1
  • 11
  • 25
  • Did you use official SIPp release? I'm asking because I'm unable to reproduce your solution, but there PR that hasn't been merged but does something very similar (https://github.com/SIPp/sipp/pull/330). – IvanR Oct 04 '18 at 15:09