I have this dial plan setup: ( think it is a dialplan… could be called something else )
[callscreener]
exten => s,1,AGI(callscreener.agi)
exten => s,n,GotoIf($["${priority}" = “pass”]?ext-group,600,1)
exten => s,n,GotoIf($["${priority}" = “screenme”]?ext-group,600,1)
exten => s,n,GotoIf($["${priority}" = “voicemail”]?from-did-direct,5115,1)
exten => s,n,GotoIf($["${priority}" = “blacklist”]?app-blackhole,zapateller,1)
exten => s,n,GotoIf($["${priority}" = “whitelist”]?ext-group,600,1)
exten => s,n,Goto(callscreener,1,1)
I’d like to change this up a bit so that I can do things based on the DID used when getting here. I dont’ see the DID info ( number that was called ) in any of the phpagi data that callscreener.agi gets.
Is there a way for the agi script to determine the DID number on the call or can that be setup / passed to the agi script prior to calling it?
I see:
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [request] => Array
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: (
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_request] => callscreener.agi
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_channel] => DAHDI/1-1
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_language] => en
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_type] => DAHDI
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_uniqueid] => 1414959195.471
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_version] => 12.6.1
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_callerid] => 8885551212
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_calleridname] => SMITH,J
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_callingpres] => 0
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_callingani2] => 0
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_callington] => 0
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_callingtns] => 0
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_dnid] => unknown
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_rdnis] => unknown
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_context] => callscreener
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_extension] => s
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_priority] => 1
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_enhanced] => 0.0
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_accountcode] =>
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: [agi_threadid] => 140131118860032
[2014-11-02 14:13:16] VERBOSE[1151][C-00000029] res_agi.c: callscreener.agi: )\
in my agi response but nothing on the DID number.
Any ideas?
Thanks - jack