Hi Charles,

Thanks for your response. I'm not sure is you meant something like this
-

  <recv request="INVITE" crlf="true" >
  <action>
       <ereg regexp=" sip:(.*)@" search_in="hdr" header="To:"
check_it=i"true" assign_to="3" />
    </action>
  </recv>

<nop>
  <action>
    <test assign_to="2" variable="3" compare="equal" value="[key]" />
  </action>
</nop>

  <send next="2" test="2">
    <![CDATA[

      SIP/2.0 180 Ringing
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: [$3]

My intention is script should only proceed if - [$2] is true, otherwise
UAS should stop after sending 180. Right now, that's not happening.

Regards,

Shamik

-----Original Message-----
From: Charles P Wright [mailto:[EMAIL PROTECTED]
Sent: Monday, January 14, 2008 8:52 PM
To: Shamik Mukhopadhyay -X (shmukhop - WIPRO at Cisco)
Cc: [email protected];
[EMAIL PROTECTED]
Subject: Re: [Sipp-users] Comparing variable values in SIPp

You can't use expansions inside of your regular expression.  The best
bet would be for you to checkout the trunk branch, create a regex to
extract the number, use the assignstr action to store the key (which
shoudl be [key] not [$key]), and then modify the strcmp action code to
accept two variables.

Charles

[EMAIL PROTECTED] wrote on 01/14/2008 08:00:01
AM:

> Hi,
>
> I need to validate the Caller number in SIPp UAS file. The caller
> number to be validated against is passed to SIPp using -key option.
> However, this regexp always fails.
>
> SIPp version 1.1. Please let me know your comments.
>
> thanks,
>
> Shamik
>
> The script looks like -
>
>   <recv request="INVITE" crlf="true" >
>   <action>
>        <ereg regexp=" ([$key]@).*" search_in="hdr" header="To:"
> check_it="true" assign_to="3" />
>     </action>
>   </recv>
>   <send next="2" test="3">
>     <![CDATA[
>
>       SIP/2.0 180 Ringing
>       [last_Via:]
>       [last_From:]
>       [last_To:];tag=[pid]SIPpTag01[call_number]
>       [last_Call-ID:]
> ....
>
> Output --> Failed regexp match: looking in ' sip:[EMAIL PROTECTED]:
> 5060', with regexp '([$key]@).*'.
>
------------------------------------------------------------------------
-
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for just about anything
> Open Source.
>
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
lace
> _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to