Anyone have an emergency after hours pager script?

anyone have a working pager script they use for an after hours emergency mailbox for say an on call technician? in this case the one built in freepbx wont work, has to be a numeric pager

I modified a cell phone notification script for asterisk 1.2 but don’t have a clue on how to make it work with asterisk 1.4

caller leaves a message in a mailbox, asterisk dials the pager number with a notification

thanks

post the 1.2 script we might can help you

starts here: ;VM Notify Start in this file

; This file contains example extensions_custom.conf entries.
; extensions_custom.conf should be used to include customizations
; to AMP’s Asterisk dialplan.

; All custom context should contain the string ‘custom’ in it’s name

; Extensions in AMP have access to the ‘from-internal’ context.
; The context ‘from-internal-custom’ is included in ‘from-internal’ by default

#include extensions_trixbox.conf
=> talk,n,Background(this-is-th#include extensions_hud.conf

[from-internal-custom]

exten => asterisk,1,VoiceMailMain(${CALLERIDNUM})

include => custom-vm-notify

include => from-internal-trixbox

;1234,1,Playback(demo-congrats) ; extensions can dial 1234
;1234,2,Hangup()
;h,1,Hangup()
;include => custom-recordme ; extensions can also dial 5678

; custom-count2four,s,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-count2four]
;s,1,SayDigits(1234)
;s,2,Hangup

; custom-recordme,5678,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-recordme]
;exten => 5678,1,Wait(2)
;exten => 5678,2,Record(/tmp/asterisk-recording:gsm)
;exten => 5678,3,Wait(2)
;exten => 5678,4,Playback(/tmp/asterisk-recording)
;exten => 5678,5,Wait(2)
;exten => 5678,6,Hangup

;VM Notify Start
;This is for adding the ability to have asterisk call the user’s cell phone when
;a new voicemail is recorded in their mailbox. It is still being tested and needs
;some voice prompts recorded to make it sound better.
;Installation: just copy the text between VM Notify start and VM Notify End
;and past it into extensions_custom.conf then put “include => custom-vm-notify”
;under the [from-internal-custom] context to enable *26
;the [macro-vm] replaces the one in extensions.conf to make it check if the user has
;VM Notify enabled. The only difference is the “exten => h,1,Macro(vm-notify,${ARG1})”
;line. If the [macro-vm] changes in future versions of freePBX/Trixbox then it needs
;to be copied here to replace this one with the exten h line staying the same.
;Change log
;8-9-06: added a repeat of message when called and short pauses after a button is pressed
;9-29-06: changed gotoif to test for null better
;11-7-06: changed retrytime to 60 seconds

[custom-vm-notify]

; Dial *26 to enable or disable Voicemail Out-calling
exten => *26,1,Answer()
exten => *26,2,Playback(please-enter-your&extension)
exten => *26,3,Read(vmextension,then-press-pound)
exten => *26,4,Set(phonenumber=${DB(vmnotify/${vmextension})})
exten => *26,5,Gotoif($[“foo${phonenumber}” = “foo”]?20:10)

exten => *26,10,Playback(enabled&telephone-number&is-set-to)
exten => *26,11,SayDigits(${phonenumber})
exten => *26,12,Background(to-enter-a-diff-number&press-2∨)
exten => *26,13,Background(press-1&for&disabled)

exten => *26,20,Playback(disabled)
exten => *26,21,Background(press-1&for&enabled)

exten => 1,1,Playback(enter-phone-number10)
exten => 1,2,Read(phonenumber,then-press-pound)
exten => 1,3,Set(DB(vmnotify/${vmextension})=${phonenumber})
exten => 1,4,Playback(enabled&telephone-number&is-set-to)
exten => 1,5,SayDigits(${phonenumber})
exten => 1,6,Hangup()

exten => 2,1,DBdel(vmnotify/${vmextension})
exten => 2,2,Playback(disabled)
exten => 2,3,Hangup()

exten => t,1,Hangup()

[macro-vm-notify]

exten => s,1,Set(phonenumber=${DB(vmnotify/${ARG1})})
exten => s,2,Gotoif($[“foo${phonenumber}” = “foo”]?20:10) ;see if this vmbox has out-calling enabled

exten => s,10,HasNewVoicemail(${ARG1}) ;check for new voicemails first

;now build a .call file and then move it into the spool
exten => s,111,SetVar(spooldir=/var/spool/asterisk)
exten => s,n,System(echo “Channel: Zap/g0/”${phonenumber} > ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “MaxRetries: 1” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “RetryTime: 60” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “WaitTime: 30” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “Context: macro-vm-notify” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “Extension: vmcall” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “Priority: 1” >> ${spooldir}/${ARG1}.call)
exten => s,n,System(echo “Setvar: vmext=”${ARG1} >> ${spooldir}/${ARG1}.call)
exten => s,n,System(mv ${spooldir}/${ARG1}.call ${spooldir}/outgoing/)

;This is where the .call file starts from
exten => vmcall,1,Answer
exten => vmcall,n,NoOp( Waiting for Answer )
exten => vmcall,n,WaitForSilence(2000)
exten => vmcall,n,NoOp( Hello )
exten => vmcall,n,Goto(talk,1)

;Somebody answered or we timed out let them know it’s a voicemail
exten => talk,1,Wait(16)
exten => talk,n,SendDTMF(511)
exten => talk,n,Hangup

;drop them into the voicemail system
exten => 1,1,Wait(1)
exten => 1,n,VoiceMailMain(${vmext}@default)

;they don’t want to talk to us
exten => 2,1,Wait(1)
exten => 2,n,Playback(vm-goodbye)
exten => 2,n,Hangup

;They must be ignoring us
exten => t,1,Hangup

; copied macro-vm from extensions.conf so we could add the h extension to start the notify
;
[macro-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(VMGAIN=${IF($[“foo${VM_GAIN}”!=“foo”]?“g(${VM_GAIN})”:"")})
exten => s,n,Goto(s-${ARG2},1)

exten => s-BUSY,1,NoOp(BUSY voicemail)
exten => s-BUSY,n,Macro(get-vmcontext,${ARG1})
exten => s-BUSY,n,Voicemail(${ARG1}@${VMCONTEXT}|b${VMGAIN}) ; Voicemail Busy message
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
exten => s-DIRECTDIAL,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_DDTYPE}${VMGAIN})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)

exten => _s-.,1,Macro(get-vmcontext,${ARG1})
exten => _s-.,n,Voicemail(${ARG1}@${VMCONTEXT}|u${VMGAIN}) ; Voicemail Unavailable message
exten => _s-.,n,Goto(exit-${VMSTATUS},1)

exten => o,1,Background(one-moment-please) ; 0 during vm message will hangup
exten => o,n,GotoIf($[“foo${FROM_DID}” = “foo”]?from-pstn,s,1:from-pstn,${FROM_DID},1)

exten => a,1,Macro(get-vmcontext,${ARG1})
exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT})
exten => a,n,Hangup

exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
exten => exit-FAILED,n,Hangup()

exten => exit-SUCCESS,1,Playback(goodbye)
exten => exit-SUCCESS,n,Hangup()

exten => exit-USEREXIT,1,Playback(goodbye)
exten => exit-USEREXIT,n,Hangup()

exten => t,1,Hangup()

exten => h,1,Macro(vm-notify,${ARG1}) ; this will start the vm-notification macro when the call is done

; get the voicemail context for the user in ARG1

;VM Notify End

Have you tried posting in FreePBX forums?

can you also post the errors you get?