[HELP] Using CURL to POST Asterisk CLI data

Hi everyone,

We have an office status board using Dashing (http://shopify.github.io/dashing/) that displays various data for us.
I have been trying to create a ‘widget’ that will display (somewhat) real time statistics from Asterisk.
All of the data I’d like to have, I can find in Asterisk’s CLI. I just can’t manage getting a bash script to ask for the data and post it.
I’d like to get the values for currently parked calls, active calls and maybe queue information.

I wish is was this easy for me. Bash & MYSQL isn’t exactly my thing, but usually I figure out what I need.

Thank you in advance!

#! /bin/bash

PARK=‘asterisk -r “parkedcalls show”’

curl -d ‘{ “auth_token”: “this-is-my-token”, “parked”: $PARK }’ http://###.###.###.###/widgets/asterisk[/code]