I am looking for a way to dial an extension that will trigger a script to run that will call all SIP phones and play a prerecorded message. I would like the script to be able to run even if the phone that triggered the event hangs up. Any help would be great as I haven’t gotten into scripting yet.
you might want to start here…
This page tells you how to start dialing out to sip clients and put them to an extension.
(Also if you want for the script to run AFTER hang up, you might want to look at DEADAGI )
Hope this helps.
I almost have my script working, but I am having some problems. I want the script to run a macro but it isn’t running it below is the script I am working with. I have the macro-bell context in the extensions.conf
$AGI = new Asterisk::AGI;
Am I way off with this. Anyone with any ideas would be great since I lost as to what to do.
Hi let’s try doing this again
I sent the page to guide you in dialing out. To dial out you just create a text file into var/spool/asterisk/outgoing with extension call.
This file will command asterisk to call user1 and place him on context: playsound, extension 1 and priority 1.
You want a phone call to initiate the whole process. You may use asterisk’s SYSTEM function to create text files.
exten => 1,1,System(echo -e “‘write a file’” >> /home/somefile.txt)
Hope this helps you !
great I got the auto dial part working creating a test.call file by hand. Now you had something that said I could call an extension and that would create the file for me using the system command. how can I have that create the test.call file. I can get it to write 1 line to the file but no more then that.