Hello all !
Is there anyway to run an AGI script (or dialplan extension) when asterisk starts ?
Any help appreciated …
Noel
Hello all !
Is there anyway to run an AGI script (or dialplan extension) when asterisk starts ?
Any help appreciated …
Noel
One method is the following ( I use it inside the /etc/init.d/ script that starts/stops *):
/usr/sbin/asterisk -rx ‘originate console/dsp extension XXX@offices’
the XXX extension in the offices context gets called every time * is started.
Bye.
Thanks mbruni … very appreciated …
I will give it a try …
Noel
Hello mbruni & others,
Maybe i just don’t get it but …
As far as i can tell “originate” is not an * CLI cmd … ???
It’s a manager cmd … (right ?)
Can you give me a “real life” example of your command ?
Any other suggestion to start an AGI (or call a dialplan context/ext) on asterisk startup ?
Tnx for any suggestion …
Noel
“originate” is an * cli command, just connect to the * cli, write “originate”, press the enter key and * will tell you how to use it.
Bye.
hello mbruni
Ahhh … my mistake … My * is in an embedded system and the
module for the cli originate cmd was not loaded …
I ended up using the “Local” channel as i did not have the chan_oss module loaded. It does the job …
I added :
Sleep 3
/usr/sbin/asterisk -rx ‘originate Local/*15 extension’
In my * startup script (Sleep seemed to be needed)
and the *15 extension of the default context get executed …
which run my agi script …
It work perfectly now !
Tnx again for your help ! Very appreciated
Noel