Compare commits

...

6 Commits

Author SHA1 Message Date
Your Name
be294efecf Use gsm because of questionable uplink 2020-12-30 21:44:31 +00:00
Your Name
b4d23900f2 Fix ChanSpy volume 2020-12-28 11:17:49 +00:00
Your Name
6246fa4628 Adjust ChanSpy volume 2020-12-27 21:04:56 +00:00
Your Name
6f7b3cb170 Configure moh class default
The default classed is used during transfers
2020-12-27 19:43:46 +00:00
Your Name
bcac336947 sip: Disable directmedia and directrtp 2020-12-27 18:25:16 +00:00
Your Name
4016b4603d Run most parts on Hetzner server at DC 2020-12-27 02:47:52 +00:00
8 changed files with 813 additions and 40 deletions

View File

@@ -273,7 +273,7 @@ state.SB {
control.16 { control.16 {
iface MIXER iface MIXER
name 'Master Playback Volume' name 'Master Playback Volume'
value 57 value 64
comment { comment {
access 'read write' access 'read write'
type INTEGER type INTEGER
@@ -281,7 +281,7 @@ state.SB {
range '0 - 64' range '0 - 64'
dbmin -6400 dbmin -6400
dbmax 0 dbmax 0
dbvalue.0 -700 dbvalue.0 0
} }
} }
control.17 { control.17 {

View File

@@ -781,7 +781,7 @@ same => n,Goto(1,1)
[auction-spy] [auction-spy]
exten => s,1,Noop() exten => s,1,Noop()
same => n,ChanSpy(SIP/22,bq) same => n,ChanSpy(SIP/22,bqv(2))
[bidding-announce] [bidding-announce]
exten => s,1,Wait(1) exten => s,1,Wait(1)
@@ -801,7 +801,12 @@ same => n,Hangup()
[local] [local]
exten => _22X,1,Dial(SIP/${EXTEN:1}) exten => _22X,1,Dial(SIP/${EXTEN:1})
same => n,Hangup
exten => _X.,1,Dial(IAX2/hetzner/${EXTEN})
same => n,Hangup
[oldlocal]
exten => _0X.,1,Goto(to-eventphone,${EXTEN:1},1) exten => _0X.,1,Goto(to-eventphone,${EXTEN:1},1)
; Open bidding, read start bid ; Open bidding, read start bid
@@ -845,3 +850,8 @@ same => n,Hangup()
[to-eventphone] [to-eventphone]
exten => _X.,1,SET(CALLERID(all)="Teleshop" <7467>) exten => _X.,1,SET(CALLERID(all)="Teleshop" <7467>)
same => n,Dial(SIP/${EXTEN}@eventphone) same => n,Dial(SIP/${EXTEN}@eventphone)
[fromhetzner]
exten => _2X,1,Originate(Console/dsp,exten,auction-spy,s,1,,a)
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()

View File

@@ -26,13 +26,13 @@ servername=Asterisk
; Whether HTTP/HTTPS interface is enabled or not. Default is no. ; Whether HTTP/HTTPS interface is enabled or not. Default is no.
; This also affects manager/rawman/mxml access (see manager.conf) ; This also affects manager/rawman/mxml access (see manager.conf)
; ;
enabled=yes ;enabled=yes
; ;
; Address to bind to, both for HTTP and HTTPS. You MUST specify ; Address to bind to, both for HTTP and HTTPS. You MUST specify
; a bindaddr in order for the HTTP server to run. There is no ; a bindaddr in order for the HTTP server to run. There is no
; default value. ; default value.
; ;
bindaddr=0.0.0.0 ;bindaddr=0.0.0.0
; ;
; Port to bind to for HTTP sessions (default is 8088) ; Port to bind to for HTTP sessions (default is 8088)
; ;

680
iax.conf Normal file
View File

@@ -0,0 +1,680 @@
;
; Inter-Asterisk eXchange v2 (IAX2) Channel Driver configuration
;
; This configuration is read when the chan_iax2.so module is loaded, and is
; re-read when the module is reloaded, such as when invoking the CLI command:
;
; *CLI> iax2 reload
;
; General settings, like port number to bind to, and an option address (the
; default is to bind to all local addresses).
[general]
; Listener Addresses
;
; Use the 'bindaddr' and 'bindport' options to specify on which address and port
; the IAX2 channel driver will listen for incoming requests.
;
;
;bindport=4569 ; The default port to listen on
; NOTE: bindport must be specified BEFORE bindaddr or
; may be specified on a specific bindaddr if followed by
; colon and port (e.g. bindaddr=192.168.0.1:4569) or for
; IPv6 the address needs to be in brackets then colon
; and port (e.g. bindaddr=[2001:db8::1]:4569).
bindaddr=172.19.27.1 ; You can specify 'bindaddr' more than once to bind to
; multiple addresses, but the first will be the
; default. IPv6 addresses are accepted.
;
; Set 'iaxcompat' to yes if you plan to use layered switches or some other
; scenario which may cause some delay when doing a lookup in the dialplan. It
; incurs a small performance hit to enable it. This option causes Asterisk to
; spawn a separate thread when it receives an IAX2 DPREQ (Dialplan Request)
; instead of blocking while it waits for a response.
;
; Accepted values: yes, no
; Default value: no
;
;iaxcompat=yes
;
;
; Disable UDP checksums (if nochecksums is set, then no checkums will
; be calculated/checked on systems supporting this feature)
;
; Accepted values: yes, no
; Default value: no
;
;nochecksums=yes
;
;
; For increased security against brute force password attacks enable
; 'delayreject' which will delay the sending of authentication reject for REGREQ
; or AUTHREP if there is a password.
;
; Accepted values: yes, no
; Default value: no
;
;delayreject=yes
;
;
; You may specify a global default AMA flag for iaxtel calls. These flags are
; used in the generation of call detail records.
;
; Accepted values: default, omit, billing, documentation
; Default value: default
;
;amaflags=billing
;
;
; ADSI (Analog Display Services Interface) can be enabled if you have (or may
; have) ADSI compatible CPE equipment.
;
; Accepted values: yes, no
; Default value: no
;
;adsi=yes
;
;
; Whether or not to perform an SRV lookup on outbound calls.
;
; Accepted values: yes, no
; Default value: no
;
;srvlookup=yes
;
;
; You may specify a default account for Call Detail Records (CDRs) in addition to
; specifying on a per-user basis.
;
; Accepted values: Any string value up to 19 characters in length
; Default value: <empty>
;
;accountcode=lss0101
;
;
; You may specify a global default language for users. This can be specified
; also on a per-user basis. If omitted, will fallback to English (en).
;
; Accepted values: A language tag such as 'en' or 'es'
; Default value: en
;
;language=en
;
;
; This option specifies a preference for which music-on-hold class this channel
; should listen to when put on hold if the music class has not been set on the
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
; channel putting this one on hold did not suggest a music class.
;
; If this option is set to "passthrough", then the hold message will always be
; passed through as signalling instead of generating hold music locally.
;
; This option may be specified globally, or on a per-user or per-peer basis.
;
; Accepted values: passthrough, or any music-on-hold class name
; Default value: <empty>
;
;mohinterpret=default
;
;
; The 'mohsuggest' option specifies which music on hold class to suggest to the
; peer channel when this channel places the peer on hold. It may be specified
; globally or on a per-user or per-peer basis.
;
;mohsuggest=default
;
;
; Specify bandwidth of low, medium, or high to control which codecs are used
; in general.
;
bandwidth=low
;
;
; You can also fine tune codecs here using "allow" and "disallow" clauses with
; specific codecs. Use "all" to represent all formats.
;
disallow=all
allow=gsm
;disallow=g723.1
;disallow=lpc10
;allow=gsm
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Jitter Buffer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; You can adjust several parameters relating to the jitter buffer. The jitter
; buffer's function is to compensate for varying network delay.
;
; All of the jitter buffer settings are in milliseconds. The jitter buffer
; works for INCOMING audio only - the outbound audio will be dejittered by the
; jitter buffer at the other end.
;
; jitterbuffer=yes|no: global default as to whether you want
; the jitter buffer at all.
;
; maxjitterbuffer: a maximum size for the jitter buffer.
; Setting a reasonable maximum here will prevent the call delay
; from rising to silly values in extreme situations; you'll hear
; SOMETHING, even though it will be jittery.
;
; resyncthreshold: when the jitterbuffer notices a significant change in delay
; that continues over a few frames, it will resync, assuming that the change in
; delay was caused by a timestamping mix-up. The threshold for noticing a
; change in delay is measured as twice the measured jitter plus this resync
; threshold.
; Resyncing can be disabled by setting this parameter to -1.
;
; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer
; should return in a row. Since some clients do not send CNG/DTX frames to
; indicate silence, the jitterbuffer will assume silence has begun after
; returning this many interpolations. This prevents interpolating throughout
; a long silence.
;
; jittertargetextra: 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.
;
jitterbuffer=no
;maxjitterbuffer=1000
;maxjitterinterps=10
;resyncthreshold=1000
;jittertargetextra=40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; IAX2 Encryption
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Enable IAX2 encryption. The default is no.
;
;encryption=yes
;
;
; Force encryption insures no connection is established unless both sides
; support encryption. By turning this option on, encryption is automatically
; turned on as well. The default is no.
;
;forceencryption=yes
;
; This option defines the maximum payload in bytes an IAX2 trunk can support at
; a given time. The best way to explain this is to provide an example. If the
; maximum number of calls to be supported is 800, and each call transmits 20ms
; frames of audio using ulaw:
;
; (8000hz / 1000ms) * 20ms * 1 byte per sample = 160 bytes per frame
;
; The maximum load in bytes is:
;
; (160 bytes per frame) * (800 calls) = 128000 bytes
;
; Once this limit is reached, calls may be dropped or begin to lose audio.
; Depending on the codec in use and number of channels to be supported this value
; may need to be raised, but in most cases the default value is large enough.
;
; trunkmaxsize = 128000 ; defaults to 128000 bytes, which supports up to 800
; calls of ulaw at 20ms a frame.
; With a large amount of traffic on IAX2 trunks, there is a risk of bad voice
; quality when allowing the Linux system to handle fragmentation of UDP packets.
; Depending on the size of each payload, allowing the OS to handle fragmentation
; may not be very efficient. This setting sets the maximum transmission unit for
; IAX2 UDP trunking. The default is 1240 bytes which means if a trunk's payload
; is over 1240 bytes for every 20ms it will be broken into multiple 1240 byte
; messages. Zero disables this functionality and let's the OS handle
; fragmentation.
;
; trunkmtu = 1240 ; trunk data will be sent in 1240 byte messages.
; trunkfreq sets how frequently trunk messages are sent in milliseconds. This
; value is 20ms by default, which means the trunk will send all the data queued
; to it in the past 20ms. By increasing the time between sending trunk messages,
; the trunk's payload size will increase as well. Note, depending on the size
; set by trunkmtu, messages may be sent more often than specified. For example
; if a trunk's message size grows to the trunkmtu size before 20ms is reached
; that message will be sent immediately. Acceptable values are between 10ms and
; 1000ms.
;
; trunkfreq=20 ; How frequently to send trunk msgs (in ms). This is 20ms by
; default.
; Should we send timestamps for the individual sub-frames within trunk frames?
; There is a small bandwidth use for these (less than 1kbps/call), but they
; ensure that frame timestamps get sent end-to-end properly. If both ends of
; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame
; length for your codecs, you can probably suppress these. The receiver must
; also support this feature, although they do not also need to have it enabled.
;
; trunktimestamps=yes
; Minimum and maximum amounts of time that IAX2 peers can request as a
; registration expiration interval (in seconds).
; minregexpire = 60
; maxregexpire = 60
; IAX2 helper threads
; Establishes the number of iax helper threads to handle I/O.
; iaxthreadcount = 10
; Establishes the number of extra dynamic threads that may be spawned to handle I/O
; iaxmaxthreadcount = 100
;
; We can register with another IAX2 server to let him know where we are
; in case we have a dynamic IP address for example
;
; Register with tormenta using username marko and password secretpass
;
;register => marko:secretpass@tormenta.linux-support.net
;
; Register joe at remote host with no password
;
;register => joe@remotehost:5656
;
; Register marko at tormenta.linux-support.net using RSA key "torkey"
;
;register => marko:[torkey]@tormenta.linux-support.net
;
; Sample Registration for iaxtel
;
; Visit http://www.iaxtel.com to register with iaxtel. Replace "user"
; and "pass" with your username and password for iaxtel. Incoming
; calls arrive at the "s" extension of "default" context.
;
;register => user:pass@iaxtel.com
;
; Sample Registration for IAX2 + FWD
;
; To register using IAX2 with FWD, it must be enabled by visiting the URL
; http://www.fwdnet.net/index.php?section_id=112
;
; Note that you need an extension in you default context which matches
; your free world dialup number. Please replace "FWDNumber" with your
; FWD number and "passwd" with your password.
;
;register => FWDNumber:passwd@iax.fwdnet.net
;
; Through the use of the res_stun_monitor module, Asterisk has the ability to detect when the
; perceived external network address has changed. When the stun_monitor is installed and
; configured, chan_iax will renew all outbound registrations when the monitor detects any sort
; of network change has occurred. By default this option is enabled, but only takes effect once
; res_stun_monitor is configured. If res_stun_monitor is enabled and you wish to not
; generate all outbound registrations on a network change, use the option below to disable
; this feature.
;
; subscribe_network_change_event = yes ; on by default
;
; You can enable authentication debugging to increase the amount of
; debugging traffic.
;
;authdebug = yes
;
; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters.
;tos=ef
;cos=5
;
; If regcontext is specified, Asterisk will dynamically create and destroy
; a NoOp priority 1 extension for a given peer who registers or unregisters
; with us. The actual extension is the 'regexten' parameter of the registering
; peer or its name if 'regexten' is not provided. More than one regexten
; may be supplied if they are separated by '&'. Patterns may be used in
; regexten.
;
;regcontext=iaxregistrations
;
; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
; then we cancel the whole thing (that's enough time for one retransmission
; only). This is used to keep things from stalling for a long time for a host
; that is not available, but would be ill advised for bad connections. In
; addition to 'yes' or 'no' you can also specify a number of milliseconds.
; See 'qualify' for individual peers to turn on for just a specific peer.
;
autokill=yes
;
; codecpriority controls the codec negotiation of an inbound IAX2 call.
; This option is inherited to all user entities. It can also be defined
; in each user entity separately which will override the setting in general.
;
; The valid values are:
;
; caller - Consider the callers preferred order ahead of the host's.
; host - Consider the host's preferred order ahead of the caller's.
; disabled - Disable the consideration of codec preference altogether.
; (this is the original behaviour before preferences were added)
; reqonly - Same as disabled, only do not consider capabilities if
; the requested format is not available the call will only
; be accepted if the requested format is available.
;
; The default value is 'host'
;
;codecpriority=host
;
; allowfwdownload controls whether this host will serve out firmware to
; IAX2 clients which request it. This has only been used for the IAXy,
; and it has been recently proven that this firmware distribution method
; can be used as a source of traffic amplification attacks. Also, the
; IAXy firmware has not been updated for at least 18 months, so unless
; you are provisioning IAXys in a secure network, we recommend that you
; leave this option to the default, off.
;
;allowfwdownload=yes
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
; just like friends added from the config file only on a
; as-needed basis? (yes|no)
;rtsavesysname=yes ; Save systemname in realtime database at registration
; Default = no
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
; If set to yes, when a IAX2 peer registers successfully,
; the IP address, the origination port, the registration period,
; and the username of the peer will be set to database via realtime.
; If not present, defaults to 'yes'.
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
; as if it had just registered? (yes|no|<seconds>)
; If set to yes, when the registration expires, the friend will
; vanish from the configuration until requested again.
; If set to an integer, friends expire within this number of
; seconds instead of the registration interval.
;rtignoreregexpire=yes ; When reading a peer from Realtime, if the peer's registration
; has expired based on its registration interval, used the stored
; address information regardless. (yes|no)
;parkinglot=edvina ; Default parkinglot for IAX2 peers and users
; This can also be configured per device
; Parkinglots are defined in features.conf
;
; The following two options are used to disable call token validation for the
; purposes of interoperability with IAX2 endpoints that do not yet support it.
;
; Call token validation can be set as optional for a single IP address or IP
; address range by using the 'calltokenoptional' option. 'calltokenoptional' is
; only a global option.
;
;calltokenoptional=209.16.236.73/255.255.255.0
;
; By setting 'requirecalltoken=no', call token validation becomes optional for
; that peer/user. By setting 'requirecalltoken=auto', call token validation
; is optional until a call token supporting peer registers successfully using
; call token validation. This is used as an indication that from now on, we
; can require it from this peer. So, requirecalltoken is internally set to yes.
; requirecalltoken may only be used in peer/user/friend definitions,
; not in the global scope.
; By default, 'requirecalltoken=yes'.
;
;requirecalltoken=no
;
; Maximum time allowed for call token authentication handshaking. Default is 10 seconds.
; Use higher values in lagged or high packet loss networks.
;
;calltokenexpiration=10
;
; These options are used to limit the amount of call numbers allocated to a
; single IP address. Before changing any of these values, it is highly encouraged
; to read the user guide associated with these options first. In most cases, the
; default values for these options are sufficient.
;
; The 'maxcallnumbers' option limits the amount of call numbers allowed for each
; individual remote IP address. Once an IP address reaches it's call number
; limit, no more new connections are allowed until the previous ones close. This
; option can be used in a peer definition as well, but only takes effect for
; the IP of a dynamic peer after it completes registration.
;
;maxcallnumbers=512
;
; The 'maxcallnumbers_nonvalidated' is used to set the combined number of call
; numbers that can be allocated for connections where call token validation
; has been disabled. Unlike the 'maxcallnumbers' option, this limit is not
; separate for each individual IP address. Any connection resulting in a
; non-call token validated call number being allocated contributes to this
; limit. For use cases, see the call token user guide. This option's
; default value of 8192 should be sufficient in most cases.
;
;maxcallnumbers_nonvalidated=1024
;
; The [callnumberlimits] section allows custom call number limits to be set
; for specific IP addresses and IP address ranges. These limits take precedence
; over the global 'maxcallnumbers' option, but may still be overridden by a
; peer defined 'maxcallnumbers' entry. Note that these limits take effect
; for every individual address within the range, not the range as a whole.
;
;[callnumberlimits]
;10.1.1.0/255.255.255.0 = 24
;10.1.2.0/255.255.255.0 = 32
;
; The shrinkcallerid function removes '(', ' ', ')', non-trailing '.', and '-' not
; in square brackets. For example, the Caller*ID value 555.5555 becomes 5555555
; when this option is enabled. Disabling this option results in no modification
; of the Caller*ID value, which is necessary when the Caller*ID represents something
; that must be preserved. This option can only be used in the [general] section.
; By default this option is on.
;
;shrinkcallerid=yes ; on by default
;; Guest sections for unauthenticated connection attempts. Just specify an
;; empty secret, or provide no secret section.
;;
;[guest]
;type=user
;context=public
;callerid="Guest IAX User"
;
;;
;; Trust Caller*ID Coming from iaxtel.com
;;
;[iaxtel]
;type=user
;context=default
;auth=rsa
;inkeys=iaxtel
;
;;
;; Trust Caller*ID Coming from iax.fwdnet.net
;;
;[iaxfwd]
;type=user
;context=default
;auth=rsa
;inkeys=freeworlddialup
;
;
; Trust Caller*ID delivered over DUNDi/e164
;
;[dundi]
;type=user
;dbsecret=dundi/secret
;context=dundi-e164-local
;
; Further user sections may be added, specifying a context and a secret used
; for connections with that given authentication name. Limited IP based
; access control is allowed by use of "permit", "deny", and "acl" keywords.
; Multiple rules are permitted. Multiple permitted contexts may be specified,
; in which case the first will be the default. You can also override
; Caller*ID so that when you receive a call you set the Caller*ID to be what
; you want instead of trusting what the remote user provides
;
; There are three authentication methods that are supported: md5, plaintext,
; and rsa. The least secure is "plaintext", which sends passwords cleartext
; across the net. "md5" uses a challenge/response md5 sum arrangement, but
; still requires both ends have plain text access to the secret. "rsa" allows
; unidirectional secret knowledge through public/private keys. If "rsa"
; authentication is used, "inkeys" is a list of acceptable public keys on the
; local system that can be used to authenticate the remote peer, separated by
; the ":" character. "outkey" is a single, private key to use to authenticate
; to the other side. Public keys are named /var/lib/asterisk/keys/<name>.pub
; while private keys are named /var/lib/asterisk/keys/<name>.key. Private
; keys should always be 3DES encrypted.
;
;
; NOTE: All hostnames and IP addresses in this file are for example purposes
; only; you should not expect any of them to actually be available for
; your use.
;
;[markster]
;type=user
;context=default
;context=local
;auth=md5,plaintext,rsa
;secret=markpasswd
;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will
; cause the given audio file to
; be played upon completion of
; an attended transfer to the
; target of the transfer.
;dbsecret=mysecrets/place ; Secrets can be stored in astdb, too
;transfer=no ; Disable IAX2 native transfer
;transfer=mediaonly ; When doing IAX2 native transfers, transfer only
; the media stream
;jitterbuffer=yes ; Override the global setting and enable the jitter
; buffer for this user
;maxauthreq=10 ; Set the maximum number of outstanding AUTHREQs
; waiting for replies. If this limit is reached,
; any further authentication will be blocked, until
; the pending requests expire or a reply is
; received.
;callerid="Mark Spencer" <(256) 428-6275>
;deny=0.0.0.0/0.0.0.0
;accountcode=markster0101
;permit=209.16.236.73/255.255.255.0
;language=en ; Use english as default language
;encryption=yes ; Enable IAX2 encryption. The default is no.
;keyrotate=off ; This is a compatibility option for older versions
; of IAX2 that do not support key rotation with
; encryption. This option will disable the
; IAX_COMMAND_RTENC message. The default is on.
;
; Peers may also be specified, with a secret and a remote hostname.
;
;[demo]
;type=peer
;username=asterisk
;secret=supersecret
;host=192.168.10.10
;description=My IAX2 Peer ; Description of this peer, as listed by
; 'iax2 show peers'
;sendani=no
;host=asterisk.linux-support.net
;port=5036
;mask=255.255.255.255
;qualify=yes ; Make sure this peer is alive.
;qualifysmoothing = yes ; Use an average of the last two PONG results to
; reduce falsely detected LAGGED hosts. The default
; is 'no.'
;qualifyfreqok = 60000 ; How frequently to ping the peer when everything
; seems to be OK, in milliseconds.
;qualifyfreqnotok = 10000 ; How frequently to ping the peer when it's either
; LAGGED or UNAVAILABLE, in milliseconds.
;jitterbuffer=no ; Turn off jitter buffer for this peer
;
;encryption=yes ; Enable IAX2 encryption. The default is no.
;keyrotate=off ; This is a compatibility option for older versions
; of IAX2 that do not support key rotation with
; encryption. This option will disable the
; IAX_COMMAND_RTENC message. The default is 'on.'
; Peers can remotely register as well, so that they can be mobile. Default
; IPs can also optionally be given but are not required. Caller*ID can be
; suggested to the other side as well if it is for example a phone instead of
; another PBX.
;connectedline=yes ; Set if connected line and redirecting information updates
; ; are passed between Asterisk servers for this peer.
; ; yes - Sending and receiving updates are enabled.
; ; send - Only send updates.
; ; receive - Only process received updates.
; ; no - Sending and receiving updates are disabled.
; ; Default is "no".
; ;
; ; Note: Because of an incompatibility between Asterisk v1.4
; ; and Asterisk v1.8 or later, this option must be set
; ; to "no" toward the Asterisk v1.4 peer. A symptom of the
; ; incompatibility is the call gets disconnected unexpectedly.
;[dynamichost]
;host=dynamic
;secret=mysecret
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
;mailbox=1234 ; Notify about mailbox 1234
;inkeys=key1:key2
;peercontext=local ; Default context to request for calls to peer
;defaultip=216.207.245.34
;callerid="Some Host" <(256) 428-6011>
;[biggateway]
;type=peer
;host=192.168.0.1
;description=Gateway to PSTN
;context=*
;secret=myscret
;trunk=yes ; Use IAX2 trunking with this host
;timezone=America/New_York ; Set a timezone for the date/time IE
;
; Friends are a shortcut for creating a user and a peer with the same values.
;
;[marko]
;type=friend
;host=dynamic
;regexten=1234
;secret=moofoo ; Multiple secrets may be specified. For a "user", all
;secret=foomoo ; specified entries will be accepted as valid. For a "peer",
;secret=shazbot ; only the last specified secret will be used.
;context=default
;permit=0.0.0.0/0.0.0.0
;acl=example_named_acl
;
; With immediate=yes, an IAX2 phone or a phone on an IAXy acts as a hot-line
; which goes immediately to the s extension when picked up. Useful for
; elevator phones, manual service, or other similar applications.
;
;[manual]
;type=friend
;host=dynamic
;immediate=yes ; go immediately to s extension when picked up
;secret=moofoo ; when immediate=yes is specified, secret is required
;context=number-please ; we start at the s extension in this context
;
[hetzner]
type=friend
host=172.19.27.2
username=stubnitz
secret=f9DuF9Sh0GRKUFrF
context=fromhetzner
qualify=yes
qualifyfreqok=10000
qualifyfreqnotok=10000

80
iaxprov.conf Normal file
View File

@@ -0,0 +1,80 @@
;
; IAX2 Provisioning Information
;
; Contains provisioning information for templates and for specific service
; entries.
;
; Templates provide a group of settings from which provisioning takes place.
; A template may be based upon any template that has been specified before
; it. If the template that an entry is based on is not specified then it is
; presumed to be 'default' (unless it is the first of course).
;
; Templates which begin with 'si-' are used for provisioning units with
; specific service identifiers. For example the entry "si-000364000126"
; would be used when the device with the corresponding service identifier of
; "000364000126" attempts to register or make a call.
;
[default]
;
; The port number the device should use to bind to. The default is 4569.
;
;port=4569
;
; server is our PRIMARY server for registration and placing calls
;
;server=192.168.69.3
;
; altserver is the BACKUP server for registration and placing calls in the
; event the primary server is unavailable.
;
;altserver=192.168.69.4
;
; port is the port number to use for IAX2 outbound. The connections to the
; server and altserver -- default is of course 4569.
;serverport=4569
;
; language is the preferred language for the device
;
;language=en
;
; codec is the requested codec. The iaxy supports ulaw and adpcm
;
codec=ulaw
;
; flags is a comma separated list of flags which the device should
; use and may contain any of the following keywords:
;
; "register" - Register with server
; "secure" - Do not accept calls / provisioning not originated by the server
; "heartbeat" - Generate status packets on port 9999 sent to 255.255.255.255
; "debug" - Output extra debugging to port 9999
;
; Note that use can use += and -= to adjust parameters
;
flags=register,heartbeat
;
; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of this parameter.
;tos=ef
;
; Example iaxy provisioning
;
;[si-000364000126]
;user=iaxy
;pass=bitsy
;flags += debug
;[si-000364000127]
;user=iaxy2
;pass=bitsy2
;template=si-000364000126
;flags += debug
;
;[*]
;
; If specified, the '*' provisioning is used for all devices which do not
; have another provisioning entry within the file. If unspecified, no
; provisioning will take place for devices which have no entry. DO NOT
; USE A '*' PROVISIONING ENTRY UNLESS YOU KNOW WHAT YOU'RE DOING.
;
;template=default

View File

@@ -47,7 +47,7 @@
[default] [default]
mode=files mode=files
directory=moh directory=/etc/asterisk/media/moh/shop
[shop] [shop]
mode=files mode=files

View File

@@ -29,7 +29,7 @@
autoanswer = yes ; no autoanswer on call autoanswer = yes ; no autoanswer on call
autohangup = yes ; hangup when other party closes autohangup = yes ; hangup when other party closes
; extension = s ; default extension to call ; extension = s ; default extension to call
; context = default ; default context for outgoing calls context = local ; default context for outgoing calls
; language = "" ; default language ; language = "" ; default language
; If you set overridecontext to 'yes', then the whole dial string ; If you set overridecontext to 'yes', then the whole dial string

View File

@@ -818,8 +818,10 @@ qualify=yes
; Examples: ; Examples:
; ;
;register => 1234:password@mysipprovider.com ;register => 1234:password@mysipprovider.com
register => 7467:12zX22bH02q2@eventphone.de
register => 7467:COwcNVlnErGf@voip.eventphone.de ;register => 7467:12zX22bH02q2@eventphone.de
;register => 7467:COwcNVlnErGf@voip.eventphone.de
; ;
; This will pass incoming calls to the 's' extension ; This will pass incoming calls to the 's' extension
; ;
@@ -1017,7 +1019,8 @@ registerattempts=0 ; Number of registration attempts before we give u
; This does not really work well in the case where Asterisk is outside and the ; This does not really work well in the case where Asterisk is outside and the
; clients are on the inside of a NAT. In that case, you want to set directmedia=nonat. ; clients are on the inside of a NAT. In that case, you want to set directmedia=nonat.
; ;
;directmedia=yes ; Asterisk by default tries to redirect the directmedia=no
; Asterisk by default tries to redirect the
; RTP media stream to go directly from ; RTP media stream to go directly from
; the caller to the callee. Some devices do not ; the caller to the callee. Some devices do not
; support this (especially if one of them is behind a NAT). ; support this (especially if one of them is behind a NAT).
@@ -1054,7 +1057,7 @@ registerattempts=0 ; Number of registration attempts before we give u
; the option in this situation helps to prevent potential glares. ; the option in this situation helps to prevent potential glares.
; Setting this option implies 'yes'. ; Setting this option implies 'yes'.
;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up directrtpsetup=no ; Enable the new experimental direct RTP setup. This sets up
; the call directly with media peer-2-peer without re-invites. ; the call directly with media peer-2-peer without re-invites.
; Will not work for video and cases where the callee sends ; Will not work for video and cases where the callee sends
; RTP payloads and fmtp headers in the 200 OK that does not match the ; RTP payloads and fmtp headers in the 200 OK that does not match the
@@ -1621,32 +1624,32 @@ registerattempts=0 ; Number of registration attempts before we give u
; external IP address of the remote device. If port forwarding is done at the client side ; external IP address of the remote device. If port forwarding is done at the client side
; then UDPTL will flow to the remote device. ; then UDPTL will flow to the remote device.
[eventphone] ;[eventphone]
type=friend ;type=friend
host=148.251.63.154 ;host=148.251.63.154
defaultuser=7467 ;defaultuser=7467
secret=12zX22bH02q2 ;secret=12zX22bH02q2
context=from-eventphone ;context=from-eventphone
qualify=yes ;qualify=yes
disallow=all ;disallow=all
allow=alaw ;allow=alaw
direct-media=no ;direct-media=no
canrewrite=no ;canrewrite=no
dtmfmode=rfc2833 ;dtmfmode=rfc2833
insecure=invite,port ;insecure=invite,port
qualify=yes ;qualify=yes
;
[eventphone-event] ;[eventphone-event]
type=friend ;type=friend
host=93.180.79.35 ;host=93.180.79.35
defaultuser=7467 ;defaultuser=7467
secret=COwcNVlnErGf ;secret=COwcNVlnErGf
context=from-eventphone ;context=from-eventphone
qualify=yes ;qualify=yes
disallow=all ;disallow=all
allow=alaw ;allow=alaw
direct-media=no ;direct-media=no
canrewrite=no ;canrewrite=no
dtmfmode=rfc2833 ;dtmfmode=rfc2833
insecure=invite,port ;insecure=invite,port
qualify=yes ;qualify=yes