[general]
context=default                 ; Default context for incoming calls. Defaults to 'default'
allowguest=no                   ; Allow or reject guest calls (default is yes)
;match_auth_username=yes        ; if available, match user entry using the 'username' field 
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
;allowoverlap=yes               ; Enable RFC3578 overlap dialing support.
;allowoverlap=dtmf              ; Enable overlap dialing support using DTMF delivery methods
;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)
;realm=192.168.1.199             ; Realm for digest authentication
;domainsasrealm=no              ; Use domains list as realms
;recordonfeature=automixmon	; Default feature to use when receiving 'Record: on' header
;recordofffeature=automixmon	; Default feature to use when receiving 'Record: off' header

udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; disallowed_methods = UPDATE
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)
;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)
;tcpauthtimeout = 30            ; tcpauthtimeout specifies the maximum seconds to authenticate.
;tcpauthlimit = 100             ; tcpauthlimit specifies the maximum of unauthenticated sessions
transport=udp                   ; Set the default transports.  The order determines
;srvlookup=no                    ; Enable DNS SRV lookups on outbound calls
;pedantic=yes                   ; Enable checking of tags in headers (defaults to "yes")

; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description
tos_sip=cs3; High-throughput, high-reliability, para senalizacion
tos_audio=ef; Expedited Forwarding para audio en RTP, low-delay, high-priority
tos_video=af41; Asured Forwarding para video
tos_text=af41; Asured Forwarding para RTP text packets

cos_sip=3; Sets 802.1p COS priority for VLAN header
cos_audio=5
cos_video=4
cos_text=3

;maxexpiry=3600                 ; Maximum allowed time of incoming registrations (seconds)
;minexpiry=60                   ; Minimum length of registrations (default 60)
;defaultexpiry=120              ; Default length of incoming/outgoing registration
;submaxexpiry=3600              ; Maximum allowed incoming subscriptions (s), default: maxexpiry
;subminexpiry=60                ; Minimum length of subscriptions, default: minexpiry
;mwiexpiry=3600                 ; Expiry time for outgoing MWI subscriptions
;maxforwards=70			; Setting for the SIP Max-Forwards: header (loop prevention)
;qualifyfreq=60                 ; Qualification: How often to check for the host to be up in seconds
;qualifygap=100			; Number of milliseconds between each group of peers being qualified
;qualifypeers=1			; Number of peers in a group to be qualified at the same time
;keepalive=60                   ; Interval at which keepalive packets should be sent to a peer
;notifymimetype=text/plain      ; Allow overriding of mime type in MWI NOTIFY
;buggymwi=no                    ; Cisco SIP firmware doesn't support the MWI RFC
;mwi_from=asterisk              ; When sending MWI NOTIFY requests, use this setting in the From:
;vmexten=voicemail              ; dialplan extension to reach mailbox sets the Message-Account

;preferred_codec_only=yes       ; Respond to a SIP invite with the single most preferred codec
;disallow=all                   ; First disallow all codecs
;allow=ulaw                     ; Allow codecs in order of preference
;allow=ilbc                     ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization
;autoframing=yes		; Set packetization based on the remote endpoint's (ptime)

mohinterpret=default
mohsuggest=default
;parkinglot=plaza               ; Sets the default parking lot for call parking

language=es                     ; Default language setting for all users/peers
tonezone=es			; Default tonezone for all users/peers
;relaxdtmf=yes                  ; Relax dtmf handling
;trustrpid = no                 ; If Remote-Party-ID should be trusted
;sendrpid = yes                 ; If Remote-Party-ID should be sent (defaults to no)
;sendrpid = rpid                ; Use the "Remote-Party-ID" header
;sendrpid = pai                 ; Use the "P-Asserted-Identity" header
;rpid_update = no               ; In certain cases, the only method by which a connected line
;prematuremedia=no              ; Some links send empty media frames before ringing (early media)
;progressinband=never           ; If we should generate in-band ringing always Default: never
;useragent=Asterisk PBX         ; Allows you to change the user agent string
;promiscredir = no              ; If yes, allows 302 or REDIR to non-local SIP address
;usereqphone = no               ; If yes, ";user=phone" is added to uri that contains a valid phone

