Spaces:
Sleeping
Sleeping
Ajit Panday commited on
Commit ·
5628856
1
Parent(s): 25bb2cb
Update webhook configuration to use correct Hugging Face Spaces API endpoint
Browse files- FREEPBX_SETUP.md +8 -8
FREEPBX_SETUP.md
CHANGED
|
@@ -81,7 +81,7 @@ This guide provides detailed instructions for setting up FreePBX to work with vB
|
|
| 81 |
- Navigate to "Webhooks" section
|
| 82 |
- Add new webhook:
|
| 83 |
- Name: vBot Call Processing
|
| 84 |
-
- URL: https://iajitpanday-vbot.hf.space/
|
| 85 |
- Method: POST
|
| 86 |
- Headers:
|
| 87 |
```
|
|
@@ -90,9 +90,9 @@ This guide provides detailed instructions for setting up FreePBX to work with vB
|
|
| 90 |
```
|
| 91 |
- Payload:
|
| 92 |
```
|
| 93 |
-
file
|
| 94 |
-
|
| 95 |
-
|
| 96 |
```
|
| 97 |
- Configure webhook triggers:
|
| 98 |
- Event: Call Recording Complete
|
|
@@ -113,12 +113,12 @@ This guide provides detailed instructions for setting up FreePBX to work with vB
|
|
| 113 |
# Check webhook logs
|
| 114 |
tail -f /var/log/asterisk/webhook
|
| 115 |
# Verify webhook delivery
|
| 116 |
-
curl -X POST https://iajitpanday-vbot.hf.space/
|
| 117 |
-H "X-API-Key: your_api_key" \
|
| 118 |
-H "Content-Type: multipart/form-data" \
|
| 119 |
-
-F "file
|
| 120 |
-
|
| 121 |
-
|
| 122 |
```
|
| 123 |
|
| 124 |
4. Configure SSL:
|
|
|
|
| 81 |
- Navigate to "Webhooks" section
|
| 82 |
- Add new webhook:
|
| 83 |
- Name: vBot Call Processing
|
| 84 |
+
- URL: https://iajitpanday-vbot.hf.space/run/predict
|
| 85 |
- Method: POST
|
| 86 |
- Headers:
|
| 87 |
```
|
|
|
|
| 90 |
```
|
| 91 |
- Payload:
|
| 92 |
```
|
| 93 |
+
data=[{"name": "file", "data": "${RECORDING_FILE}"},
|
| 94 |
+
{"name": "caller_number", "data": "${CALLERID(num)}"},
|
| 95 |
+
{"name": "called_number", "data": "${EXTEN}"}]
|
| 96 |
```
|
| 97 |
- Configure webhook triggers:
|
| 98 |
- Event: Call Recording Complete
|
|
|
|
| 113 |
# Check webhook logs
|
| 114 |
tail -f /var/log/asterisk/webhook
|
| 115 |
# Verify webhook delivery
|
| 116 |
+
curl -X POST https://iajitpanday-vbot.hf.space/run/predict \
|
| 117 |
-H "X-API-Key: your_api_key" \
|
| 118 |
-H "Content-Type: multipart/form-data" \
|
| 119 |
+
-F "data=[{\"name\": \"file\", \"data\": \"@/var/spool/asterisk/monitor/test.wav\"},
|
| 120 |
+
{\"name\": \"caller_number\", \"data\": \"+1234567890\"},
|
| 121 |
+
{\"name\": \"called_number\", \"data\": \"+0987654321\"}]"
|
| 122 |
```
|
| 123 |
|
| 124 |
4. Configure SSL:
|