Hello Felipe,

Actually I don't know to how compare 2 variables in sipp directly. I think
to the method below:
- Create a temporary file beginning with SEQUENTIAL
- Save these two Call ID in 2 variables and execute an external command in
sort of "test [$var1] [$var2]" and save this result into the temporary file.
So in your file you will have :

SEQUENTIAL
[result of the test]

- After in your xml scenario, you will assign this result value to a
variable such as:
<assign assign_to="res" value="[field0]/>

And you should start your sipp using this temporary csv file with the -inf
option

I don't know if that will work or not. Please tell me the result if you'll
try

BR,
Tuan Viet Nguyen

*De:* Felipe Elias [mailto:[EMAIL PROTECTED]
> *Enviada em:* quinta-feira, 4 de dezembro de 2008 14:16
> *Para:* 'Tuan Viet Nguyen'
> *Assunto:* RES: [Sipp-users] Compare sip headers
>
>
>
> Hi Tuan,
>
>
>
> Here is a part of my code:
>
>
>
>     <recv request="INVITE" start_rtd="true" >
>
>           <action>
>
> *                <assignstr assign_to="var" value="[last_Call-ID:]"/> *
>
>           </action>
>
>    </recv>
>
>
>
>   <send retrans="500">
>
>     <![CDATA[
>
>
>
>       SIP/2.0 300 Multiple Choices
>
>       [last_Via:]
>
>       [last_From:]
>
>       [last_To:];tag=[call_number]
>
>       [last_Call-ID:]
>
>       [last_CSeq:]
>
>       Contact: <sip:[local_ip]:[local_port]>
>
>       Content-Type: application/sdp
>
>       Content-Length: [len]
>
>
>
>       v=0
>
>       o=voicesession 53655765 2353687637 IN IP[local_ip_type] [local_ip]
>
>       s=Voice Session
>
>       c=IN IP[media_ip_type] [media_ip]
>
>       t=0 0
>
>       m=audio [media_port] RTP/AVP 0
>
>       a=rtpmap:0 PCMU/8000
>
>
>
>     ]]>
>
>   </send>
>
>
>
>
>
>   <recv request="ACK" rtd="true" crlf="true">
>
>      <action>
>
> *           <strcmp assign_to="result" variable="var" value="[
> last_Call-ID:]"/>*
>
>            <log message="[$result], [$var], [last_Call-ID:]"/>
>
>      </action>
>
>   </recv>
>
>
>
> I'm trying to compare the first *Call-ID* (in the INVITE msg) I received
> with last Call-ID (in the ACK msg). unfortunately the strcmp only compare
> pure chars (ex. FELIPE) but with chars, numbers and symbol it seems to not
> work. See the log I printed:
>
>
>
> -24.000000, Call-ID: [EMAIL PROTECTED],
> Call-ID: [EMAIL PROTECTED]
>
>
>
>
>
> How can I compare both headers?
>
>
>
> Thanks,
>
>
>
>
>
> *Felipe Gabriel de Mello Elias*
>
> *CITS - Centro Internacional de Tecnologia de Software** *
> Endereço: Rua Carneiro Lobo, 468 - 10 andar - Batel
>
>                     CEP. 80240-240  Curitiba-PR Brasil
>
> Telefone:    +55  (41)  3527-2785 Ramal: 30 -
>
> Celular:       +55  (41)  91416571
>
> Email:           [EMAIL PROTECTED]
>
>
>
>
>
> * *
>
>
>
> *De:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *Em nome de *Tuan
> Viet Nguyen
> *Enviada em:* quinta-feira, 4 de dezembro de 2008 12:44
> *Para:* Felipe Elias
> *Cc:* [email protected]
> *Assunto:* Re: [Sipp-users] Compare sip headers
>
>
>
> Hello,
>
>
> Try this:
>
> <strcmp assign_to="result" variable="message_type" value="INVITE"/>
> <test assign_to="isINVITE" variable="result" compare="equal" value="0"/>
> <test assign_to="isNotINVITE" variable="result" compare="equal"
> value="-1"/>
>
> The strcmp returns 0 if your string matches INVITE and -1 if not. Then you
> can use this result value to be able to apply "test"
>
> BR,
> Tuan Viet NGUYEN
>
> On Thu, Dec 4, 2008 at 2:06 PM, Felipe Elias <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>
>
> I'm a Brazilian engineer working with SIP tests. I'm developing some tests
> for validation of SIP equipments according to the ETSI TS 102 027-2 V4.1.1.
>
> Some tests need to compare one header of the INVITE msg with the same
> header of the response. The problem is that some headers use chars and
> numbers others only chars. I can compare numbers with numbers, but I can't
> compare chars with chars.
>
> I'm trying to use the *test* command but it does not allow to compare one
> variable with another only with values, beside this the *todouble*variable 
> returns an error when I use one header with chars and numbers.
>
>
>
> Does anyone can help me with this problem?
>
>
>
> I appreciate your collaboration, thanks,
>
>
>
> *Felipe Gabriel de Mello Elias*
>
> *CITS - Centro Internacional de Tecnologia de Software *
> Endereço: Rua Carneiro Lobo, 468 - 10 andar - Batel
>
>                     CEP. 80240-240  Curitiba-PR Brasil
>
> Telefone:    +55  (41)  3527-2785 Ramal: 30 -
>
> Celular:       +55  (41)  91416571
>
> Email:           [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
>
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to