files reorganization

This commit is contained in:
2019-02-06 21:38:40 +01:00
parent abf41eb998
commit 23110ae184
10 changed files with 3 additions and 10 deletions

48
root/app/start.sh Normal file
View File

@@ -0,0 +1,48 @@
#!/bin/sh
SIP_SERVER=${SIP_SERVER:-127.0.0.1}
SIP_USER=${SIP_USER:-user}
SIP_PASS=${SIP_PASS:-user}
EXTERNAL_IP=${EXTERNAL_IP:-127.0.0.1}
cat >/etc/asterisk/pjsip.conf <<EOF
[mytransport]
type=transport
protocol=udp
bind=0.0.0.0
; localnet=172.17.0.0/16
external_media_address=${EXTERNAL_IP}
external_signaling_address=${EXTERNAL_IP}
[mytrunk]
type=registration
transport=mytransport
outbound_auth=mytrunk
server_uri=sip:${SIP_SERVER}:5060
client_uri=sip:${SIP_USER}@${SIP_SERVER}:5060
[mytrunk]
type=auth
auth_type=userpass
password=${SIP_PASS}
username=${SIP_USER}
[mytrunk]
type=aor
contact=sip:${SIP_SERVER}:5060
[mytrunk]
type=endpoint
context=incoming-calls
disallow=all
allow=speex,g726,g722,ilbc,gsm,alaw
outbound_auth=mytrunk
aors=mytrunk
[mytrunk]
type=identify
endpoint=mytrunk
match=${SIP_SERVER}
EOF
/usr/sbin/asterisk -cv