Hey,
I am trying to call the function ENUMLOOKUP from an AGI script. What is the proper way to do this?
set variable test ENUMLOOKUP(+14161234567,ALL,1,e164.org)
get variable test
But that doesn’t work, it says test is ENUMLOOKUP(+14161234567,ALL,1,e164.org
I would like my agi script to call enumlookup using the asterisk function instead of extensions.conf because I need to cleanup the dialed number (add prefix etc…).
Thanks,
David
why don’t you use the Asterisk function, then pass it to your AGI for cleanup ?
Because I need to do the cleanup before the function is called.
What I have now is this:
; Local Calls
exten => _NXXNXXX,1,AGI(clean-number.php)
exten => _NXXNXXX,n,Set(enum=${ENUMLOOKUP(+${clean},ALL,1,e164.org)})
exten => _NXXNXXX,n,AGI(call-starts.php)
exten => _NXXNXXX,n,HangUp
I was hoping to reduce it to:
exten => _NXXNXXX,1,AGI(call-starts.php)
exten => _NXXNXXX,n,HangUp
This is why I want to call the function from my script and not extensions.conf. Is there a way to call the function from my agi script?
Thanks,
David