$ asterisk -rx 'core show function CURL'
/etc/asterisk/extensions_custom.conf
. Context below is as example, pay attention to the code, it needs to be changed:from-internal,${TOEXT},1
- in the "from-internal" context a call to the TOEXT number is created). If there is no answer (or empty), the call goes to a voice greeting (in this example, ivr-1, s, 1
).[bx24transfer]
exten => 1,1,Set(CURLOPT(hashcompat)=yes)
exten => 1,n,Set(CURLOPT(httptimeout)=5)
exten => 1,n,Set(CURLOPT(conntimeout)=5)
exten => 1,n,Set(HASH(forwardHash)=${CURL(http://localhost:8077/extendedForward?phone=${CALLERID(num)})})
exten => 1,n,Set(CALLERID(name)=${HASH(forwardHash,name)})
exten => 1,n,GotoIf($[${HASH(forwardHash,number)}]?from-internal,${HASH(forwardHash,number)},1:ivr-1,s,1)
bx24asterisk
(context name)ivr-1, s, 1
does not fit), you need to find out the context which you want to direct the call to and specify it in file /etc/asterisk/extensions_custom.conf.
ext-group, N, 1
, where N - is the group number. The group number can be found in Applications → Ring Groups.ext-group, 3, 1
. Specify this route in the bx24transfer context instead of ivr-1, s, 1.