Peter, This is working great. Thanks.
Peter Higginson wrote: > > > In the routine add_call() in call.cpp there is a switch statement. Add your > own option to the list, for example: > > > > case 'r': > > count += snprintf(&call_id[count], > MAX_HEADER_LEN-count-1,"%u", (unsigned)rand()); > > break; > > > > Would add %r to the functionality as a random number. It is a bit early to > look at the packet you are about to send, since we are setting up the class > at this point. However anything you are going to send is in theory available > because it is going to be based on other things. Substitute your function of > choice for rand() in my example or add some more - only the letters u, p and > s are currently used. If you want something a bit more cryptic use "%x" > instead of "%u" or use "%04x" etc. > > > > Remember to make the complete Call-ID string (passed in the command line) > include the pid - so you get different Cal-ID on each run. Note there is > bound to be some trade off between Call-ID length and performance - the max > size used to be smaller but it looks like 2K characters now. > > > > Have fun, > > Peter > > > > Peter Higginson > > Newport Networks Ltd, > > http://www.newport-networks.com/ > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of William Quan > Sent: 17 September 2007 21:27 > To: [email protected] > Subject: [Sipp-users] generating a random callid > > > > Hi all, > > I am new to SIPp, and I am wondering if there is a way to make the > > call-id values more random. > > Right now they appear sequential (or sorted) when using [call-id], which > > tends to throw off my btree index in my DB. > > > > Maybe md5 hash the current time and the from tag and to? > > Any tips for a beginner to do this ? > > > > Thanks, > > Will > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Sipp-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sipp-users > > > > > --------------------------------------------------------------------------------------------- > 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. > --------------------------------------------------------------------------------------------- > Newport Networks Limited is registered in England. Registration number > 4067591. > Registered office: 6 St. Andrew Street, London EC4A 3LX > --------------------------------------------------------------------------------------------- > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users
