1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.

Voicemail Notification

Discussion in 'Add-On Install Instructions' started by TheShniz, Feb 20, 2009.

  1. TheShniz Guru

    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/voip-voicemail-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/default/files/TheShniz/voip/vm_notify_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...
  2. euser4life Guru

    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.
  3. tshif Guru

    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
  4. euser4life Guru

    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).
  5. tshif Guru

    THANK YOU THANK YOU THANK YOU!

    Excellent detail - and very helpful.

    Can anyone else help out with some test results?

    tshif
  6. TheShniz Guru

    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!?!?!?!
  7. ou812 Guru

    I installed on my home system and all works well, :smile5: 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
  8. tshif Guru

    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
  9. RizSher Guru

    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
  10. tshif Guru

    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. :eek6:

    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
  11. RizSher Guru

    TShif,

    I can't really recall which script I followed ... I can paste any section of the relevant files if that would help you.

    Riz
  12. jpe Member

    I just installed it and seem to have gotten the loop thing. I am just reading this post regarding the update script. I am using the install script in the OP. I have to move onto something else, when I get back to this later I will try the update script mentioned.

    * 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.9
    * Addons Source Version : 1.4.7
    ********************************************************************
    bite on 192.168.1.101 - eth0
    CentOS release 5.2 (Final) :32 Bit Kernel: 2.6.18-92.1.22.el5
  13. tshif Guru

    Well - thats not a good thing. I think TheShniz is swamped with work right now - lets give him a couple days to respond and see what he thinks. I'm afraid I'm more the Module guy, where he is the Script King.

    -tshif
  14. tbooth Guru

    great job J. Thanks!
  15. TheShniz Guru

    The only thing worse than having too many installs at one time, is when someone calls you for a 'suprise install' on top of it... sorry guys, to say I've been swamped would be an understatment. I've still got some fallout aka mop up to do still, but sanity is beginning to return. Am now getting caught up w/ email/boards.

    Now.......................

    First, some clarification
    (this is all covered on my site in OP):

    install-vm_notify

    install-vm_notify's job is to 1.) download the latest 'package', which includes the latest 'install script' aka vm_notify_install.sh and 2.) then launch that install script. Therefore, the sole purpose of this file is to download the file (whether on the internet or lan, see file for details).

    vm_notify_install.sh

    vm_notify_install.sh's job is to create the environment for the script (which runs external in its own .conf file). It sets permissions, creates a log, and more importantly inserts the include statements into extensions_custom.conf. Once the 'environment' is set, it launches vm_notify_check.sh to actually build the script.

    vm_notify_check.sh

    This actually went through a couple changes while we were testing before the original post, and this is where the 'heavy lifting' is done. Ultimately, this will 1.) 'extract' [macro-vm] from the original extensions.conf , 2.) 'extract' [macro-vm] from the vm_notify script, 3.) compare the two to see if there are any changes, and 4.) rebuild the script to include the latest [macro-vm] if there are any changes. In the event of initial install, it will essentially detect an empty script and build it. Now, the way the script is actually built, is it 1.) takes vm_notify_header.dat (the actual script), tacks on the current [macro-vm] detected earlier, and follows up with vm_notify_footer.dat.

    Wrap-Up

    Essentially, running install-vm_notify automatically calls vm_notify_install.sh & vm_notify_check.sh for you. If you ever update FreePBX, and they change [macro-vm], all you need to run is vm_notify_check.sh to update the script. Therefore, if you do not update FreePBX (as is the case w/ a new install), you do NOT need to manually run vm_notify_check.sh, as it has already been run for you. If you no longer want the script on the machine at all, just run vm_notify_uninstall.sh and it will remove any trace.
  16. TheShniz Guru

    So how can you help?

    Well, your feedback is important...
    1.) Does it work, does it not work for you?
    2.) If not, what symptoms are you experiencing?
    3.) Describe your environment (ver of PiaF/etc), trunks/providers used, and anything out of the ordinary.

    This is all elementary to what we're looking for, and will provide clues on how to best fit it for all systems (not just my configuration, or 'his over there'). This is easy to relay, and hope to get a bunch of feedback as such.

    So what will really, really, *REALLY* help?!?

    Well... actually replacing the automatically-built script with the original which I've already update for Asterisk 1.4 in original post. If you are having problems with 'script a', do you experience the same problems with 'script b' ... which also happens to be the original script which we're trying to automate? The reason being, that if not... something the new script is doing has fundamentally changed your results. If so, then that means the original script never worked for you in the first place, and we need to start there with the dial plan OR look at your environment (whatever has changed there).

    The problem is never finding a solution, but identifying the problem in the first place... and that's where we need your help!
  17. TheShniz Guru

    A couple notes:

    WaitExten

    This was NEVER included in the original script!!! The purpose of this command is to allow the user a specified amount of time to make an entry (specifically for Extensions). This command has been around since Asterisk 1.0.x, was never required by the original script in Asterisk 1.2, and is still not required by many current Asterisk 1.4 installs. However, something has fundamentally changed ::cough::Digium::cough:: which now has select systems requiring these statements.

    SIP DTMF Patch

    As you may or may not know, Asterisk has an issue w/ DTMF (aka detection of keypresses) in SIP which has been backported by the good people @ PiaF for our version. However, I personally have seen no need or indication that there are any problems w/ any of my sites... SOOOoooo, I have not installed this patch on any of my systems!!! You may have, this is a potential difference between "MY" systems and "YOUR" system... and may be why one works, and one does not.

    SIP vs IAX vs ZAP

    All protocols are not created equally, and there are some key differences between them. All of my systems are using SIP trunks for outbound, and I have no problems. You may be using IAX or ZAP and get different results. Again, remember the idea is to identify that which is different, and improve the script for general use.

    "amportal restart"

    I will add a special note here, that Asterisk has had issues (in the past?) with the effectiveness of 'amportal restart'. I would also ask you to 1.) test the script and see if it works for you, and 2.) reboot and test again. You may be suprised, you may not be. Again we're looking for clues, and hey... it's a possibility.

    [macro-vm]

    The whole reason why we have this mess in the first place, is because of the way Asterisk runs and loads .config files. We need a way for the system to check if vm_notify is enabled for the extension that a caller just left a message for. SOOOOoooooo, we include a slightly modified [macro-vm] with "vm_notify_footer.dat" tacked onto the end! I've gone line by line (w/ DiffMerge, see below) on the differences w/ [macro-vm] that I've included in the original script, and the latest v2.5.x in FreePBX. [macro-vm] is predominantly the same, with a couple (fundamental?) changes for temporary greetings, but that's it.

    ^^^ Does the original script work for you with the included [macro-vm]?!?!?!? Perhaps the issue is not in vm_notify, but rather an update to [macro-vm] itself! (that is creating a conflict)

    ConfigEdit

    I don't use ConfigEdit for anything, but Tony does... he discovered that when he did, it actually screwed up the syntax of the file!! Specifically, ConfigEdit did NOT like "Background(to-enter-a-diff-number&press-1&or)" ... please note the '&or'. So he rightly moved it to the next line "Background(or&press-2&for&disabled)" and the issue is gone. Just be mindful of anything which may unwittingly alter the script, AND compare your results w/ SourceGear's DiffMerge!!!

    SourceGear's DiffMerge (http://sourcegear.com/diffmerge/)

    This is a great FREE windows application for comparing the differences between two files. As it pertains to us here, this is handy for comparing BOTH [macro-vm] of extensions.conf and vm_notify_custom.conf AND ALSO the original and new script itself (original script, and vm_notify_header.dat)

    This is all I can think of atm on what to look for...
    ...so how about it, care to lend a hand?
  18. TheShniz Guru

    Oh... and thanx guys for your valuable feedback thus far, I thank you greatly. While I've got no problem with the script, have been using it for YEARS (since the beginning), and can go on my merry way... it sure would be nice to grow and make a module for mass consumption.

    Fun Fact:
    Did you know BobH originally used nvFax to detect input... when first released, it only worked if your trunk could support fax transmissions (which not all ITSP's do).
  19. fhb New Member

    I am using Asterisk 1.4.23.1 (not using PIAF) and am trying to evaluate your script. I can enter the feature codes and setup the phone number to be directed to, however, after leaving a message it does not trigger the outbound queue Call file. Any ideas?
  20. TheShniz Guru

    You need to check [macro-vm] to ensure it was imported properly AND tacked on vm_notify_footer.dat onto the end. This is a one-liner which calls vm_notify when somebody leaves a message. If it is infact tagged as it should be, you should check the CLI to see what it's doing. Perhaps you've got something entirely different, this should give you the clues.

    ::updated::
    This script assumes you are using [macro-vm] for your voicemail application, and that it is stored in extensions.conf ... if your install is different, I'd invite you to look at the vm_notify_check.sh to see what patterns are being matched.

Share This Page