Passe sip.conf, voicemail.conf, manager.conf, extensions.conf avec le module python
This commit is contained in:
parent
d51f7d0140
commit
9f9b6aef36
7 changed files with 403 additions and 0 deletions
45
Python/etc/asterisk/manager.conf
Normal file
45
Python/etc/asterisk/manager.conf
Normal file
|
@ -0,0 +1,45 @@
|
|||
info["owner"] = "asterisk"
|
||||
info["group"] = "asterisk"
|
||||
info["perms"] = 0644
|
||||
|
||||
include("secrets")
|
||||
|
||||
out(""";
|
||||
; Asterisk Call Management support
|
||||
; Géré par bcfg2
|
||||
|
||||
; By default asterisk will listen on localhost only.
|
||||
[general]
|
||||
enabled = yes
|
||||
port = 5038
|
||||
bindaddr = 0.0.0.0
|
||||
|
||||
; No access is allowed by default.
|
||||
; To set a password, create a file in /etc/asterisk/manager.d
|
||||
; use creative permission games to allow other serivces to create their own
|
||||
; files
|
||||
#include "manager.d/*.conf"
|
||||
|
||||
[django]
|
||||
secret =""" + secrets.asterisk_django_passwd + """
|
||||
deny=0.0.0.0/0.0.0.0
|
||||
permit=127.0.0.1/255.255.255.0
|
||||
permit=10.231.136.0/255.255.255.0
|
||||
write = config
|
||||
|
||||
; Le mot de passe est aussi present dans /etc/crans/secrets.py
|
||||
; (update accordingly )
|
||||
[sms]
|
||||
secret = """ + secrets.asterisk_sms_passwd + """
|
||||
deny=0.0.0.0/0.0.0.0
|
||||
permit=127.0.0.1/255.255.255.0
|
||||
permit=10.231.136.0/255.255.255.0
|
||||
read = system
|
||||
write = system,message
|
||||
|
||||
[billing]
|
||||
secret = """ + secrets.asterisk_billig_passwd + """
|
||||
deny=0.0.0.0/0.0.0.0
|
||||
permit=127.0.0.1/255.255.255.0
|
||||
read = call,system
|
||||
write = call""")
|
88
Python/etc/asterisk/sip.conf
Normal file
88
Python/etc/asterisk/sip.conf
Normal file
|
@ -0,0 +1,88 @@
|
|||
info["owner"] = "asterisk"
|
||||
info["group"] = "asterisk"
|
||||
info["perms"] = 0644
|
||||
|
||||
include("secrets")
|
||||
|
||||
out("""[general]
|
||||
language=fr
|
||||
context=crans-from-external
|
||||
outofcall_message_context=crans-sms
|
||||
vmexten=666
|
||||
bindport=5060•
|
||||
bindaddr=::
|
||||
srvlookup=yes•
|
||||
domain = crans.org
|
||||
fromdomain=crans.org
|
||||
domain = sip.crans.org
|
||||
domain = sip.v6.crans.org
|
||||
domain = sip.v4.crans.org
|
||||
qualify = 10000
|
||||
qualifyfreq = 60
|
||||
realm = asterisk
|
||||
rtpholdtimeout=300
|
||||
rtptimeout=60
|
||||
register => 0033972113270:G1mrWTZ43Z8S@sip.ovh.fr
|
||||
|
||||
tlsenable=yes
|
||||
tcpenable=yes
|
||||
tlsbindaddr=::
|
||||
tcpbindaddr=::
|
||||
tlscertfile=/etc/asterisk/cert/asterisk.pem
|
||||
tlscafile=/etc/ssl/certs/cacert.org.pem
|
||||
tlscipher=ALL
|
||||
tlsclientmethod=tlsv1
|
||||
|
||||
videosupport=yes
|
||||
disallow=all
|
||||
allow=alaw
|
||||
allow=ulaw
|
||||
allow=h263
|
||||
;allow=h263p
|
||||
;allow=h261•
|
||||
allow=h264
|
||||
;allow=g729
|
||||
;maxcallbitrate=512
|
||||
;localnet=138.231.0.0/255.255.0.0
|
||||
;localnet=138.231.144.0/255.225.248.0
|
||||
;localnet=138.231.136.0/255.225.248.0
|
||||
|
||||
nat=force_rport,comedia
|
||||
|
||||
|
||||
[forfait-ovh]
|
||||
type=peer
|
||||
host=sip.ovh.fr
|
||||
;allow=all
|
||||
context=ovh-sip
|
||||
language=fr
|
||||
insecure=port,invite
|
||||
fromuser=""" + secrets.sip_username + """
|
||||
unername=""" + secrets.sip_username + """
|
||||
secret=""" + secrets.sip_secret + """
|
||||
canreinvite=no
|
||||
dtmfmode=auto
|
||||
video=no
|
||||
restrictcid=no
|
||||
amaflags=default
|
||||
|
||||
;template par default des lignes pour le crans
|
||||
[default-crans](!)
|
||||
type=friend
|
||||
transport=udp,tcp,tls
|
||||
fromdomain=crans.org
|
||||
host=dynamic
|
||||
context=crans-sip
|
||||
language=fr
|
||||
insecure=port
|
||||
canreinvite=no
|
||||
dtmfmode=auto
|
||||
call-limit = 10
|
||||
video=yes
|
||||
restrictcid=no
|
||||
amaflags=default
|
||||
accept_outofcall_message=yes
|
||||
outofcall_message_context=crans-sms
|
||||
encryption=may
|
||||
|
||||
#include "/usr/scripts/var/sip/sip_accounts" """)
|
Loading…
Add table
Add a link
Reference in a new issue