Skip to content

Instantly share code, notes, and snippets.

@swchris
Created March 8, 2019 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swchris/c7986064221b27a63d9b1e240e8d8aee to your computer and use it in GitHub Desktop.
Save swchris/c7986064221b27a63d9b1e240e8d8aee to your computer and use it in GitHub Desktop.
exten => _X.,1,Set(CURL_RESULT=${CURL(http://domain.com/test.json)})
same => n,Set(result=${JSONELEMENT(CURL_RESULT,result/subfield)})
same => n,GotoIf($["${result}" = "1"]?result1:result2)
same => n(result1),Verbose(Result 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment