Hi Marc,

 

I have not looked at the code yet - I will I'm sure because it seems a
useful feature.

 

I would have though that you would probably not want it in combination with
receive optional. The idea of the next in optional is that you go there only
when you get the optional packet - the "normal" flow is in effect to ignore
optional packets (although I think the state machine steps) so I suppose
that is a valid result.

 

You would be better if you wanted a statistical response to an optional
packet to jump out to a 100ms pause and put the chance in that. That way you
get two possible responses.

 

Peter

 

Peter Higginson

Newport Networks Ltd,

Direct line 01494 470694

http://www.newport-networks.com/

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 01 December 2006 10:00
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: [Sipp-users] statistical (conditional) branching

 

Hello all, 

to have sipp behave somewhat more like a "normal" sip client being used by a
human, I added statistical branching in the code.

In more detail: wherever you can have a conditional branch on a variable
being set (test="4"), you can also branch based on a statistical decision
using the attribute "chance" (e.g. chance="0.90"). Chance can have a value
between 0 (never) and 1 (always), "test" and "chance" can be combined, i.e.
only branching when the test succeeds and the chance is good.

With this, you can have a variable reaction in a given scenario (e.g..
answer the call or reject with busy), or run around in a loop (e.g.
registrations) and break out of it after some random number of iterations.

About the code: 

As the feature is very similar to the conditional branch, I added it on the
code wherever conditional branching was handled.

There is one exception to this, where maybe it's not quite ok: in the
receive handling code around lines 2950-2990 in call.cpp, where I couldn't
get any clue on what exactly the goal/usage of that code part was. Maybe the
author of the "test" feature could have a look at that?? Anyhow,  the only
possible problem the strange code part could have, is with optional receives
with a statistical branch in it where the statistical decision would give a
NO answer (everybody is warned by this;-)

Anyhow, it should be working without problems on pause, nop, send and
non-optional receives. 

<<sipp.2006-11-08.chance.diff>> 
Best regards, 
  
   MarcVD 

 

(-: from Marc VAN DIEST (BELGACOM ANS/NTA) +32 2 244 5078 ;-) 

**** DISCLAIMER **** http://www.belgacom.be/maildisclaimer      


---------------
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
---------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to