V
V
Viktor Shcherbakov2021-02-26 12:01:15
Asterisk
Viktor Shcherbakov, 2021-02-26 12:01:15

How to send the json of the package after the call?

Tell me how to send json to the server of all incoming calls.

I'm trying to do this in the file extensions_override_freepbx.conf I write

[sub-add-call]
exten => s,1,Set(MyRes=${SHELL(/usr/bin/curl -X POST -s -m 1 -H 'Content-Type: application/json\; charset=utf-8' --data '{"phoneNumber":"${CALLERID(num)}","startTime":"${CDR(start)}","endTime":"${CDR(end)}"}' http://localhost/)})
same => n,noop(${MyRes})
same => n,Return


But unfortunately it doesn't work and I don't understand why. Tell me where to look, maybe I didn’t finish it

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question