Spaces:
Sleeping
Sleeping
| [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() |