; ; SIP Configuration example for Asterisk ; ; This file has been stripped of many comments and latent commands and settings. Original in .conf ; ; Modified from the Distro, K. M. Peterson, May 2013 ; http://kmpeterson.com/special/bblisa-asterisk [general] context=localUnauthenticatedIncoming ; Default context for incoming calls allowguest=yes ; Allow or reject guest calls (default is yes) ; If your Asterisk is connected to the Internet ; and you have allowguest=yes ; you want to check which services you offer everyone ; out there, by enabling them in the default context (see below). ;match_auth_username=yes ; if available, match user entry using the ; 'username' field from the authentication line ; instead of the From: field. allowoverlap=no ; Disable overlap dialing support. (Default is yes) ;allowtransfer=no ; Disable all transfers (unless enabled in peers or users) ; Default is enabled. The Dial() options 't' and 'T' are not ; related as to whether SIP transfers are allowed or not. ;realm=mydomain.tld ; Realm for digest authentication ; defaults to "asterisk". If you set a system name in ; asterisk.conf, it defaults to that system name ; Realms MUST be globally unique according to RFC 3261 ; Set this to your host name or domain name ;domainsasrealm=no ; Use domans list as realms ; You can serve multiple Realms specifying several ; 'domain=...' directives (see below). ; In this case Realm will be based on request 'From'/'To' header ; and should match one of domain names. ; Otherwise default 'realm=...' will be used. bindaddr=192.168.0.10 ; forces IPv4, UDP-only ;udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060) tcpenable=no ; Enable server for incoming TCP connections (default is no) ;tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060) ;tlsenable=no ; Enable server for incoming TLS (secure) connections (default is no) ;tlsbindaddr=0.0.0.0 ; IP address for TLS server to bind to (0.0.0.0) binds to all interfaces) ; Optionally add a port number, 192.168.1.1:5063 (default is port 5061) ; Remember that the IP address must match the common name (hostname) in the ; certificate, so you don't want to bind a TLS socket to multiple IP addresses. ; For details how to construct a certificate for SIP see ; http://tools.ietf.org/html/draft-ietf-sip-domain-certs srvlookup=yes ; Enable DNS SRV lookups on outbound calls ; Note: Asterisk only uses the first host ; in SRV records ; Disabling DNS SRV lookups disables the ; ability to place SIP calls based on domain ; names to some other SIP users on the Internet ; Specifying a port in a SIP peer definition or ; when dialing outbound calls will supress SRV ; lookups for that peer or call. ;pedantic=yes ; Enable checking of tags in headers, ; international character conversions in URIs ; and multiline formatted headers for strict ; SIP compatibility (defaults to "yes") ;COS/QOS settings... tos_sip=ef ; Sets TOS for SIP packets. tos_audio=ef ; Sets TOS for RTP audio packets. tos_video=af41 ; Sets TOS for RTP video packets. tos_text=af41 ; Sets TOS for RTP text packets. cos_sip=3 ; Sets 802.1p priority for SIP packets. cos_audio=5 ; Sets 802.1p priority for RTP audio packets. cos_video=4 ; Sets 802.1p priority for RTP video packets. cos_text=3 ; Sets 802.1p priority for RTP text packets. ; Register with our SIP provider... register=>kmpsipbos:tRQoNl1520@primary.siprovider.com [authentication] ; Example: ;auth=mark:topsecret@digium.com ; [basic-options](!) ; a template dtmfmode=rfc2833 context=from-office type=friend [natted-phone](!,basic-options) ; another template inheriting basic-options nat=yes directmedia=no host=dynamic [public-phone](!,basic-options) ; another template inheriting basic-options nat=no directmedia=yes [my-codecs](!) ; a template for my preferred codecs disallow=all allow=ilbc allow=g729 allow=gsm allow=g723 allow=ulaw [ulaw-phone](!) ; and another one for ulaw-only disallow=all allow=ulaw ;[polycom] ;type=friend ; Friends place calls and receive calls ;context=from-sip ; Context for incoming calls from this user ;secret=blahpoly ;host=dynamic ; This peer register with us ;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info ;defaultuser=polly ; Username to use in INVITE until peer registers ;defaultip=192.168.40.123 ; Normally you do NOT need to set this parameter ;disallow=all ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! ;progressinband=no ; Polycom phones don't work properly with "never" [phone1] type=friend host=dynamic secret= v6hVzxN7a context=localHome deny=0.0.0.0/0 permit=192.168.0.0/255.255.255.0 progressinband=yes ; Polycom phones don't work properly with "never" (started with "no") dtmfmode=inband mailbox=201@voiceMail directmedia=no ; Note: must be set on both legs to enable. callerid="Phone 1" <201> qualify=50 [ata] type=friend host=dynamic secret= zNttQR0l context=localHome deny=0.0.0.0/0 permit=192.168.0.0/255.255.255.0 progressinband=yes mailbox=202@voiceMail directmedia=no callerid="ATA Phones" <202> qualify=50 [trunkingProvider] type=peer context=incomingTrunk host=jfk-primary.sipprovider.com username=kmpsipbox secret= tRQoNl1520 qualify=yes allow=all directmedia=yes ; note: must be set on both legs to enable dtmfmode=rfc2833 rfc2833compensate=yes insecure=port,invite trustrpid=yes