Andreas Winkelbauer <andreas.winkelba...@gmx.at> wrote on 01/09/2009 
08:10:15 PM:
> 1) When using pcap play I would like to inject the path to the pcap file
> using a [fieldN] keyword or a variable [$n].
> 
> So, instead of something like
> 
> <exec play_pcap_audio="/path/to/file.pcap" />
> 
> I would like to have
> 
> <exec play_pcap_audio="[fieldN]/file.pcap" />
> or
> <exec play_pcap_audio="[$n]/file.pcap" />
> 
> I tried this in several ways but it never worked out, so I guess this is
> just not possible at the moment. Is this correct?
Yes, it is not currently possible.  I was going to say it would be easy to 
implement, but the problem here is that the pcap file is loaded and 
processed on scenario startup; not once per call.  It is possible to 
change this, but it would need some sort of caching to be efficient in the 
common case of a hardcoded file [also to deal with concurrent calls].  If 
someone is motivated to do this, I can give pointers.

> 2) I would like to use meaningful variable names in my scenario. So, for
> example, instead of writing "[field2]" I would like to use something
> like "[$auth_string]".
> 
> To achieve this I was using an action like
> 
> <assignstr assign_to="auth_string" value="[field2]" />
> 
> where "[field2]" is equal to "[authentication username=foo 
password=bar]".
> 
> But when doing so I got an error message saying "Authentication keyword
> without dialog_authentication!.". This does not happen in cases where
> [fieldN] contains something different (e.g. "normal" text). This seems
> to be a bug, right?
The assignstr will try to evaluate what it is substituting, but it can't 
handle the authentication at this point; because it needs to have the 
challenge sent.  I suggest that instead of embedding the whole auth 
string, you do something like having this in your injection file, then:
SEQUENTIAL
field0,field1,foo,bar

In your actions:
<assignstr assign_to="auth_user" value="[field2]" />
<assignstr assign_to="auth_pass" value="[field3]" />

And then in the message:
[authentication username="$auth_user" password="$auth_pass"]

Charles

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to