- #!/bin/bash
- ACC=$2
- set -a
- source <(cat .env app.env | sed -e '/^#/d;/^\s*$/d' -e "s/'/'\\\''/g" -e "s/=\(.*\)/='\1'/g")
- set +a
- PASS=$(curl -s -X GET "http://127.0.0.1:${APP_API_PORT}/ami/auths" -H "${APP_AUTH_HEADER}: ${APP_AUTH_SECRET}" | jq -r ".data.\"${ACC}\"")
- docker run -ti --rm --net=host -e SIP_SERVER_HOST=${APP_AMI_HOST} -e SIP_SERVER_PORT=5160 -e SIP_PASSWORD=${PASS} halsbox/pjsua "$@"
- reset
|