Takeshi.
    Your suggestion made complete sense to me but didn't work as expected i.e. 
test="102" next="3" never succeed.
<action>
         <ereg regexp="xml"
           search_in="msg"
           assign_to="101"/>
           <todouble assign_to="102" variable="101"/>
           <log message=" Received text: = [$101]"/>
           <log message=" Flag: = [$102]"/>
      </action>

Logs in output file:
Received text: =xml
Flag: =

Any idea, what's going wrong?

Thanks,
Rajpal

From: mayamatakeshi [mailto:mayamatake...@gmail.com]
Sent: Thursday, December 15, 2011 5:22 PM
To: Rajpal Dangi
Cc: sipp-users@lists.sourceforge.net
Subject: Re: [Sipp-users] regex and conditional assignment


On Fri, Dec 16, 2011 at 7:22 AM, Rajpal Dangi 
<rajpal.da...@transerainc.com<mailto:rajpal.da...@transerainc.com>> wrote:
Hi All,
       I have a scenario where based on the contents in the incoming message 
body I want to set a variable. I would be using this variable at later stage 
(using test and next)
I tried with:
<action>
         <ereg regexp="<Pattern>"
           search_in="msg"
           assign_to="101"/>
</action>

Here $101  gets assigned the matched pattern but not sure how to  assign  some 
integer value to $101 or some other variable such that it could be used in 
conjunction with "test".

SIPp doesn't handle integer variables. It deals with numeric variables as 
double precision floating point numbers. These can be used with 'test'. So, try 
converting the string to a number by using todouble:
  <todouble assign_to="102" variable="101" />

regards,
takeshi

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to