globals_custom.conf
Define your global variables here for easy access across all configuration files.
EDGE_NUMBER=
EDGE_KEY=
CODE
iax_custom.conf
Configure the IAX2 user settings to allow the Edge Networx connection.
[from-edge]
type=user
username=from-edge
secret=
auth=md5
encryption=yes
context=from-edge
CODE
extensions_custom.conf
Add these contexts to handle incoming calls from the Edge and customize outbound routing through the API.
[from-edge]
exten => _X.,1,NoOp
same => n,Goto(from-internal,${EXTEN:3},1)
[from-internal-additional-custom]
exten => _XXXXXXX,1,NoOp
same => n,Set(CALLERID(num)=${GLOBAL(EDGE_NUMBER)}${CALLERID(num)})
same => n,Set(SIG=${MD5(${STRFTIME(${EPOCH},,%Y%m%d%H)}${GLOBAL(EDGE_KEY)})})
same => n,Set(IAXVAR(edge-sig)=${SIG})
same => n,Set(lookup=${CURL(http://api.edgenetworx.org/index.php?auth=${GLOBAL(EDGE_KEY)}&number=${EXTEN}&ani=${GLOBAL(EDGE_NUMBER)}0000)})
same => n,Dial(${lookup})
same => n,Hangup()
CODE