On 12/13/19 11:48 AM, Julian Beach wrote:
Hello Doug,

Friday, December 13, 2019, 11:03:37 AM, you wrote:

This is exactly what I do - “press 1 for a human”
Works great
I do this as well, but I also do a database lookup to see if the number
is on our speeddial list and if so, pass the call directly on without
the IVR prompts.


For those that would like to see my code:

exten => 517xxxxxxx,1,Answer()
    same => n,Gosub(check_blacklist,s,1)
    same => n,Gosub(get_callerid,s,1)
    same => n,Gosub(check_for_direct,s,1)
    same => n,Set(CHANNEL(musicclass)=music)
    same => n,Gosub(extension_timeouts,s,1)
    same => n,Dial(SIP/3501,${timeout.timeout},TtKk)
    same => n,NoOP(Dial Status: ${DIALSTATUS})
    same => n,NoOP(Hangup Cause: ${HANGUPCAUSE})
    same => n,Gosub(s-${DIALSTATUS},s,1)

[check_for_direct]

;**********************************************************************
;* Check if there is a match of the inbound call to the speed dial list
;* If not, make then go through the IVR menu
;*******************************************

exten => s,1,Set(ARRAY(speed.phone,speed.name)=${ODBC_MENU_DIRECT(drdos,${CALLERID(number)})})

;********************************************************
;* If the contents of speed.phone is blank, assume that it
;* is not programmed and force the call to use the IVR to
;* prove they are not an automated call.
;********************************************************

     same => n,GotoIf($["${speed.phone}" != "" ]?3:ivr_menu,s,1)
     same => n,NoOP(${speed.name} is on the approved list)
     same => n,Return()
     same => n,Hangup()



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to