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
sipp.2006-11-08.chance.diff
Description: sipp.2006-11-08.chance.diff
------------------------------------------------------------------------- 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
