login | register
Sat 17 of May, 2008 [08:57 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.41s
  • Memory usage: 2.25MB
  • Database queries: 36
  • GZIP: Disabled
  • Server load: 1.10

Asterisk tips Wake-Up Call PHP

Set a Wake Up call
Updated 2008-Feb-21 Andy Wysocki awysocki -at- absoftware dot_here com

  • WakeUp Call program set the time up to 23:59 minutes in the future
  • Lots of error checking to make sure its done correctly
  • Some fun prompts if the user pressed the wrong DTMFs
  • allow DTMF'ing over the prompts, to speed up the process
  • Allow for # key option when entering time. ie: 700# or 0700 both now work
  • Tested with Asterisk 1.4.18
  • Some of the FXO FXS devices use *77 to block the last caller ID so you may need to change the example extension number
  • Option to prompt for AM/PM all the time or Military time and not prompt, or the mixed mode.

NOTE: It was suggested that the TOUCH and MOVE command in the PHP script be swapped. So the move is done first then the touch. This might work some of the time but there is a chance that Asterisk will pick up the CALL FILE before the touch command can be run on it. The betst way to do is to have the TMP directory be on the same physical drive as the Asterisk OUTGOING directory. This way when the move command is run it just moves the pointer and the file date and time stay the same. If the tmp directory is on a different physical drive then the file is copied and the date and time stamp are updated, asterisk could grab the file before touch is called.

I made a tar file http://qod.com/wakeup.1.31.tar

Ver 1.31 ->

Go Back to: Asterisk tips and tricks - Asterisk AGI


Here is the README from the TAR file:

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.


(Extra Credit:)

If you want your wakeup calls to annoy you where you can not go back to sleep until you answer a match question. Jon Radon gave me this PERL script you can use to have it quiz you with a match question to make sure you are awake.

Just uncomment the parm_application and parm_data lines for wakeconfirm.agi



Make sure you have the AGI.pm file loaded. I got a copy from http://asterisk.gnuinter.net/


CHANGES:
1.31 - Feb 21, 2008
Fixed a bug where if using the $parm_short_entry set on. Depending on where you key the values in, if after the
last prompt or break though the prompts, and the input would time out, the code worked differenty. After the
prompts the input would be considered valid, if during the prompts, the input would be considered invalid.
Now on any timeout, the input is considered invalid.

1.30 - Nov 5, 2007
Added new option to allow input time current way, Military, or always prompt. See the $parm_prompt_ampm=0,
0 current method, if after 13:00 won't prompt for am/pm (mixed mode)
1 military time never prompt for am/pm (mil mode)
2 always prompt for am/pm and only accept to 1259 for time (am/pm mode)


1.21 - Nov 1, 2007
- Changed the split channel again, this will now allow for IAX2 type channels

1.20
- Changed the way the channel name is split, now will correctly split a SIP name if you have other than numbers in the name
- Added an option to allow for entry of 3 digit times. So you can enter 700# to mean 7:00 instead of having to enter 0700

If you have questions or find bugs, let me know

awysocki (a) absoftware dot .com



I've removed the code, it was just too much work to format it for the wiki pages, Just download the TAR file and reference it.

~~
FAQ
~~

"Q1 - I call in and don't hear anything"

A1 - There can be lots of issues here, Check that the PHP script in the cgi-bin directory has the execute bit on. check that the php file is formatted for unix. (use dos2unix command) check that you have both the standard and extra sound files installed, and last, turn on the parm_debug option and look at the log file created by the PHP file. It should help you out, if its not created then check with Asterisk as to why it may not be calling the script

"Q2 - As soon as I enter my time, the system calls the phone back and not at the time in the future"

A2 - This most likely is because your TMP directory is on a different physical disk in the system. Make a tmp directory just above the OUTGOING directory in asterisk and use that , so when the MV command is used the date and time of the file won't be changed

"Q3 - I see the call file and everything is working, but when the time is reached Asterisk doesn't call the phone and there are errors in the Asterisk log file"

A3 - Check if you are using caller ID or Channel format. If using caller ID try setting the $parm_chan_ext = 1; in the PHP file. This will use the channel, This method one works when calling the extensions connected to this asterisk. It will not work for calling off the system like to your cell/mobile phone. This may be a feature you really want.

Any other problems e-mail me and as time permits I will help you out


See Also:
Asterisk tips Weather PHP - Asterisk tips Airport Weather PHP
Asterisk tips Wake-Up Call PHP with Snooze/Annoy
Created by awysocki, Last modification by awysocki on Thu 21 of Feb, 2008 [19:35 UTC]

Comments Filter

Re:

by Shane Steinbeck on Wednesday 05 of September, 2007 [00:39:05 UTC]
I had that error with a bash script being called. It turned out to be Windows linefeeds in the script. A quick search and replace in my text editor fixed it nicely.

No such file or directory; missing interpreter

by Hans Feringa on Thursday 16 of August, 2007 [14:20:18 UTC]
Do you have the PHP CLI program installed at /usr/bin? When the interpreter at the shebang line is not there, you will get this message.

by Hans Feringa on Thursday 16 of August, 2007 [14:19:34 UTC]

by Nektarios Sourligas on Wednesday 15 of August, 2007 [19:09:59 UTC]
Hello .

Searching the site for Asterisk application found this one .
I followed the instructions and made an extension , when a dial this e extension the next message appears on Asterisk console

   — Executing 123@HomePBX:1 AGI("SIP/110-081e2110", "wakeup.php") in new stack
   — Launched AGI Script /var/lib/asterisk/agi-bin/wakeup.php
 ==  wakeup.php: Failed to execute '/var/lib/asterisk/agi-bin/wakeup.php': No such file or directory
   — AGI Script wakeup.php completed, returning 0
   — Executing 123@HomePBX:2 Hangup("SIP/110-081e2110", "") in new stack
 == Spawn extension (HomePBX, 123, 2) exited non-zero on 'SIP/110-081e2110'

I looked in /var/lib/asterisk/agi-bin/ and the wakeup.php is there .

What did I make wrong ?

Thank you .

by Douglas Gordillo on Tuesday 10 of July, 2007 [03:50:36 UTC]

Different Time Zones

by Douglas Gordillo on Monday 09 of July, 2007 [22:59:19 UTC]
Is there any way to have different time zones for people in different countries?

-Douglas

Touch command should take place after rename()

by Tom Lynn on Sunday 19 of November, 2006 [00:50:40 UTC]
The script, as written, will lose the updated time stamp from touch() because the callfile gets renamed after touch(). Move the touch() function call after rename() and rewrite it as: touch( $callfile, $time_wakeup, $time_wakeup );

This will fix the problem with the call file executing before you even hang up your call to request the wake-up call.
- Tom

The application "PlayBack" just plays english

by ibc on Thursday 14 of September, 2006 [12:03:38 UTC]
In "wakeip.php" I've set:

   $parm_application = 'PlayBack';
   $parm_data = 'wakeup-call';

I set a wakeup for a terminal with "es" language, and of course I have the Spanish language working in Asterisk.
But the "wakeup" always sounds in English. ¿?

by vincent on Thursday 07 of September, 2006 [01:34:16 UTC]
I tried creating a outgoing call file manually but the call was made immediately when i moved the file to outgoing folder despite the time scheduled later. And the file gets deleted even if i never answer the call.

Re: How to set wake up without cron

by chandave on Tuesday 05 of September, 2006 [19:21:11 UTC]
Asterisk checks the timestamp on the call file. If it is in the future, then it will wait until then to execute the call file.

See ya...

d.c.

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver