
02-20-09, 01:52 PM
|
|
Guru
|
|
Join Date: Nov 2007
Location: South FL, USA
Posts: 436
|
|
|
Voicemail Notification
Yes, one little nudge is all it takes sometimes to push somebody over the edge... so I'll blame/thank Tony (tshif) for his motivation, lol. So for your consideration, I offer the Voicemail Notification Script originally done by BobH.
To Install, type this:
wget http://www.edgeproductions.com/sites/default/files/TheShniz/voip/install-vm_notify
chmod +x ./install-vm_notify
./install-vm_notify
More information may be found here:
http://www.edgeproductions.com/blogs...l-notification
Special Notes:
For the time being, consider this to be beta quality. Tony and I have been testing the script for a while now, but have a couple questions needing answered. With your help, I'd like to pin these down and push it out as its own FreePBX Module.
For comparison sake, you may find the original script (modified for Asterisk 1.4) here:
http://www.edgeproductions.com/sites...fy_custom.conf
A couple questions:
1.) Does your system require the WaitExten statements?
The original script does not contain them, and all of the systems I've tested work just fine with or without them (although they seem to add an unwanted pause). However, Tony's systems have all required them, or he is hung up on.
2.) Are you using SIP, IAX, or Zap Trunks?
I've only used SIP Trunks, and have no problem... Tony has only used IAX Trunks, and has problems with DTMF Recognition when the system calls out. He believes there is an outstanding issue w/ the current release of Asterisk concerning IAX & DTMF.
I appreciate your feedback...
__________________
- J
|
|

02-20-09, 09:40 PM
|
|
Guru
|
|
Join Date: Dec 2007
Location: Shreveport, LA
Posts: 174
|
|
|
Very cool.... Thanks for the contribution. I have tried with both Vitelity and with regular pstn connection. I appear to have some dtmf issues when using vitelity. I have to hit the 1 key a couple of times before it takes... Also the caller id doesn't come across (shows "unavailable") Any ideas on how to set the caller id?
I don't have these issues when using zap, however one item that I do notice is that the message (this-is-the-voice-mail-system) starts playing before I answer my cell phone when going through zap.
|
|

02-27-09, 11:45 AM
|
|
Guru
|
|
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
|
|
|
Feedback Needed
Hi everyone;
Jason and I really need your help. This is a totally cool script, and when its working, it just chugs along and gets the job done. And we have some totally cool plans for it - like making it a actual FreePBX module....
But before we can do that - we need to better understand why it seems to perform differently on different PBXIAF boxes that *seem* to be very similarly configured, and why it fails outright on some. We have spent a *lot* of time on it so far - and well spend more - but here's where you can make a huge difference to the effort.
We need people to test it on a variety of boxes. I wouldnt exactly suggest you put it on a production box at this point - not that we know of any issues it would cause, but because we don't know why it seems to behave inconsistantly from machine to machine.
We need to know:
Do the install script, uninstall script and update script work for you as they are currently written?
Does your machine requires the Waitexten statements (like mine seem to).
We need to know if it delivers its notifications via a SIP trunk, or an IAX2 trunk, and we need know if your box is NAT'ed or not.
Naturally - we'd like to know the version of Asterisk, and FreePBX you are using.
Please consider helping out - installing this on a test box or two, and providing feedback to help us get this cool function released as a FreePBX module.
Thanks for any data you can provide!
- tshif
|
|

03-02-09, 08:06 AM
|
|
Guru
|
|
Join Date: Dec 2007
Location: Shreveport, LA
Posts: 174
|
|
|
Quote:
|
We need to know:
Do the install script, uninstall script and update script work for you as they are currently written?
Does your machine requires the Waitexten statements (like mine seem to).
We need to know if it delivers its notifications via a SIP trunk, or an IAX2 trunk, and we need know if your box is NAT'ed or not.
Naturally - we'd like to know the version of Asterisk, and FreePBX you are using.
Please consider helping out - installing this on a test box or two, and providing feedback to help us get this cool function released as a FreePBX module.
Thanks for any data you can provide!
- tshif
|
1. Install script seems to work fine. Haven't tried to uninstall, or update.
2. Waitexten statements are required otherwise when using *26 I am hung up on when enabling or disabling. I tried it without but that resulted in being hung up on.
3. I have now used SIP, IAX, and Zap for delivery. I have no problem with dtmf tones on my IAX (voip.ms with ulaw) or ZAP trunks.
|
Code:
|
PBX in a Flash Version 1.2 Daemon Status
********************************************************************
* Asterisk * ONLINE * Zaptel * ONLINE * MySQL * ONLINE *
* SSH * ONLINE * Apache * ONLINE * Iptables * ONLINE *
* Fail2ban * ONLINE * IP Connect* ONLINE * Ip6tables * ONLINE *
* BlueTooth * ONLINE * Hidd * ONLINE * NTPD * ONLINE *
* Sendmail * ONLINE * Samba * OFFLINE * Webmin * ONLINE *
* Ethernet0 * ONLINE * Ethernet1 * N/A * Wlan0 * N/A *
********************************************************************
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version : 1.4.21.2
* Zaptel Source Version : 1.4.12.1
* Libpri Source Version : 1.4.7
* Addons Source Version : 1.4.7
********************************************************************
on 10.0.0.8 - eth0
CentOS release 5.2 (Final) :32 Bit Kernel: 2.6.18-92.1.6.el5 |
FreePBX version is 2.5.1.1
Connection is NAT'd behind Endian Firewall
I'd prefer to use the script with my voip trunks but people tend to not answer there phone whenever the caller id says "UNAVAILABLE". It would be nice if it used the outbound caller ID settings that you have set in FreePBX on the SIP or IAX trunks. (I'm not that much of a dial plan wizard to figure out what needs to be added).
|
|

