sipnet billing check
// check sipnet.ru billing info
#!/bin/sh SIP_USER=user_sip SIP_PASS=pasword_sip ACCOUNT_ID=$(curl --silent --user $SIP_USER:$SIP_PASS "https://customer.voipexchange.ru/cgi-bin/Exchange.dll/MTK" \ | gzip -dc - | awk '/uid=/ { gsub(/[^0-9.]/, "", $2); print $2 }') curl --silent --user $SIP_USER:$SIP_PASS "https://customer.voipexchange.ru/cgi-bin/Exchange.dll/MTK?oper=3&uid=$ACCOUNT_ID" \ | gzip -dc - | awk -F 'Balance' '$2!~/^$/ { gsub(/[^0-9.]/, "", $2); print $2 }'