There is a slight modification for the Sansay Bash script from the one that is posted on Freepbx. Sansay is $250 per month (if you provide your own VMWare server) vs Transnexus $500 per month…FYI
Here is the corrected script:
#!/bin/bash
# Bash client to use Sansay NSS API with Asterisk
# version 1.0
# Script arguments are orig_tn and dest_tn as follows "get_shaken.sh 8587542200 8587542211"
# Generate unique Request ID
Request_ID=`echo $RANDOM | md5sum | head -c 20`
# Send Request to Sansay NSS
# sub actual url domain
curl --silent https://your-nss.sansay.com:3334/stir/v1/signing -k -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H "X-RequestID: $Request_ID" -d "{\"signingRequest\":{\"orig\":{\"tn\":\"$1\"},\"dest\":{\"tn\":[\"$2\"]},\"iat\":$(date +%s)}}" | jq .signingResponse.identity | sed 's/\"//g; s/\\//g'