03-02-09, 08:24 AM
|
|
Guru
|
|
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
|
|
|
THANK YOU THANK YOU THANK YOU!
Excellent detail - and very helpful.
Can anyone else help out with some test results?
tshif
|
|

03-02-09, 09:48 AM
|
|
Guru
|
|
Join Date: Nov 2007
Location: South FL, USA
Posts: 436
|
|
One of the goals in making the script into a module for FreePBX, is to enable it to use Outbound Routes (among other things)... but one step at a time, right now we need to ensure basic functionality
The reason why I've posted the original script as well is to see if you *still* require the WaitExten statements in the original (as they were never present). Also for those testing SIP, it would also be nice to know if you've applied the SIP DTMF Patch (to which I have not myself).
Thanx for the great feedback!?!?!?!
__________________
- J
|
|

03-02-09, 06:36 PM
|
|
Senior Member
|
|
Join Date: Oct 2007
Posts: 154
|
|
I installed on my home system and all works well,  the only change i made was the line 81 outgoing route which i set to IAX2/voipms I would also like to see some kind of cid on this call to my cell, I will try next week with the new piaf 1.4 on a test box.
PBX in a Flash Version 1.3 Daemon Status
************************************************** ******************
* Asterisk * ONLINE * Zaptel * ONLINE * MySQL * ONLINE *
* SSH * ONLINE * Apache * ONLINE * Iptables * ONLINE *
* Fail2ban * ONLINE * IP Connect* ONLINE * Ip6tables * ONLINE *
* BlueTooth * ONLINE * Hidd * ONLINE * NTPD * ONLINE *
* Sendmail * ONLINE * Samba * OFFLINE * Webmin * ONLINE *
* Ethernet0 * ONLINE * Ethernet1 * N/A * Wlan0 * N/A *
************************************************** ******************
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version : 1.4.21.2
* Zaptel Source Version : 1.4.12.1
* Libpri Source Version : 1.4.7
* Addons Source Version : 1.4.7
************************************************** ******************
on 192.168.0.150 - eth0
CentOS release 5.2 (Final) :32 Bit Kernel: 2.6.18-92.1.6.el5
Gary
|
|

03-02-09, 06:42 PM
|
|
Guru
|
|
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
|
|
|
Thank you Gary!
Can you tell us specifically two more things.
1. does your system require the Waitexten() lines in the dial plan?
2. Did you experience any DTMF issues when receiving the outbound notification call? Was the destination a Voip, Landline, or cell phone?
Thanks again -
Tony
|
|

03-06-09, 02:11 PM
|
|
Guru
|
|
Join Date: Oct 2007
Posts: 83
|
|
|
I had setup the VM Notifier to call my voicemail in case someone leaves a message behind over a week ago.. today was the first time I actually got a call from one of my trunks on my cellphone, I was busy so just disconnected the call.
After that, the PiaF box stopped working (I only found out whne I called home and couldn't get thru), so called my wife on her cellphone and she confirmed all the extensions were dead.
When I got home about 4-5 hours after that call, found the server locked, rebooted, had a look at the log file, and it turned out "full" had grown to 1.5 Gigabytes, in comparison, full.1, full.2 etc are approx. 2 megabytes.
Looking into the log files (had to download a large text file viewer to open the file on my windows desktop), saw lots (LOTS) of the following recurring lines:
Could it be the VMNotify application went into an infinite loop?..
Thanks.
Riz
[code]
[2009-03-06 11:08:49] VERBOSE[12525] logger.c: -- <SIP/8123457-b7c67bd8> Playing 'digits/0' (language 'en')
[2009-03-06 11:08:50] VERBOSE[12525] logger.c: -- <SIP/8123457-b7c67bd8> Playing 'vm-isunavail' (language 'en')
[2009-03-06 11:08:51] VERBOSE[12525] logger.c: -- <SIP/8123457-b7c67bd8> Playing 'vm-intro' (language 'en')
[2009-03-06 11:08:57] VERBOSE[12525] logger.c: -- <SIP/8123457-b7c67bd8> Playing 'beep' (language 'en')
[2009-03-06 11:08:57] VERBOSE[12525] logger.c: -- Recording the message
[2009-03-06 11:08:57] VERBOSE[12525] logger.c: -- x=0, open writing: /var/spool/asterisk/voicemail/default/500/tmp/ilJjaJ format: wav49, 0x855dbe8
[2009-03-06 11:08:57] VERBOSE[12525] logger.c: -- x=1, open writing: /var/spool/asterisk/voicemail/default/500/tmp/ilJjaJ format: wav, 0x8544da0
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- User hung up
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: == Spawn extension (macro-vm, s-NOANSWER, 2) exited non-zero on 'SIP/8123457-b7c67bd8' in macro 'vm'
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: == Spawn extension (macro-vm, s-NOANSWER, 2) exited non-zero on 'SIP/8123457-b7c67bd8'
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [h@macro-vm:1] Macro("SIP/8123457-b7c67bd8", "vm-notify|500") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: vmnotify/500 not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm-notify:1] Set("SIP/8123457-b7c67bd8", "phonenumber=") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: Set
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm-notify:2] GotoIf("SIP/8123457-b7c67bd8", "1?0:10") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm-notify,s,0)
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: Gotoif
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:2] Set("SIP/8123457-b7c67bd8", "VMGAIN=""") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: BLKVM/100/SIP/8123457-b7c67bd8 not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?vmx|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:1] GotoIf("SIP/8123457-b7c67bd8", "0?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:2] Set("SIP/8123457-b7c67bd8", "MODE=unavail") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?notdirect") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,5)
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:5] NoOp("SIP/8123457-b7c67bd8", "Checking if ext 500 is enabled: ") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:6] GotoIf("SIP/8123457-b7c67bd8", "1?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,s-NOANSWER,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s-NOANSWER@macro-vm:1] Macro("SIP/8123457-b7c67bd8", "get-vmcontext|500") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:1] Set("SIP/8123457-b7c67bd8", "VMCONTEXT=default") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: Set
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/8123457-b7c67bd8", "0?200:300") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-get-vmcontext,s,300)
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: GotoIf
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:300] NoOp("SIP/8123457-b7c67bd8", "") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: NoOp
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:2] Set("SIP/8123457-b7c67bd8", "VMGAIN=""") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: BLKVM/100/SIP/8123457-b7c67bd8 not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?vmx|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:1] GotoIf("SIP/8123457-b7c67bd8", "0?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:2] Set("SIP/8123457-b7c67bd8", "MODE=unavail") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?notdirect") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,5)
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:5] NoOp("SIP/8123457-b7c67bd8", "Checking if ext 500 is enabled: ") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:6] GotoIf("SIP/8123457-b7c67bd8", "1?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,s-NOANSWER,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s-NOANSWER@macro-vm:1] Macro("SIP/8123457-b7c67bd8", "get-vmcontext|500") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:1] Set("SIP/8123457-b7c67bd8", "VMCONTEXT=default") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: Set
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/8123457-b7c67bd8", "0?200:300") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-get-vmcontext,s,300)
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: GotoIf
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:300] NoOp("SIP/8123457-b7c67bd8", "") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: NoOp
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:2] Set("SIP/8123457-b7c67bd8", "VMGAIN=""") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: BLKVM/100/SIP/8123457-b7c67bd8 not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?vmx|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:1] GotoIf("SIP/8123457-b7c67bd8", "0?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:2] Set("SIP/8123457-b7c67bd8", "MODE=unavail") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:3] GotoIf("SIP/8123457-b7c67bd8", "1?notdirect") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,vmx,5)
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:5] NoOp("SIP/8123457-b7c67bd8", "Checking if ext 500 is enabled: ") in new stack
[2009-03-06 11:09:18] DEBUG[12525] func_db.c: DB: AMPUSER/500/vmx/unavail/state not found in database.
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [vmx@macro-vm:6] GotoIf("SIP/8123457-b7c67bd8", "1?s-NOANSWER|1") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Goto (macro-vm,s-NOANSWER,1)
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s-NOANSWER@macro-vm:1] Macro("SIP/8123457-b7c67bd8", "get-vmcontext|500") in new stack
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:1] Set("SIP/8123457-b7c67bd8", "VMCONTEXT=default") in new stack
[2009-03-06 11:09:18] DEBUG[12525] app_macro.c: Executed application: Set
[2009-03-06 11:09:18] VERBOSE[12525] logger.c: -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/8123457-b7c67bd8", "0?200:300") in new stack
|
|

03-06-09, 02:41 PM
|
|
Guru
|
|
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
|
|
This is a symptom we have seen before - not in THIS version of the script and dial plan. In fact, thats what the new version is designed to fix.
Please verify - you get this result when using the NEW script provided in the first thread of this fourm, and not the script and dial plans from the original script link.
If you are using the new one as provided, try running the update script for VMnotify. This script should update the VM context for its use - which is how we get into these terrible loops.
Please - let us know when you have a moment - if you are using the current version - this should not be happening to you.
Tony
Last edited by tshif : 03-07-09 at 02:56 PM.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:58 PM.
|
|