Evening - Asterisk noob here. I’m developing an app to work with Asterisk and I want to be able to POST some JSON information immediately after a Dial() is made. I have read docs and found ways to continue after the call has been completed/hungup/etc, but I need to have it dial and then immediately proceed.
…. start of call up here works fine…
same => n,Dial(SIP/1${DestinationNumber}@outbound001,60)
same => n,jsonadd(inbound_json,string,key1,${value1})
same => n,jsonadd(inbound_json,string,key2,${value2})
same => n,jsonadd(inbound_json,string,key3,${value3})
same => n,jsonadd(inbound_json,string,CallTime,${CallTime})
same => n,Log(NOTICE, ${JSONPRETTY(inbound_json)})
same => n,Set(inbound_post_result=${SHELL(curl -X POST https://URL/api/destination -H ‘Content-Type: application/json’ -H 'server-auth-key:MYKEY-HERE
same => n,Congestion
Any ideas?
Thanks in advance!