[Kamailio-Devel] [ openser-Patches-1658042 ] Simple sleep module

SourceForge.net noreply at sourceforge.net
Thu Nov 13 02:31:20 CET 2008


Patches item #1658042, was opened at 2007-02-12 13:55
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1658042&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Carsten Bock (carstenbock)
Assigned to: Henning Westerholt (henningw)
Summary: Simple sleep module

Initial Comment:
Hi Everybody,

I don't know, if i am the only one, who needed this functionality, but however i put together a cery, very small "sleep"-Module, which allows to delay the message processing.
The message provides two functions: sleep(time) and usleep(time), which allows to wait a defined period (seconds or milliseconds) of time.
For testing, we previously used exec_msg("/bin/sleep 1"), but having it in a module with calling the standard-C-functions is the only way, we can use this on our production site.
A little Background: We found a bug with a specific CPE and T.38 Transmissions to a Cisco Gateway. The error occured, if the T.38-re-invite came from the CPE too fast. The CPE manufacturer will fix this issue asap, but until then, we had to introduce a small workaround for this CPE bug by introducing a delay for T.38 re-invites.

Carsten

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-11-13 01:31

Message:
Hi Carsten,
           I am new to use SER and OPENSER, actuall i want to implement a
testbed where the proxy should inject a random delay with different
distributions, I was searching for how to do that and i found this message.
I have tried to compile this module in OPENSIPS 1.4 and also in SER 0.9.6
but it gives me errors:
sleep.c:44: warning: initialization from incompatible pointer type
sleep.c:44: warning: initialization makes pointer from integer without a
cast
sleep.c:44: warning: missing initializer
sleep.c:44: warning: (near initialization for ‘cmds[0].flags’)
sleep.c:45: warning: initialization from incompatible pointer type
sleep.c:45: warning: initialization makes pointer from integer without a
cast
sleep.c:45: warning: missing initializer
sleep.c:45: warning: (near initialization for ‘cmds[1].flags’)
sleep.c:46: warning: missing initializer
sleep.c:46: warning: (near initialization for ‘cmds[2].flags’)
sleep.c:52: warning: initialization makes integer from pointer without a
cast
sleep.c:59: warning: missing initializer
sleep.c:59: warning: (near initialization for ‘exports.init_f’)
sleep.c: In function ‘fixstring2int’:
sleep.c:95: warning: implicit declaration of function ‘LOG’

i am not beginner in programming, but if this module works for me, then i
will modify it to inject random delays.

Can you please advice.


Amar 

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-04-23 11:49

Message:
Logged In: YES 
user_id=337916
Originator: NO

Now in svn, module "cfgutils".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1658042&group_id=139143



More information about the Devel mailing list