I solved it that way:
[macro-dialout-one-predial-hook] ; check to ensure this context doesn’t already exist before adding
exten => s,1,Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)
[hangup-handler]
exten => s,1,NoOp(Lookup internal destination numbers)
exten => s,n,GotoIf($[${LEN(${DEXTEN})} = 3 ]?dnid_set) ;check length of destination number
exten => s,n,goto(end)
exten => s,n(dnid_set),Set(CIDSFSCHEME=QUxMfEFMTA==) ;name of superfecta in base64
exten => s,n,Set(temp1=${CALLERID(name)})
exten => s,n,Set(CALLERID(name)=)
exten => s,n,Set(temp2=${CALLERID(number)})
exten => s,n,Set(CALLERID(number)=${DEXTEN})
exten => s,n,AGI(/var/www/html/admin/modules/superfecta/agi/superfecta.agi)
exten => s,n,Set(CALLERID(name)=${temp1})
exten => s,n,Set(CALLERID(number)=${temp2})
exten => s,n,Set(CDR(userfield,r)=${lookupcid})
exten => s,n,Return() ;this line is required for all hangup handlers
exten => s,n(end),NoOp(!!! skipped !!!)
exten => s,n,NoOp(!!! END of internal call lookup !!!)
exten => s,n,Return() ;this line is required for all hangup handlers