Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else Variable Testing

2008-11-04 Thread [EMAIL PROTECTED]

David Adams wrote:


Hi,

I'm trying to build error-handling into a scenario with 
conditional-branching and variable testing.  With the latest stable 
version of SIPP, I know I have the ability to use regexp to populate 
variables, and then in some actions such as send / receive I can 
test a variable and jump to a label* after* the send or receive 
action has been executed.


What I'd like to be able to do is setup a variable, then based on 
whether the variable is set or not, then go to a different place in my 
scenario file.


So far I have not been able to figure how to do this, if it's even 
possible.  SIPP seems to support the Else part of the If-Then-Else 
with the variable testing and next arguments as part of send and 
receive operations. 


1.  Is there a way to do this in SIPP3.x?   If not,

2.  Could you direct me to the most logical place in the code that I 
would need to modify to build this feature?


Thanks,

Dave Adams.



Hello Adams,

Yes you can build error handling.

Personally, I use the next statement of the receive, + regexp. I do not 
need 'else'


There is also a special tag for unexpected message catch + return jump.
Please look at conditional testing in the SIP unstable version 
documentation.


The difficult part is to build regexp; remind that the matching is 
GLOBAL ( multiline) not , by line !! So you must be prepare to match \r\n !
I always put a actionlog just after my regexp to check them ! There 
is no good trace for now in that area.


Hope that help
Francois


Example: testing against content of a key
nop
 action
   assignstr assign_to=8 value=[imediaDirection] /
   test assign_to=9 variable=8 compare=equal value=1/
 /action
/nop

example RTP param extract
nop next=1 test=9   
/nop

   recv response=200
   !-- wait response, and extract RTP port --
 action
 !-- get the audio rtp port and IP to send to --   
   ereg regexp=IP4 ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) 
search_in=msg assign_to=0,10/
   ereg regexp=m=audio ([0-9]+) RTP search_in=msg 
assign_to=0,11/

 /action
   /recv



-
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=100url=/___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users


Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else Variable Testing

2008-11-04 Thread Peter Higginson

 
I'm not actively using SIPP since I left Newport Networks but I thought you 
could add branches to PAUSE statements - I'm sure I used to do that. You could 
also try NOP (but that was post the version I was using).
 
Peter



Date: Tue, 4 Nov 2008 09:00:03 +0100From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: 
[EMAIL PROTECTED]: Re: [Sipp-users] SIPP Conditional Branching with 
If-Then-Else Variable TestingDavid Adams wrote: 

