Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: peterpan746 on June 17, 2008, 01:25:49 AM
-
Hi there,
Hope you can help. I need to find out how to do wake-up calls. I have found a :script: called wakeup.1.31
Here is the instructions:
2008/02/21 - Version 1.31
This code was tested with ASTERISK Rel 1.4.11
1 - Copy the run_wakeups and the wakeup.php files into
the /var/lib/asterisk/agi-bin
make sure the PHP file is executable
2 - Next update your extensions file to include an extension to call
to schedule your wakeup calls.
exten => 77,1,agi,wakeup.php
exten => 77,n,Hangup
3 - Reload your extensions table in asterisk with "dialplan reload" or stop and
start asterisk.
When you call into Extension 77 you should be prompted for all your
wakeup call time. This program uses the standard and additional sound
files. So nothing else should be needed.
This is how I modified (mangled) the extensions.conf file
[extensions]
include => internal-presets
include => parkedcalls
exten => *77,1,agi,wakeup.php
exten => *77,n,Hangup
exten => 101,1,ParkedCall(101)
exten => 101,hint,park:101@parkedcalls
When I did it like the instruction said it didn't work, so I tried with *77, but didn't work either.
This is what I'm getting from a Putty session:
-- Executing [*77*@internal:1] BackGround("SIP/5002-085d6b08", "silence/1") in new stack
-- <SIP/5002-085d6b08> Playing 'silence/1' (language 'en')
-- Executing [*77*@internal:2] AGI("SIP/5002-085d6b08", "selintra|*77*") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
-- AGI Script selintra completed, returning 0
== Auto fallthrough, channel 'SIP/5002-085d6b08' status is 'UNKNOWN'
-- Executing [h@internal:1] Hangup("SIP/5002-085d6b08", "") in new stack
== Spawn extension (internal, h, 1) exited non-zero on 'SIP/5002-085d6b08'
I hope that you can help.
-
You created *77 in extensions but dialled *77* which automatically gets processed by SAIL and ignored. Also, if you hack extensions then it will just get overwritten the next time you do a commit in SAIL. so... do this instead.
Create a custom-app (call it whatever you like and set its span to internal). Paste the original code into it...
exten => 77,1,agi,wakeup.php
exten => 77,n,Hangup
Er.. that's it. dialling 77 will get you to the wake-up app (assuming the app works OK).
Also - you need to be running sail-2.2.1-631 - there was a small bug in custom apps in the low 600 releases.
Let us know how you get on with it.
Kind Regards
-
Thanks for your patience with me. OK, I did like you tol dme too, and now '77' is working but I get the following in Putty:
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File please-try-again does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File please-enter-the does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File time does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File for does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File your does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:602 ast_openstream_full: File wakeup-call does not exist in any format
[Jun 17 18:09:08] WARNING[4646]: file.c:912 ast_streamfile: Unable to open wakeup-call (format 0x4 (ulaw)): No such file or directory
It seems that I don't have all the sound files I need. I'm trying to find a site where I can download the extra files, but no success thus far.
-
Which rpm packages are using for Asterisk? Is it the ATrpms stuff?
-
I just did a fresh install with the sark-sme-7.3-2.2.1-617.iso
So I think I need to update
-
It is working now. For others that might be interested.
This is important:
You need to run dos2unix on the wakeup.php file
You need to have the asterisk extra sound or it will not work.
At first I had problems with getting the actual call, but when I switched to military time it worked great.
Thanks for the help.
-
Well done,
How about publishing where the php app is and maybe a little howto so others might use it if they wish? It looks like a useful little app.
Kind Regards
-
This gets my vote - Programmable wake up calls would be a handy feature.
-
The files can be found here:
http://www.voip-info.org/tiki-index.php?page=Asterisk+tips+Wake-Up+Call+PHP (http://www.voip-info.org/tiki-index.php?page=Asterisk+tips+Wake-Up+Call+PHP)
1. The files (wakeup.php and wakeconfirm.agi) are placed in /var/lib/asterisk/agi-bin
2. Make sure that wakeup.php is executable
3. Run dos2unix on wakeup.php (dos2unix wakeup.php)
4. Make sure that you have the additional asterisk sounds installed (ATrpms have them)
5. Create add-on in server-manager and name it whatever you want and paste these lines in there:
exten => 77,1,agi,wakeup.php
exten => 77,n,Hangup
6. Reload your extensions table in asterisk with "dialplan reload" or stop and
start asterisk.
And that should get the script going. The README file contains most of the information, but if you get stuck I will do my best to help.
-
I've cleaned this up a little and included it into the /docs howtos here...
http://www.selintra.com/docs/cgi-bin/view/Main/DocChapter2519
Kind Regards
S