Stroll around, found the error code Daquan Http://docs.ucpaas.com/doku.php?id=rest_error, found that the original is the SIG checksum error, a check to know, the original SIG finally all cut into uppercase, code as follows:
#!/bin/bash
sid= "a2e9b9ba6f9daddcca0e5532e277306e"
token= "9881df2dd7add68507543c4bc7e6434a
" timenow= ' Date +%y%m%d%h%m%s '
echo $timeNow
# get sig
sig= ' echo-n ' $sid $token$timenow ' | md5sum | awk ' {PRINT $ ' | TR ' [A-z] ' [A-z] '
echo ' sig: $sig "
# Get authorization
authorization= ' Echo-n" $sid: $timeNow "| base64-'
echo "Authorization: $authorization"
#curl-x POST https://api.ucpaas.com/v1/?sig= $sig \
#curl https:// api.ucpaas.com/2014-06-30/accounts/e03bc9106c6ed0eaebfce8c368fdcd48/calls/voicenotify?sig= $sig \
#curl https://api.ucpaas.com/2014-06-30/Accounts/a2e9b9ba6f9daddcca0e5532e277306e/Calls/voiceNotify?sig= $sig \
Curl https://api.ucpaas.com/2014-06-30/Accounts/a2e9b9ba6f9daddcca0e5532e277306e/Calls/voiceNotify?sig= $sig \ -
h "Accept:application/json" \
h "content-type:application/json;charset=utf-8" \
h "Authorization : $authorization "\
x POST--data-binary @info. json-vv
I got 000000 this time, but I still can't get the phone back.
This time is really to review.
END