Hi, 
I'm trying to build error-handling into a scenario with conditional-branching 
and variable testing.  With the latest stable version of SIPP, I know I have 
the ability to use regexp to populate variables, and then in some actions such 
as send / receive I can test a variable and jump to a label after the 
send or receive action has been executed.
What I'd like to be able to do is setup a variable, then based on whether the 
variable is set or not, then go to a different place in my scenario file.
So far I have not been able to figure how to do this, if it's even possible.  
SIPP seems to support the Else part of the If-Then-Else with the variable 
testing and next arguments as part of send and receive operations.  
1.  Is there a way to do this in SIPP3.x?   If not, 
2.  Could you direct me to the most logical place in the code that I would need 
to modify to build this feature? 
Thanks, 
Dave Adams. Hello Adams, Yes you can build error handling.Personally, I use the 
next statement of the receive, + regexp. I do not need 'else'There is also a 
special tag for unexpected message catch + return jump.Please look at 
conditional testing in the SIP unstable version documentation.The difficult 
part is to build regexp; remind that the matching is GLOBAL ( multiline) not , 
by line !! So you must be prepare to match \r\n !I always put a actionlog 
just after my regexp to check them ! There is no good trace for now in that 
area.Hope that help FrancoisExample: testing against content of a keynop  
actionassignstr assign_to=8 value=[imediaDirection] /test 
assign_to=9 variable=8 compare=equal value=1/  /action/nopexample 
RTP param extractnop next=1 test=9/noprecv response=200 
!-- wait response, and extract RTP port --  action   !-- get the 
audio rtp port and IP to send to --ereg regexp=IP4 
([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) search_in=msg assign_to=0,10/
ereg regexp=m=audio ([0-9]+) RTP search_in=msg assign_to=0,11/  
/action/recv
_
Win £1000 John Lewis shopping sprees with BigSnapSearch.com
http://clk.atdmt.com/UKM/go/117442309/direct/01/-
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=100url=/___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users


Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else Variable Testing

2008-11-04 Thread Charles P Wright
David,

If you get a recent trunk, you can use text names for labels and 
variables.  I think you can even do it in 3.1.

Charles




David Adams [EMAIL PROTECTED] 
11/04/2008 08:12 AM

To
Charles P Wright/Watson/[EMAIL PROTECTED]
cc
sipp-users@lists.sourceforge.net
Subject
RE: [Sipp-users] SIPP Conditional Branching with If-Then-Else Variable 
Testing






AWESOME!  I had no idea that I could do the variable testing in a nop.
This approach is working for me, however, I guess in the version that I
have I must use integer labels instead of text ones, unless the example
you provided was just to show me how to get an implementation of
if-then-else with next  test.

Thanks very much Charles!

Dave Adams.

This email message and any attachments may be confidential and/or
privileged to Nortel.  If the reader of this message is not the intended
recipient, you are hereby notified that any use, disclosure,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify us
immediately by replying to this message or by calling the sender and
then destroying all copies of the message and any attachments.

-Original Message-
From: Charles P Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 03, 2008 2:41 PM
To: Adams, David (CAR:3P33)
Cc: sipp-users@lists.sourceforge.net
Subject: Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else
Variable Testing

if you set the variable you can do something like:

nop next=ifclause test=variable /
!-- else cluase stuff goes here --
nop next=endif /
!-- if clause stuff goes here --
label id=endif /

Charles

David Adams [EMAIL PROTECTED] wrote on 11/03/2008 12:41:41 PM:

 Hi,
 I'm trying to build error-handling into a scenario with conditional- 
 branching and variable testing.  With the latest stable version of 
 SIPP, I know I have the ability to use regexp to populate variables, 
 and then in some actions such as send / receive I can test a 
 variable and jump to a label after the send or receive action has 
 been executed.
 What I'd like to be able to do is setup a variable, then based on 
 whether the variable is set or not, then go to a different place in my

 scenario file.
 So far I have not been able to figure how to do this, if it's even 
 possible.  SIPP seems to support the Else part of the If-Then-Else 
 with the variable testing and next arguments as part of send and 
 receive operations.
 1.  Is there a way to do this in SIPP3.x?   If not, 
 2.  Could you direct me to the most logical place in the code that I 
 would need to modify to build this feature?
 Thanks,
 Dave Adams. 
 

-
 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=100url=/
 ___
 Sipp-users mailing list
 Sipp-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sipp-users




-
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=100url=/
___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users


Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else Variable Testing

2008-11-04 Thread David Adams
Thanks guys!
 
Those are both useful suggestions as well.  I'm building a
multi-simulator extended 3PCC model with some funky error paths.  I
think I have a powerful arsenal of techniques now to finish building my
scenario error-handling.  
 
thanks again,
 
Dave Adams.


This email message and any attachments may be confidential and/or
privileged to Nortel.  If the reader of this message is not the intended
recipient, you are hereby notified that any use, disclosure,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify us
immediately by replying to this message or by calling the sender and
then destroying all copies of the message and any attachments.

 



From: Peter Higginson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2008 4:43 AM
To: [EMAIL PROTECTED]; sipp_users
Cc: Adams, David (CAR:3P33)
Subject: RE: [Sipp-users] SIPP Conditional Branching with If-Then-Else
Variable Testing


 
I'm not actively using SIPP since I left Newport Networks but I thought
you could add branches to PAUSE statements - I'm sure I used to do that.
You could also try NOP (but that was post the version I was using).
 
Peter





Date: Tue, 4 Nov 2008 09:00:03 +0100
From: [EMAIL PROTECTED]
To: sipp-users@lists.sourceforge.net
CC: [EMAIL PROTECTED]
Subject: Re: [Sipp-users] SIPP Conditional Branching with If-Then-Else
Variable Testing

David Adams wrote: 


Hi, 
I'm trying to build error-handling into a scenario with
conditional-branching and variable testing.  With the latest stable
version of SIPP, I know I have the ability to use regexp to populate
variables, and then in some actions such as send / receive I can
test a variable and jump to a label after the send or receive action
has been executed.
What I'd like to be able to do is setup a variable, then based
on whether the variable is set or not, then go to a different place in
my scenario file.
So far I have not been able to figure how to do this, if it's
even possible.  SIPP seems to support the Else part of the
If-Then-Else with the variable testing and next arguments as part of
send and receive operations.  
1.  Is there a way to do this in SIPP3.x?   If not, 
2.  Could you direct me to the most logical place in the code
that I would need to modify to build this feature? 
Thanks, 
Dave Adams. 



Hello Adams, 

Yes you can build error handling.

Personally, I use the next statement of the receive, + regexp. I do not
need 'else'

There is also a special tag for unexpected message catch + return jump.
Please look at conditional testing in the SIP unstable version
documentation.

The difficult part is to build regexp; remind that the matching is
GLOBAL ( multiline) not , by line !! So you must be prepare to match
\r\n !
I always put a actionlog just after my regexp to check them ! There
is no good trace for now in that area.

Hope that help 
Francois


Example: testing against content of a key
nop
  action
assignstr assign_to=8 value=[imediaDirection] /
test assign_to=9 variable=8 compare=equal value=1/
  /action
/nop

example RTP param extract
nop next=1 test=9
/nop
recv response=200 
!-- wait response, and extract RTP port --
  action 
  !-- get the audio rtp port and IP to send to --
ereg regexp=IP4 ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)
search_in=msg assign_to=0,10/
ereg regexp=m=audio ([0-9]+) RTP search_in=msg
assign_to=0,11/
  /action
/recv







Get the best wallpapers on the Web - FREE. Click here!
http://wallpapers.msn.com/?ocid=[B001MSN42A0716B]  
-
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=100url=/___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users