vBot-2.1 / asterisk_dialplan.conf
Ajit Panday
Initial commit with complete vBot implementation
c6d0d33
raw
history blame contribute delete
551 Bytes
[from-internal]
; Replace YOUR_API_KEY with the API key provided by vBot
exten => _X.,1,Answer()
same => n,Set(CALLERID=${CALLERID(num)})
same => n,Set(CALLED=${EXTEN})
same => n,Record(/tmp/call-${UNIQUEID}.wav,0,30)
same => n,System(curl -X POST "https://your-huggingface-space-url/api/v1/process-call" \
-H "api-key: YOUR_API_KEY" \
-H "caller-number: ${CALLERID}" \
-H "called-number: ${CALLED}" \
-F "file=@/tmp/call-${UNIQUEID}.wav")
same => n,System(rm /tmp/call-${UNIQUEID}.wav)
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()