dtmfmode=auto                   ; Set default dtmfmode: (auto) rfc2833 if offered, inband otherwise
;compactheaders = yes           ; send compact sip headers.
;videosupport=yes               ; Turn on support for SIP video.
;maxcallbitrate=384             ; Maximum bitrate for video calls (default 384 kb/s)
;callevents=no                  ; generate manager events when sip ua performs events (e.g. hold)
;authfailureevents=no           ; generate manager "peerstatus" events when peer can't authenticate
;alwaysauthreject = yes         ; always reject with an identical response ("yes" by default)
;auth_options_requests=yes      ; authenticate OPTIONS requests just like INVITE requests are.
accept_outofcall_message=no     ; Disable this option to reject all MESSAGE outside of a call
;outofcall_message_context=messages ; Context all out of dialog msgs are sent to.
;auth_message_requests = yes    ; Enabling this option will authenticate MESSAGE requests.

;g726nonstandard = yes          ; If the peer negotiates G726-32 audio, use AAL2 packing
;outboundproxy=proxy.provider.domain            ; send outbound signaling to this proxy
;outboundproxy=proxy.provider.domain:8080       ; send outbound signaling to this proxy
;outboundproxy=proxy.provider.domain,force      ; Send ALL outbound signalling to proxy
;outboundproxy=tls://proxy.provider.domain      ; same as '=proxy.provider.domain' with tls
;outboundproxy=192.0.2.1                        ; IPv4 address literal (default port is 5060)
;outboundproxy=2001:db8::1                      ; IPv6 address literal (default port is 5060)
;outboundproxy=192.168.0.2.1:5062               ; IPv4 address literal with explicit port
;outboundproxy=[2001:db8::1]:5062               ; IPv6 address literal with explicit port

;matchexternaddrlocally = yes     ; Only substitute the externaddr or externhost setting if it matches
;dynamic_exclude_static = yes   ; Disallow all dynamic hosts from registering

contactdeny=0.0.0.0/0.0.0.0           ; Use contactpermit and contactdeny to
;contactpermit=172.16.0.0/255.255.0.0  ; restrict at what IPs your users may
contactpermit=192.168.0.0/255.255.0.0 ; register their phones.
contactpermit=10.7.0.0/255.255.0.0
;contactacl=named_acl_example          ; Use named ACLs defined in acl.conf

;rtp_engine=asterisk            ; RTP engine to use when communicating with the device
;regcontext=sipregistrations
;regextenonqualify=yes          ; Default "no"
;legacy_useroption_parsing=yes	; Default "no"
send_diversion=yes              ; Default "yes"
;shrinkcallerid=yes     ; on by default
;use_q850_reason = no ; Default "no"
;refer_addheaders=yes	; on by default
;autocreatepeer=no             ; Allow any UAC not explicitly defined to register WITHOUT AUTH (!)


;------------------------ TLS settings ------------------------------------------------------------
;tlscertfile=</path/to/certificate.pem> ; Certificate file (*.pem format only) to use for TLS
;tlsprivatekey=</path/to/private.pem> ; Private key file (*.pem format only) for TLS connections.
;tlscafile=</path/to/certificate>
;tlscapath=</path/to/ca/dir>
;tlsdontverifyserver=[yes|no]         ; Default is no.
;tlscipher=<SSL cipher string>     ; http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
;tlsclientmethod=tlsv1     ; values include tlsv1, sslv3, sslv2. default is sslv2.

;--------------------------- SIP timers ----------------------------------------------------
;t1min=100                      ; Minimum roundtrip time for messages to monitored hosts
;timert1=500                    ; Default T1 timer
;timerb=32000                   ; Call setup timer. If a provisional response is not received

;--------------------------- RTP timers ----------------------------------------------------
;rtptimeout=60                  ; Terminate call if 60 seconds of no RTP or RTCP activity
;rtpholdtimeout=300             ; Terminate call if 300 seconds of no RTP or RTCP activity
;rtpkeepalive=<secs>            ; Send keepalives in the RTP stream to keep NAT open

;--------------------------- SIP Session-Timers (RFC 4028)------------------------------------
;session-timers=originate
;session-expires=600
;session-minse=90
;session-refresher=uac

;--------------------------- SIP DEBUGGING ---------------------------------------------------
;sipdebug = yes                 ; Turn on SIP debugging by default
;recordhistory=yes              ; Record SIP history by default
;dumphistory=yes                ; Dump SIP history at end of SIP dialogue

;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ----------------------------
allowsubscribe=yes              ; Disable support for subscriptions. (Default is yes)
subscribecontext=from-user     ; Set a specific context for SUBSCRIBE requests
;notifyringing = no             ; (default: yes)
;notifyhold = yes               ; Notify subscriptions on HOLD state (default: no)
;notifycid = yes                ; Control whether caller ID information is sent with dialog-info+xml
callcounter=yes              ; Enable call counters on devices. This can be set per device too.

;----------------------------------------- T.38 FAX SUPPORT ----------------------------------
; It defaults to off. We can activate it per peer
; t38pt_udptl = yes            ; Enables T.38 with FEC error correction.
; t38pt_udptl = yes,fec        ; Enables T.38 with FEC error correction.
; t38pt_udptl = yes,redundancy ; Enables T.38 with redundancy error correction.
; t38pt_udptl = yes,none       ; Enables T.38 with no error correction.
; t38pt_udptl = yes,fec,maxdatagram=400 ; overrides send 400 byte T.38 FAX packets to it.

; FAX detection will cause the SIP channel to jump to the 'fax' extension (if it exists)
; faxdetect = yes		; Default 'no', 'yes' enables both CNG and T.38 detection
; faxdetect = cng		; Enables only CNG tone detection
; faxdetect = t38		; Enables only T.38 re-INVITE detection


;----------------------------------------- OUTBOUND MWI SUBSCRIPTIONS -------------------------
; Asterisk can subscribe to receive the MWI from another SIP server and store it locally
;       mwi => user[:secret[:authuser]]@host[:port]/mailbox
; MWI received will be stored in the mailbox of the SIP_Remote context. It can be used by phones:
; mailbox=1234@SIP_Remote

;----------------------------------------- NAT SUPPORT ------------------------
;   IF LOCALNET IS NOT SET, THE EXTERNAL ADDRESS WILL NOT BE SET CORRECTLY.
;   Multiple entries are allowed, e.g. a reasonable set is the following:
;
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=169.254.0.0/255.255.0.0 ; Zero conf local network

