Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; 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".
- ;-----------------------------------------------------------------------------------
- [authentication]
- ; Global credentials for outbound calls, i.e. when a proxy challenges your
- ; Asterisk server for authentication. These credentials override
- ; any credentials in peer/register definition if realm is matched.
- ;
- ; This way, Asterisk can authenticate for outbound calls to other
- ; realms. We match realm on the proxy challenge and pick an set of
- ; credentials from this list
- ; Syntax:
- ; auth = <user>:<secret>@<realm>
- ; auth = <user>#<md5secret>@<realm>
- ; Example:
- ;auth=mark:topsecret@digium.com
- ;
- ; You may also add auth= statements to [peer] definitions
- ; Peer auth= override all other authentication settings if we match on realm
- ;------------------------------------------------------------------------------
- ; DEVICE CONFIGURATION
- ;
- ; The SIP channel has two types of devices, the friend and the peer.
- ; * The type=friend is a device type that accepts both incoming and outbound calls,
- ; where Asterisk match on the From: username on incoming calls.
- ; (A synonym for friend is "user"). This is a type you use for your local
- ; SIP phones.
- ; * The type=peer also handles both incoming and outbound calls. On inbound calls,
- ; Asterisk only matches on IP/port, not on names. This is mostly used for SIP
- ; trunks.
- ;
- ; Use remotesecret for outbound authentication, and secret for authenticating
- ; inbound requests. For historical reasons, if no remotesecret is supplied for an
- ; outbound registration or call, the secret will be used.
- ;
- ; For device names, we recommend using only a-z, numerics (0-9) and underscore
- ;
- ; For local phones, type=friend works most of the time
- ;
- ; If you have one-way audio, you probably have NAT problems.
- ; If Asterisk is on a public IP, and the phone is inside of a NAT device
- ; you will need to configure nat option for those phones.
- ; Also, turn on qualify=yes to keep the nat session open
- ;
- ; Configuration options available
- ; --------------------
- ; context
- ; callingpres
- ; permit
- ; deny
- ; secret
- ; md5secret
- ; remotesecret
- ; transport
- ; dtmfmode
- ; directmedia
- ; nat
- ; callgroup
- ; pickupgroup
- ; language
- ; allow
- ; disallow
- ; insecure
- ; trustrpid
- ; progressinband
- ; promiscredir
- ; useclientcode
- ; accountcode
- ; setvar
- ; callerid
- ; amaflags
- ; callcounter
- ; busylevel
- ; allowoverlap
- ; allowsubscribe
- ; allowtransfer
- ; ignoresdpversion
- ; subscribecontext
- ; template
- ; videosupport
- ; maxcallbitrate
- ; rfc2833compensate
- ; mailbox
- ; session-timers
- ; session-expires
- ; session-minse
- ; session-refresher
- ; t38pt_usertpsource
- ; regexten
- ; fromdomain
- ; fromuser
- ; host
- ; port
- ; qualify
- ; defaultip
- ; defaultuser
- ; rtptimeout
- ; rtpholdtimeout
- ; sendrpid
- ; outboundproxy
- ; rfc2833compensate
- ; callbackextension
- ; registertrying
- ; timert1
- ; timerb
- ; qualifyfreq
- ; t38pt_usertpsource
- ; contactpermit ; Limit what a host may register as (a neat trick
- ; contactdeny ; is to register at the same IP as a SIP provider,
- ; ; then call oneself, and get redirected to that
- ; ; same location).
- ; directmediapermit
- ; directmediadeny
- ; unsolicited_mailbox
- ; use_q850_reason
- ; maxforwards
- ; encryption
- ;[sip_proxy]
- ; For incoming calls only. Example: FWD (Free World Dialup)
- ; We match on IP address of the proxy for incoming calls
- ; since we can not match on username (caller id)
- ;type=peer
- ;context=from-fwd
- ;host=fwd.pulver.com
- ;[sip_proxy-out]
- ;type=peer ; we only want to call out, not be called
- ;remotesecret=guessit ; Our password to their service
- ;defaultuser=yourusername ; Authentication user for outbound proxies
- ;fromuser=yourusername ; Many SIP providers require this!
- ;fromdomain=provider.sip.domain
- ;host=box.provider.com
- ;transport=udp,tcp ; This sets the default transport type to udp for outgoing, and will
- ; ; accept both tcp and udp. The default transport type is only used for
- ; ; outbound messages until a Registration takes place. During the
- ; ; peer Registration the transport type may change to another supported
- ; ; type if the peer requests so.
- ;usereqphone=yes ; This provider requires ";user=phone" on URI
- ;callcounter=yes ; Enable call counter
- ;busylevel=2 ; Signal busy at 2 or more calls
- ;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer
- ;port=80 ; The port number we want to connect to on the remote side
- ; Also used as "defaultport" in combination with "defaultip" settings
- ;--- sample definition for a provider
- ;[provider1]
- ;type=peer
- ;host=sip.provider1.com
- ;fromuser=4015552299 ; how your provider knows you
- ;remotesecret=youwillneverguessit ; The password we use to authenticate to them
- ;secret=gissadetdu ; The password they use to contact us
- ;callbackextension=123 ; Register with this server and require calls coming back to this extension
- ;transport=udp,tcp ; This sets the transport type to udp for outgoing, and will
- ; ; accept both tcp and udp. Default is udp. The first transport
- ; ; listed will always be used for outgoing connections.
- ;unsolicited_mailbox=4015552299 ; If the remote SIP server sends an unsolicited MWI NOTIFY message the new/old
- ; ; message count will be stored in the configured virtual mailbox. It can be used
- ; ; by any device supporting MWI by specifying <configured value>@SIP_Remote as the
- ; ; mailbox.
- ;
- ; Because you might have a large number of similar sections, it is generally
- ; convenient to use templates for the common parameters, and add them
- ; the the various sections. Examples are below, and we can even leave
- ; the templates uncommented as they will not harm:
- [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
- ; and finally instantiate a few phones
- ;
- ; [2133](natted-phone,my-codecs)
- ; secret = peekaboo
- ; [2134](natted-phone,ulaw-phone)
- ; secret = not_very_secret
- ; [2136](public-phone,ulaw-phone)
- ; secret = not_very_secret_either
- ; ...
- ;
- ; Standard configurations not using templates look like this:
- ;
- ;[grandstream1]
- ;type=friend
- ;context=from-sip ; Where to start in the dialplan when this phone calls
- ;callerid=John Doe <1234> ; Full caller ID, to override the phones config
- ; on incoming calls to Asterisk
- ;host=192.168.0.23 ; we have a static but private IP address
- ; No registration allowed
- ;nat=no ; there is not NAT between phone and Asterisk
- ;directmedia=yes ; allow RTP voice traffic to bypass Asterisk
- ;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
- ;call-limit=1 ; permit only 1 outgoing call and 1 incoming call at a time
- ; from the phone to asterisk (deprecated)
- ; 1 for the explicit peer, 1 for the explicit user,
- ; remember that a friend equals 1 peer and 1 user in
- ; memory
- ; There is no combined call counter for a "friend"
- ; so there's currently no way in sip.conf to limit
- ; to one inbound or outbound call per phone. Use
- ; the group counters in the dial plan for that.
- ;
- ;mailbox=1234@default ; mailbox 1234 in voicemail context "default"
- ;disallow=all ; need to disallow=all before we can use allow=
- ;allow=ulaw ; Note: In user sections the order of codecs
- ; listed with allow= does NOT matter!
- ;allow=alaw
- ;allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
- ;allow=g729 ; Pass-thru only unless g729 license obtained
- ;callingpres=allowed_passed_screen ; Set caller ID presentation
- ; See README.callingpres for more information
- ;[xlite1]
- ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
- ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
- ;type=friend
- ;regexten=1234 ; When they register, create extension 1234
- ;callerid="Jane Smith" <5678>
- ;host=dynamic ; This device needs to register
- ;nat=yes ; X-Lite is behind a NAT router
- ;directmedia=no ; Typically set to NO if behind NAT
- ;disallow=all
- ;allow=gsm ; GSM consumes far less bandwidth than ulaw
- ;allow=ulaw
- ;allow=alaw
- ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes
- ;registertrying=yes ; Send a 100 Trying when the device registers.
- ;[snom]
- ;type=friend ; Friends place calls and receive calls
- ;context=from-sip ; Context for incoming calls from this user
- ;secret=blah
- ;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions
- ;language=de ; Use German prompts for this user
- ;host=dynamic ; This peer register with us
- ;dtmfmode=inband ; Choices are inband, rfc2833, or info
- ;defaultip=192.168.0.59 ; IP used until peer registers
- ;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator
- ;subscribemwi=yes ; Only send notifications if this phone
- ; subscribes for mailbox notification
- ;vmexten=voicemail ; dialplan extension to reach mailbox
- ; sets the Message-Account in the MWI notify message
- ; defaults to global vmexten which defaults to "asterisk"
- ;disallow=all
- ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
- ;[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"
- ;[pingtel]
- ;type=friend
- ;secret=blah
- ;host=dynamic
- ;insecure=port ; Allow matching of peer by IP address without
- ; matching port number
- ;insecure=invite ; Do not require authentication of incoming INVITEs
- ;insecure=port,invite ; (both)
- ;qualify=1000 ; Consider it down if it's 1 second to reply
- ; Helps with NAT session
- ; qualify=yes uses default value
- ;qualifyfreq=60 ; Qualification: How often to check for the
- ; host to be up in seconds
- ; Set to low value if you use low timeout for
- ; NAT of UDP sessions
- ;
- ; Call group and Pickup group should be in the range from 0 to 63
- ;
- ;callgroup=1,3-4 ; We are in caller groups 1,3,4
- ;pickupgroup=1,3-5 ; We can do call pick-p for call group 1,3,4,5
- ;defaultip=192.168.0.60 ; IP address to use if peer has not registered
- ;deny=0.0.0.0/0.0.0.0 ; ACL: Control access to this account based on IP address
- ;permit=192.168.0.60/255.255.255.0
- ;permit=192.168.0.60/24 ; we can also use CIDR notation for subnet masks
- ;permit=2001:db8::/32 ; IPv6 ACLs can be specified if desired. IPv6 ACLs
- ; apply only to IPv6 addresses, and IPv4 ACLs apply
- ; only to IPv4 addresses.
- ;[cisco1]
- ;type=friend
- ;secret=blah
- ;qualify=200 ; Qualify peer is no more than 200ms away
- ;nat=yes ; This phone may be natted
- ; Send SIP and RTP to the IP address that packet is
- ; received from instead of trusting SIP headers
- ;host=dynamic ; This device registers with us
- ;directmedia=no ; Asterisk by default tries to redirect the
- ; RTP media stream (audio) to go directly from
- ; the caller to the callee. Some devices do not
- ; support this (especially if one of them is
- ; behind a NAT).
- ;defaultip=192.168.0.4 ; IP address to use until registration
- ;defaultuser=goran ; Username to use when calling this device before registration
- ; Normally you do NOT need to set this parameter
- ;setvar=CUSTID=5678 ; Channel variable to be set for all calls from or to this device
- ;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will
- ; cause the given audio file to
- ; be played upon completion of
- ; an attended transfer.
- ;[pre14-asterisk]
- ;type=friend
- ;secret=digium
- ;host=dynamic
- ;rfc2833compensate=yes ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine.
- ; You must have this turned on or DTMF reception will work improperly.
- ;t38pt_usertpsource=yes ; Use the source IP address of RTP as the destination IP address for UDPTL packets
- ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the
- ; external IP address of the remote device. If port forwarding is done at the client side
- ; then UDPTL will flow to the remote device.
- [voipon]
- type=peer
- defaultuser=105696_92
- secret=fryRitIafhaj9
- host=78.129.153.20
- context=inbound-calls
- ;insecure=port,invite ; only use this if necessary
- nat=no
- trustrpid=yes
- sendrpid=yes
- dtmfmode=rfc2833
- deny=0.0.0.0/0.0.0.0
- permit=78.129.153.20/255.255.255.255
- directmedia=no
- disallow=all
- allow=ulaw
- [bipul]
- type=friend
- host=dynamic
- secret=8109894836asdert
- context=phones
- callerid=Bipul <123>
- host=dynamic
- accountcode=123
- directmedia=no
- ;nat=yes
- qualify=no
- disallow=all
- allow=ulaw
- allow=alaw
- ;mailbox=123@default
Add Comment
Please, Sign In to add comment