Last active
August 29, 2015 14:04
-
-
Save andrius/fff2033d2cefd425530f to your computer and use it in GitHub Desktop.
Asterisk PBX SIP.conf, which works :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[general] | |
udpbindaddr=0.0.0.0:5060 | |
tcpenable=yes | |
tcpbindaddr=0.0.0.0:5060 | |
tlsenable=yes | |
tlsbinddir=0.0.0.0:5060 | |
;tlsverify=no | |
;tlscipher=ALL | |
;tlsclientmethod=tlsv1 | |
;tlscertfile=/etc/asterisk/keys/asterisk.pem | |
;tlscafile=/etc/asterisk/keys/ca.crt | |
;dtlsenable=yes | |
;dtlsbinddir=0.0.0.0:5060 | |
;dtlsverify=no | |
;dtlscertfile=/etc/asterisk/keys/asterisk.pem | |
;dtlscafile=/etc/asterisk/keys/ca.crt | |
port=5060 | |
transport=udp,tcp | |
;transport=udp,tcp,ws,wss,tls | |
;dynamic_exclude_static = yes | |
context=incoming | |
allowguest=yes | |
allowtransfer=yes | |
alwaysauthreject=yes | |
;realm=andrius.mobi | |
;domain=andrius.mobi | |
;externhost=HOSTNAME-IF-YOU-HAVE-DYNAMIC-IP (DYNDNS) | |
;externrefresh=90 | |
; NO if you have DNS issues, or install DNSMASQ | |
srvlookup=yes | |
tos_sip=cs3 | |
tos_audio=ef | |
tos_video=af41 | |
tos_text=af41 | |
cos_sip=3 | |
cos_audio=5 | |
cos_video=4 | |
cos_text=3 | |
; http://www.asterisk.org/doxygen/trunk/sip_session_timers.html | |
session-timers=accept ; ["accept", "originate", "refuse"] | |
session-minse=90 | |
session-expires=600 | |
session-refresher=uas | |
maxexpiry=600 | |
minexpiry=120 | |
defaultexpiry=300 | |
vmexten=voicemail | |
#include sip_allowed_codecs.conf | |
language=en | |
relaxdtmf=yes ; Relax dtmf handling | |
;trustrpid=no ; If Remote-Party-ID should be trusted | |
;sendrpid=yes ; If Remote-Party-ID should be sent | |
promiscredir=yes ; If yes, allows 302 or REDIR to non-local SIP address | |
; Note that promiscredir when redirects are made to the | |
; local system will cause loops since SIP is incapable | |
; of performing a "hairpin" call. | |
; Uncomment if you want to hide Asterisk in USERAGENT header | |
;useragent=C3412s | |
;sdpsession=C3412s | |
sdpowner=root | |
;usereqphone=yes ; If yes, ";user=phone" is added to uri that contains | |
; a valid phone number | |
dtmfmode=rfc2833 | |
regcontext=sipregistrations | |
;regextenonqualify=yes | |
rtptimeout=300 | |
rtpholdtimeout=3600 | |
rtpkeepalive=30 | |
jbenable=yes | |
allowsubscribe=yes | |
subscribecontext=outgoing | |
notifyringing=yes | |
notifyhold=yes | |
callcounter=yes | |
counteronpeer=yes | |
localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses | |
localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 | |
localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation | |
localnet=172.31.255.0/255.255.255.0 | |
localnet=172.32.255.0/255.255.255.0 | |
localnet=172.33.255.0/255.255.255.0 | |
localnet=172.34.255.0/255.255.255.0 | |
localnet=172.35.255.0/255.255.255.0 | |
localnet=169.254.0.0/255.255.0.0 ; Zero conf local network | |
canreinvite=no | |
directmedia=no ; update,nonat | |
nat=auto_force_rport,auto_force_comedia | |
icesupport=no | |
;qualify=2000 ; 2000 msec = 2 seconds | |
qualify=no | |
; as per http://forum.snom.com/index.php?showtopic=5248 | |
prematuremedia=no | |
progressinband=yes | |
registertimeout=20 | |
registerattempts=0 | |
limitonpeers=yes | |
;#include sip_registrations.conf | |
[authentication] | |
;#include sip_profiles.conf | |
;#include sip_trunks.conf | |
;#include sip_trunks_extra.conf | |
;#include sip_accounts.conf | |
[natted-phone-no-qualify] | |
transport=tcp,udp | |
type=friend | |
progressinband=yes | |
context=test | |
nat=force_rport,comedia | |
canreinvite=no | |
directmedia=no | |
host=dynamic | |
qualify=no | |
subscribemwi=yes | |
disallow=all | |
; allow=amr | |
allow=g722 | |
allow=alaw | |
;allow=silk8 | |
;allow=g729 | |
allow=gsm | |
[natted-phone](natted-phone-no-qualify) | |
qualify=8000 | |
[account1](natted-phone) | |
secret=Fawre5Ru8hUfruTAfReC | |
[account2](natted-phone) | |
secret=juCuDetaduxechameph6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disallow=all | |
allow=g722 | |
allow=alaw | |
allow=ulaw | |
;allow=silk8 | |
;allow=g729 | |
allow=gsm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment