Hi everyone,
Sorry if this mail is a repost, but I can't figure out if my first mail
went through, because I have first been registered now.
I have an issue which I can't fix myself.
I want to use a command line argument variable in a different file than
asterisk.c. I know it can be realized using the "extern" keyword. The
command line argument handling works just fine. But at the moment a SIP
message gets into the system and the line, where the variable is used, get
executed, the system remains silent. This is the code:
*asterisk.c*
#include "asterisk/chan_sip.h"
int VAR = 0;
[parsing of command line arguments and set VAR to value]
printf("%d\n", VAR); <== correct output
*chan_sip.h*
extern int VAR;
*chan_sip.c*
#include "asterisk/chan_sip.h"
extern int VAR;
printf("%d\n", VAR); <== system prints nothing
I actually do not want to pass the variable as a function argument.
Can you spot any mistakes? Thank you in advance!
Regards,
Juliannn
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev