Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

sipnet billing check (See related posts)

// 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 }'


You need to create an account or log in to post comments to this site.


Related Posts