; + the "externally visible" address and port number to be used (mutually exclusive parameters):
	;   a. "externaddr = hostname[:port]" specifies a static address[:port] to be used in SIP and SDP
	;externaddr = 12.34.56.78:9900     ; use this address and port.
	;
	;   b. "externhost = hostname[:port]" the hostname is looked up every "externrefresh" seconds
	;externhost=foo.dyndns.net       ; refreshed periodically
	;externrefresh=180               ; change the refresh interval

	;nat=no
	;   nat = no                ; Do no special NAT handling other than RFC3581
	;   nat = force_rport       ; Pretend there was an rport parameter even if there wasn't
	;   nat = comedia           ; Send media to the port Asterisk received it from
	;   nat = auto_force_rport  ; Set the force_rport option if Asterisk detects NAT (default)
	;   nat = auto_comedia      ; Set the comedia option if Asterisk detects NAT
	;
	; Asterisk *always* uses 'symmetric RTP' mode as defined by RFC 4961;

	; media_address = 172.16.42.1
	;subscribe_network_change_event=yes ; on by default to use the res_stun_monitor module
	; icesupport = yes ; It is disabled by default. 

	;----------------------------------- MEDIA HANDLING --------------------------------
	;directmedia=yes      ; Asterisk by default tries to redirect the RTP media stream
	;directmedia=nonat     ; Allow media path redirection only when the peer is not behind a NAT
	;directmedia=update   ; Use UPDATE for media path redirection instead of INVITE.
	; This can be combined with 'nonat', as 'directmedia=update,nonat'.
	;directmedia=outgoing ; When sending directmedia reinvites, do not send an immediate reinvite...
	;directrtpsetup=yes   ; Enable the new experimental direct RTP setup. This sets up without re-invites.

	;directmediadeny=0.0.0.0/0      ; Use directmediapermit and directmediadeny to restrict 
	;directmediapermit=172.16.0.0/16; which peers should be able to pass directmedia to each other
	;directmediaacl=acl_example     ; Use named ACLs defined in acl.conf

	;ignoresdpversion=yes  ; By default, Asterisk will honor the session version number in SDP packets
	;sdpsession=Asterisk PBX   ; Allows you to change the SDP session name string, (s=)
	;sdpowner=root             ; Allows you to change the username field in the SDP owner string, (o=)

	;encryption=yes             ; Whether to offer SRTP encrypted media (and only SRTP encrypted media)
	;encryption_taglen=80      ; Set the auth tag length offered in the INVITE either 32/80 default 80
	;
	;avpf=yes                  ; Enable inter-operability with media streams using the AVPF RTP profile.


	;----------------------------------------- REALTIME SUPPORT ------------------------
	; For additional information on ARA, the Asterisk Realtime Architecture,
	; please read https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
	;
	rtcachefriends=yes             ; Cache realtime friends by adding them to the internal list
	;rtsavesysname=yes              ; Save systemname in realtime database at registration. Default= no
	;rtupdate=yes                   ; Send registry updates to database using realtime? (yes)
	;rtautoclear=yes                ; Auto-Expire friends created on the fly on the register expire period
	;ignoreregexpire=yes            ; the existing information will be used in spite of it having expired

	;----------------------------------------- SIP DOMAIN SUPPORT ------------------------
	; Incoming INVITE and REFER messages can be matched against a list of 'allowed'
	; domains, each of which can direct the call to a specific context if desired.
	; By default, all domains are accepted and sent to the default context or the
	; context associated with the user/peer placing the call.
	; REGISTER to non-local domains will be automatically denied if a domain
	; list is configured.
	;
	; Domains can be specified using:
	; domain=<domain>[,<context>]
	; Examples:
	; domain=myasterisk.dom
	; domain=customer.com,customer-context
	;
	; In addition, all the 'default' domains associated with a server should be
	; added if incoming request filtering is desired.
	; autodomain=yes
	;
	; To disallow requests for domains not serviced by this server:
	; allowexternaldomains=no

	;domain=mydomain.tld,mydomain-incoming
	; Add domain and configure incoming context
	; for external calls to this domain
	;domain=1.2.3.4                 ; Add IP address as local domain
	; You can have several "domain" settings
	;allowexternaldomains=no        ; Disable INVITE and REFER to non-local domains
	; Default is yes
	;autodomain=yes                 ; Turn this on to have Asterisk add local host
	; name and local IP to domain list.

	; fromdomain=mydomain.tld       ; When making outbound SIP INVITEs to
	; non-peers, use your primary domain "identity"
	; for From: headers instead of just your IP
	; address. This is to be polite and
	; it may be a mandatory requirement for some
	; destinations which do not have a prior
	; account relationship with your server.

	;------------------------------ Advice of Charge CONFIGURATION --------------------------
	; snom_aoc_enabled = yes;     ; This options turns on and off support for sending AOC-D and
	; AOC-E to snom endpoints.  This option can be used both in the
	; peer and global scope.  The default for this option is off.


	;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
	jbenable=yes              ; Enables the use of a jitterbuffer on the receiving side of a
	; SIP channel. Defaults to "no". An enabled jitterbuffer will
	; be used only if the sending side can create and the receiving
	; side can not accept jitter. The SIP channel can accept jitter,
	; thus a jitterbuffer on the receive SIP side will be used only
	; if it is forced and enabled.

	; jbforce = no                ; Forces the use of a jitterbuffer on the receive side of a SIP
	; channel. Defaults to "no".

	; jbmaxsize = 200             ; Max length of the jitterbuffer in milliseconds.

	; jbresyncthreshold = 1000    ; Jump in the frame timestamps over which the jitterbuffer is
	; resynchronized. Useful to improve the quality of the voice, with
	; big jumps in/broken timestamps, usually sent from exotic devices
	; and programs. Defaults to 1000.

	; jbimpl = fixed              ; Jitterbuffer implementation, used on the receiving side of a SIP
	; channel. Two implementations are currently available - "fixed"
	; (with size always equals to jbmaxsize) and "adaptive" (with
			; variable size, actually the new jb of IAX2). Defaults to fixed.

	; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
	; The option represents the number of milliseconds by which the new jitter buffer
	; will pad its size. the default is 40, so without modification, the new
	; jitter buffer will set its size to the jitter value plus 40 milliseconds.
	; increasing this value may help if your network normally has low jitter,
	; but occasionally has spikes.

	; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".


	;------------------------------------------------------------------------------
	; DTLS-SRTP CONFIGURATION
	;
	; DTLS-SRTP support is available if the underlying RTP engine in use supports it.
	;
	; dtlsenable = yes                   ; Enable or disable DTLS-SRTP support
	; dtlsverify = yes                   ; Verify that the provided peer certificate is valid
	; dtlsrekey = 60                     ; Interval at which to renegotiate the TLS session and rekey the SRTP session
	;                                    ; If this is not set or the value provided is 0 rekeying will be disabled
	; dtlscertfile = file                ; Path to certificate file to present
	; dtlsprivatekey = file              ; Path to private key for certificate file
	; dtlscipher = <SSL cipher string>   ; Cipher to use for TLS negotiation
	;                                    ; A list of valid SSL cipher strings can be found at:
	;                                    ; http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
	; dtlscafile = file                  ; Path to certificate authority certificate
	; dtlscapath = path                  ; Path to a directory containing certificate authority certificates
	; dtlssetup = actpass                ; Whether we are willing to accept connections, connect to the other party, or both.
	;                                    ; Valid options are active (we want to connect to the other party), passive (we want to
			;                                    ; accept connections only), and actpass (we will do both). This value will be used in
	;                                    ; the outgoing SDP when offering and for incoming SDP offers when the remote party sends
	;                                    ; actpass





	;----------------------------------------- OUTBOUND SIP REGISTRATIONS  ------------------------
	; Format for the register statement is:
	; register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
	; register => username:secret@host/callbackextension
	;register => 1234:password@mysipprovider.com
	;register => 2345:password@sip_proxy/1234
	;register => 3456@mydomain:5082::@mysipprovider.com
	;register => tls://username:xxxxxx@sip-tls-proxy.example.org

	;registertimeout=20             ; retry registration calls every 20 seconds (default)
	;registerattempts=10            ; Number of registration attempts before we give up
	; 0 = continue forever, hammering the other server
	; until it accepts the registration
	; Default is 0 tries, continue forever



	;----- REGISTRO NEOTEL -----
	;register => 2000:supersecret@sip1.neotel2000.com
	;register => 2000:supersecret@sip3.neotel2000.com


	;-----------------------------------------------------------------------------------

[authentication]
; Syntax:
;        auth = <user>:<secret>@<realm>
;        auth = <user>#<md5secret>@<realm>
; You may also add auth= statements to [peer] definitions


;------------------------- TEMPLATES ---------------------------------

[user](!)
type=friend
context=from-user
host=dynamic
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.0.0
accountcode=UNKNOWN
callerid="User" <500>
qualify=yes
subscribemwi=yes
call-limit=4
dtmfmode=rfc2833
nat=no
;subscribecontext=BLF_Group_1
disallow=all
;allow=alaw
allow=g722
;allow=ulaw
;allow=g726
;allow=g726aal2
;allow=gsm
canreinvite=no

[faxmachine](!,user)
context=from-fax
;faxdetect=yes
disallow=all
allow=alaw
t38pt_udptl=yes,redundancy

[provider](!)
type=peer
context=incoming
host=dynamic
accountcode=incoming
qualify=yes
dtmfmode=rfc2833
nat=no




;------------------------- USERS -------------------------------------





