From ed9a74dd0ee8268f2767f7ed19699a3255371891 Mon Sep 17 00:00:00 2001 From: Hans Wurst Date: Sun, 23 Aug 2015 15:27:52 +0200 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +net-misc/asterisk-11.17.1 --- asterisk/.keep_net-misc_asterisk-0 | 0 asterisk/acl.conf | 80 + asterisk/adsi.conf | 8 + asterisk/agents.conf | 97 + asterisk/alarmreceiver.conf | 80 + asterisk/alsa.conf | 78 + asterisk/amd.conf | 19 + asterisk/app_mysql.conf | 24 + asterisk/app_skel.conf | 27 + asterisk/asterisk.adsi | 159 ++ asterisk/asterisk.conf | 102 ++ asterisk/calendar.conf | 109 ++ asterisk/ccss.conf | 205 +++ asterisk/cdr.conf | 171 ++ asterisk/cdr_adaptive_odbc.conf | 60 + asterisk/cdr_custom.conf | 14 + asterisk/cdr_manager.conf | 15 + asterisk/cdr_mysql.conf | 60 + asterisk/cdr_odbc.conf | 11 + asterisk/cdr_pgsql.conf | 15 + asterisk/cdr_sqlite3_custom.conf | 10 + asterisk/cdr_syslog.conf | 83 + asterisk/cdr_tds.conf | 78 + asterisk/cel.conf | 126 ++ asterisk/cel_custom.conf | 35 + asterisk/cel_odbc.conf | 108 ++ asterisk/cel_pgsql.conf | 67 + asterisk/cel_sqlite3_custom.conf | 24 + asterisk/cel_tds.conf | 69 + asterisk/chan_dahdi.conf | 1618 +++++++++++++++++ asterisk/chan_mobile.conf | 69 + asterisk/cli.conf | 12 + asterisk/cli_aliases.conf | 201 ++ asterisk/cli_permissions.conf | 82 + asterisk/codecs.conf | 153 ++ asterisk/confbridge.conf | 368 ++++ asterisk/config_test.conf | 38 + asterisk/console.conf | 97 + asterisk/dbsep.conf | 35 + asterisk/dnsmgr.conf | 5 + asterisk/dsp.conf | 43 + asterisk/dundi.conf | 268 +++ asterisk/enum.conf | 22 + asterisk/extconfig.conf | 102 ++ asterisk/extensions.ael | 456 +++++ asterisk/extensions.conf | 858 +++++++++ asterisk/extensions.lua | 241 +++ asterisk/extensions_minivm.conf | 159 ++ asterisk/features.conf | 238 +++ asterisk/festival.conf | 35 + asterisk/followme.conf | 91 + asterisk/func_odbc.conf | 96 + asterisk/gtalk.conf | 27 + asterisk/h323.conf | 210 +++ asterisk/http.conf | 86 + asterisk/iax.conf | 668 +++++++ asterisk/iaxprov.conf | 81 + asterisk/indications.conf | 736 ++++++++ asterisk/jabber.conf | 39 + asterisk/jingle.conf | 20 + asterisk/logger.conf | 127 ++ asterisk/manager.conf | 153 ++ asterisk/meetme.conf | 45 + asterisk/mgcp.conf | 142 ++ asterisk/minivm.conf | 218 +++ asterisk/misdn.conf | 537 ++++++ asterisk/modules.conf | 45 + asterisk/motif.conf | 92 + asterisk/musiconhold.conf | 89 + asterisk/muted.conf | 39 + asterisk/ooh323.conf | 204 +++ asterisk/osp.conf | 117 ++ asterisk/oss.conf | 153 ++ asterisk/phone.conf | 51 + asterisk/phoneprov.conf | 137 ++ asterisk/queuerules.conf | 20 + asterisk/queues.conf | 580 ++++++ asterisk/res_config_mysql.conf | 43 + asterisk/res_config_sqlite.conf | 11 + asterisk/res_config_sqlite3.conf | 31 + asterisk/res_corosync.conf | 31 + asterisk/res_curl.conf | 8 + asterisk/res_fax.conf | 32 + asterisk/res_ldap.conf | 198 ++ asterisk/res_odbc.conf | 131 ++ asterisk/res_pgsql.conf | 29 + asterisk/res_pktccops.conf | 32 + asterisk/res_snmp.conf | 22 + asterisk/res_stun_monitor.conf | 27 + asterisk/rtp.conf | 60 + asterisk/say.conf | 383 ++++ asterisk/sip.conf | 1555 ++++++++++++++++ asterisk/sip_notify.conf | 57 + asterisk/skinny.conf | 191 ++ asterisk/sla.conf | 151 ++ asterisk/smdi.conf | 75 + asterisk/telcordia-1.adsi | 83 + asterisk/udptl.conf | 26 + asterisk/unistim.conf | 86 + asterisk/users.conf | 114 ++ asterisk/voicemail.conf | 456 +++++ asterisk/vpb.conf | 248 +++ asterisk/xmpp.conf | 39 + conf.d/asterisk | 95 + init.d/asterisk | 347 ++++ logrotate.d/asterisk | 25 + .../system/asterisk.service.d/00gentoo.conf | 11 + 107 files changed, 16434 insertions(+) create mode 100644 asterisk/.keep_net-misc_asterisk-0 create mode 100644 asterisk/acl.conf create mode 100644 asterisk/adsi.conf create mode 100644 asterisk/agents.conf create mode 100644 asterisk/alarmreceiver.conf create mode 100644 asterisk/alsa.conf create mode 100644 asterisk/amd.conf create mode 100644 asterisk/app_mysql.conf create mode 100644 asterisk/app_skel.conf create mode 100644 asterisk/asterisk.adsi create mode 100644 asterisk/asterisk.conf create mode 100644 asterisk/calendar.conf create mode 100644 asterisk/ccss.conf create mode 100644 asterisk/cdr.conf create mode 100644 asterisk/cdr_adaptive_odbc.conf create mode 100644 asterisk/cdr_custom.conf create mode 100644 asterisk/cdr_manager.conf create mode 100644 asterisk/cdr_mysql.conf create mode 100644 asterisk/cdr_odbc.conf create mode 100644 asterisk/cdr_pgsql.conf create mode 100644 asterisk/cdr_sqlite3_custom.conf create mode 100644 asterisk/cdr_syslog.conf create mode 100644 asterisk/cdr_tds.conf create mode 100644 asterisk/cel.conf create mode 100644 asterisk/cel_custom.conf create mode 100644 asterisk/cel_odbc.conf create mode 100644 asterisk/cel_pgsql.conf create mode 100644 asterisk/cel_sqlite3_custom.conf create mode 100644 asterisk/cel_tds.conf create mode 100644 asterisk/chan_dahdi.conf create mode 100644 asterisk/chan_mobile.conf create mode 100644 asterisk/cli.conf create mode 100644 asterisk/cli_aliases.conf create mode 100644 asterisk/cli_permissions.conf create mode 100644 asterisk/codecs.conf create mode 100644 asterisk/confbridge.conf create mode 100644 asterisk/config_test.conf create mode 100644 asterisk/console.conf create mode 100644 asterisk/dbsep.conf create mode 100644 asterisk/dnsmgr.conf create mode 100644 asterisk/dsp.conf create mode 100644 asterisk/dundi.conf create mode 100644 asterisk/enum.conf create mode 100644 asterisk/extconfig.conf create mode 100644 asterisk/extensions.ael create mode 100644 asterisk/extensions.conf create mode 100644 asterisk/extensions.lua create mode 100644 asterisk/extensions_minivm.conf create mode 100644 asterisk/features.conf create mode 100644 asterisk/festival.conf create mode 100644 asterisk/followme.conf create mode 100644 asterisk/func_odbc.conf create mode 100644 asterisk/gtalk.conf create mode 100644 asterisk/h323.conf create mode 100644 asterisk/http.conf create mode 100644 asterisk/iax.conf create mode 100644 asterisk/iaxprov.conf create mode 100644 asterisk/indications.conf create mode 100644 asterisk/jabber.conf create mode 100644 asterisk/jingle.conf create mode 100644 asterisk/logger.conf create mode 100644 asterisk/manager.conf create mode 100644 asterisk/meetme.conf create mode 100644 asterisk/mgcp.conf create mode 100644 asterisk/minivm.conf create mode 100644 asterisk/misdn.conf create mode 100644 asterisk/modules.conf create mode 100644 asterisk/motif.conf create mode 100644 asterisk/musiconhold.conf create mode 100644 asterisk/muted.conf create mode 100644 asterisk/ooh323.conf create mode 100644 asterisk/osp.conf create mode 100644 asterisk/oss.conf create mode 100644 asterisk/phone.conf create mode 100644 asterisk/phoneprov.conf create mode 100644 asterisk/queuerules.conf create mode 100644 asterisk/queues.conf create mode 100644 asterisk/res_config_mysql.conf create mode 100644 asterisk/res_config_sqlite.conf create mode 100644 asterisk/res_config_sqlite3.conf create mode 100644 asterisk/res_corosync.conf create mode 100644 asterisk/res_curl.conf create mode 100644 asterisk/res_fax.conf create mode 100644 asterisk/res_ldap.conf create mode 100644 asterisk/res_odbc.conf create mode 100644 asterisk/res_pgsql.conf create mode 100644 asterisk/res_pktccops.conf create mode 100644 asterisk/res_snmp.conf create mode 100644 asterisk/res_stun_monitor.conf create mode 100644 asterisk/rtp.conf create mode 100644 asterisk/say.conf create mode 100644 asterisk/sip.conf create mode 100644 asterisk/sip_notify.conf create mode 100644 asterisk/skinny.conf create mode 100644 asterisk/sla.conf create mode 100644 asterisk/smdi.conf create mode 100644 asterisk/telcordia-1.adsi create mode 100644 asterisk/udptl.conf create mode 100644 asterisk/unistim.conf create mode 100644 asterisk/users.conf create mode 100644 asterisk/voicemail.conf create mode 100644 asterisk/vpb.conf create mode 100644 asterisk/xmpp.conf create mode 100644 conf.d/asterisk create mode 100755 init.d/asterisk create mode 100644 logrotate.d/asterisk create mode 100644 systemd/system/asterisk.service.d/00gentoo.conf diff --git a/asterisk/.keep_net-misc_asterisk-0 b/asterisk/.keep_net-misc_asterisk-0 new file mode 100644 index 0000000..e69de29 diff --git a/asterisk/acl.conf b/asterisk/acl.conf new file mode 100644 index 0000000..b052606 --- /dev/null +++ b/asterisk/acl.conf @@ -0,0 +1,80 @@ +; +; Named Access Control Lists (ACLs) +; +; A convenient way to share acl definitions +; +; This configuration file is read on startup +; +; CLI Commands +; ----------------------------------------------------------- +; acl show Show all named ACLs configured +; acl show Show contents of a particular named ACL +; reload acl Reload configuration file +; +; Any configuration that uses ACLs which has been made to be able to use named +; ACLs will specify a named ACL with the 'acl' option in its configuration in +; a similar fashion to the usual 'permit' and 'deny' options. Example: +; acl=my_named_acl +; +; Multiple named ACLs can be applied by either comma separating the arguments or +; just by adding additional ACL lines. Example: +; acl=my_named_acl +; acl=my_named_acl2 +; +; or +; +; acl=my_named_acl,my_named_acl2 +; +; ACLs specified by name are evaluated independently from the ACL specified via +; permit/deny. In order for an address to pass a given ACL, it must pass both +; the ACL specified by permit/deny for a given item as well as any named ACLs +; that were specified. +; +;[example_named_acl1] +;deny=0.0.0.0/0.0.0.0 +;permit=209.16.236.0 +;permit=209.16.236.1 +; +;[example_named_acl2] +;permit=0.0.0.0/0.0.0.0 +;deny=10.24.20.171 +;deny=10.24.20.103 +;deny=209.16.236.1 +; +; example_named_acl1 above shows an example of whitelisting. When whitelisting, the +; named ACLs should follow a deny that blocks everything (like deny=0.0.0.0/0.0.0.0) +; The following example explains how combining the ACLs works: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; +; Suppose 209.16.236.0 tries to communicate and the ACL for that example is applied to it... +; First, example_named_acl1 is evaluated. The address is allowed by that ACL. +; Next, example_named_acl2 is evaluated. The address isn't blocked by example_named_acl2 +; either, so it passes. +; +; Suppose instead 209.16.236.1 tries to communicate and the same ACL is applied. +; First, example_named_acl1 is evaluated and the address is allowed. +; However, it is blocked by example_named_acl2, so the address is blocked from the combined +; ACL. +; +; Similarly, the permits/denies in specific configurations that make up an ACL definition +; are also treated as a separate ACL for evaluation. So if we change the example above to: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; deny=209.16.236.0 +; +; Then 209.16.236.0 will be rejected by the non-named component of the combined ACL even +; though it passes the two named components. +; +; +; Named ACLs can use ipv6 addresses just like normal ACLs. +;[ipv6_example_1] +;deny = :: +;permit = ::1/128 +; +;[ipv6_example_2] +;permit = fe80::21d:bad:fad:2323 diff --git a/asterisk/adsi.conf b/asterisk/adsi.conf new file mode 100644 index 0000000..0f36f80 --- /dev/null +++ b/asterisk/adsi.conf @@ -0,0 +1,8 @@ +; +; Sample ADSI Configuration file +; +[intro] +alignment = center +greeting => Welcome to the +greeting => Asterisk +greeting => Open Source PBX diff --git a/asterisk/agents.conf b/asterisk/agents.conf new file mode 100644 index 0000000..a2d6294 --- /dev/null +++ b/asterisk/agents.conf @@ -0,0 +1,97 @@ +; +; Agent configuration +; + +[general] + +[agents] +; +; Define maxlogintries to allow agent to try max logins before +; failed. +; default to 3 +; +;maxlogintries=5 +; +; +; Define autologoff times if appropriate. This is how long +; the phone has to ring with no answer before the agent is +; automatically logged off (in seconds) +; +;autologoff=15 +; +; Define autologoffunavail to have agents automatically logged +; out when the extension that they are at returns a CHANUNAVAIL +; status when a call is attempted to be sent there. +; Default is "no". +; +;autologoffunavail=yes +; +; Define ackcall to require a DTMF acknowledgement when +; a logged-in agent receives a call. Default is "no". +; Use the acceptdtmf option to configure what DTMF key +; press should be used to acknowledge the call. The +; default is '#'. +; +;ackcall=no +;acceptdtmf=# +; +; Define endcall to allow an agent to hangup a call with a +; DTMF keypress. Default is "yes". Use the enddtmf option to +; configure which DTMF key will end a call. The default is +; '*'. +; +;endcall=yes +;enddtmf=* +; +; Define wrapuptime. This is the minimum amount of time when +; after disconnecting before the caller can receive a new call +; note this is in milliseconds. +; +;wrapuptime=5000 +; +; Define the default musiconhold for agents +; musiconhold => music_class +; +;musiconhold => default +; +; Define updatecdr. This is whether or not to change the source +; channel in the CDR record for this call to agent/agent_id so +; that we know which agent generates the call +; +;updatecdr=no +; +; Group memberships for agents (may change in mid-file) +; +;group=3 +;group=1,2 +;group= +; +; -------------------------------------------------- +; This section is devoted to recording agent's calls +; The keywords are global to the chan_agent channel driver +; +; Enable recording calls addressed to agents. It's turned off by default. +;recordagentcalls=yes +; +; The format to be used to record the calls: wav, gsm, wav49. +; By default its "wav". +;recordformat=gsm +; +; The text to be added to the name of the recording. Allows forming a url link. +;urlprefix=http://localhost/calls/ +; +; The optional directory to save the conversations in. The default is +; /var/spool/asterisk/monitor +;savecallsin=/var/calls +; +; An optional custom beep sound file to play to always-connected agents. +;custom_beep=beep +; +; -------------------------------------------------- +; +; This section contains the agent definitions, in the form: +; +; agent => agentid,agentpassword,name +; +;agent => 1001,4321,Mark Spencer +;agent => 1002,4321,Will Meadows diff --git a/asterisk/alarmreceiver.conf b/asterisk/alarmreceiver.conf new file mode 100644 index 0000000..7964701 --- /dev/null +++ b/asterisk/alarmreceiver.conf @@ -0,0 +1,80 @@ +; +; alarmreceiver.conf +; +; Sample configuration file for the Asterisk alarm receiver application. +; + + +[general] + +; +; Specify a timestamp format for the metadata section of the event files +; Default is %a %b %d, %Y @ %H:%M:%S %Z + +timestampformat = %a %b %d, %Y @ %H:%M:%S %Z + +; +; Specify a command to execute when the caller hangs up +; +; Default is none +; + +;eventcmd = yourprogram -yourargs ... + +; +; Specify a spool directory for the event files. This setting is required +; if you want the app to be useful. Event files written to the spool +; directory will be of the template event-XXXXXX, where XXXXXX is a random +; and unique alphanumeric string. +; +; Default is none, and the events will be dropped on the floor. +; + +eventspooldir = /tmp + +; +; The alarmreceiver app can either log the events one-at-a-time to individual +; files in the spool directory, or it can store them until the caller +; disconnects and write them all to one file. +; +; The default setting for logindividualevents is no. +; + +logindividualevents = no + +; +; The timeout for receiving the first DTMF digit is adjustable from 1000 msec. +; to 10000 msec. The default is 2000 msec. Note: if you wish to test the +; receiver by entering digits manually, set this to a reasonable time out +; like 10000 milliseconds. + +fdtimeout = 2000 + +; +; The timeout for receiving subsequent DTMF digits is adjustable from +; 110 msec. to 4000 msec. The default is 200 msec. Note: if you wish to test +; the receiver by entering digits manually, set this to a reasonable time out +; like 4000 milliseconds. +; + +sdtimeout = 200 + +; +; The loudness of the ACK and Kissoff tones is adjustable from 100 to 8192. +; The default is 8192. This shouldn't need to be messed with, but is included +; just in case there are problems with signal levels. +; + +loudness = 8192 + +; +; The db-family setting allows the user to capture statistics on the number of +; calls, and the errors the alarm receiver sees. The default is for no +; db-family name to be defined and the database logging to be turned off. +; + +;db-family = yourfamily: + +; +; End of alarmreceiver.conf +; diff --git a/asterisk/alsa.conf b/asterisk/alsa.conf new file mode 100644 index 0000000..ced5b44 --- /dev/null +++ b/asterisk/alsa.conf @@ -0,0 +1,78 @@ +; +; Open Sound System Console Driver Configuration File +; +[general] +; +; Automatically answer incoming calls on the console? Choose yes if +; for example you want to use this as an intercom. +; +autoanswer=yes +; +; Default context (is overridden with @context syntax) +; +context=local +; +; Default extension to call +; +extension=s +; +; Default language +; +;language=en +; +; Default Music on Hold class to use when this channel is placed on hold in +; the case that the music class is not 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 class to use. +; +;mohinterpret=default +; +; Silence suppression can be enabled when sound is over a certain threshold. +; The value for the threshold should probably be between 500 and 2000 or so, +; but your mileage may vary. Use the echo test to evaluate the best setting. +;silencesuppression = yes +;silencethreshold = 1000 +; +; To set which ALSA device to use, change this parameter +;input_device=hw:0,0 +;output_device=hw:0,0 + +; +; Default mute state (can also be toggled via CLI) +;mute=true + +; +; If enabled, no audio capture device will be opened. This is useful on +; systems where there will be no return audio path, such as overhead pagers. +;noaudiocapture=true + +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; ALSA 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 ALSA channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive ALSA side will always + ; be used if the sending side can create jitter. + +; 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 jbmax-size) 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". +;----------------------------------------------------------------------------------- + diff --git a/asterisk/amd.conf b/asterisk/amd.conf new file mode 100644 index 0000000..c4a5907 --- /dev/null +++ b/asterisk/amd.conf @@ -0,0 +1,19 @@ +; +; Answering Machine Detection Configuration +; + +[general] +initial_silence = 2500 ; Maximum silence duration before the greeting. + ; If exceeded then MACHINE. +greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE. +after_greeting_silence = 800 ; Silence after detecting a greeting. + ; If exceeded then HUMAN +total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide + ; on a HUMAN or MACHINE +min_word_length = 100 ; Minimum duration of Voice to considered as a word +between_words_silence = 50 ; Minimum duration of silence after a word to consider + ; the audio what follows as a new word +maximum_number_of_words = 3 ; Maximum number of words in the greeting. + ; If exceeded then MACHINE +maximum_word_length = 5000 ; Maximum duration of a single Voice utterance allowed. +silence_threshold = 256 diff --git a/asterisk/app_mysql.conf b/asterisk/app_mysql.conf new file mode 100644 index 0000000..fafd4f7 --- /dev/null +++ b/asterisk/app_mysql.conf @@ -0,0 +1,24 @@ +; Configuration file for the MYSQL app addon + +[general] +; +; Nullvalue governs how NULL values are returned from the database. In +; previous versions, the special NULL value was returned as the "NULL" +; string. We now provide an option for the behavior, configured globally. +; nullstring - the string "NULL" +; emptystring - the string "" +; null - unset the variable +; +; WARNING: setting nullvalue=null may have undesireable consequences, in +; particular if you use subroutines in AEL or the LOCAL() variable construct. +; You have been warned. Don't complain if you use that setting in combination +; with Gosub or AEL and get buggy behavior. +; +nullvalue = nullstring + +; If set, autoclear will destroy allocated statement and connection resources +; when the channel ends. For most usage of the MYSQL app, this is what you +; want, but it's conceivable that somebody is sharing MYSQL connections across +; multiple channels, in which case, this should be set to 'no'. Defaults to +; 'no', as this was the original behavior. +autoclear=yes diff --git a/asterisk/app_skel.conf b/asterisk/app_skel.conf new file mode 100644 index 0000000..ada8461 --- /dev/null +++ b/asterisk/app_skel.conf @@ -0,0 +1,27 @@ +[general] +games=3 +cheat=no + +[sounds] +prompt=please-enter-your,number,queue-less-than +wrong_guess=vm-pls-try-again +right_guess=auth-thankyou +too_high=high +too_low=low +lose=vm-goodbye + +[easy] +max_number=10 +max_guesses=4 + +[medium] +max_number=100 +max_guesses=6 + +[hard] +max_number=1000 +max_guesses=7 + +[nightmare] +max_number=1000 +max_guesses=1 diff --git a/asterisk/asterisk.adsi b/asterisk/asterisk.adsi new file mode 100644 index 0000000..a589525 --- /dev/null +++ b/asterisk/asterisk.adsi @@ -0,0 +1,159 @@ +; +; Asterisk default ADSI script +; +; +; Begin with the preamble requirements +; +DESCRIPTION "Asterisk PBX" ; Name of vendor +VERSION 0x00 ; Version of stuff +;SECURITY "_AST" ; Security code +SECURITY 0X9BDBF7AC ; Security code +FDN 0x0000000F ; Descriptor number + +; +; Flags +; +FLAG "nocallwaiting" + +; +; Predefined strings +; +DISPLAY "titles" IS "** Asterisk PBX **" +DISPLAY "talkingto" IS "Call active." JUSTIFY LEFT +DISPLAY "callname" IS "$Call1p" JUSTIFY LEFT +DISPLAY "callnum" IS "$Call1s" JUSTIFY LEFT +DISPLAY "incoming" IS "Incoming call!" JUSTIFY LEFT +DISPLAY "ringing" IS "Calling... " JUSTIFY LEFT +DISPLAY "callended" IS "Call ended." JUSTIFY LEFT +DISPLAY "missedcall" IS "Missed call." JUSTIFY LEFT +DISPLAY "busy" IS "Busy." JUSTIFY LEFT +DISPLAY "reorder" IS "Reorder." JUSTIFY LEFT +DISPLAY "cwdisabled" IS "Callwait disabled" +DISPLAY "empty" IS "asdf" + +; +; Begin soft key definitions +; +KEY "callfwd" IS "CallFwd" OR "Call Forward" + OFFHOOK + VOICEMODE + WAITDIALTONE + SENDDTMF "*60" + GOTO "offHook" +ENDKEY + +KEY "vmail_OH" IS "VMail" OR "Voicemail" + OFFHOOK + VOICEMODE + WAITDIALTONE + SENDDTMF "8500" +ENDKEY + +KEY "vmail" IS "VMail" OR "Voicemail" + SENDDTMF "8500" +ENDKEY + +KEY "backspace" IS "BackSpc" OR "Backspace" + BACKSPACE +ENDKEY + +KEY "cwdisable" IS "CWDsble" OR "Disable Call Wait" + SENDDTMF "*70" + SETFLAG "nocallwaiting" + SHOWDISPLAY "cwdisabled" AT 4 + TIMERCLEAR + TIMERSTART 1 +ENDKEY + +KEY "cidblock" IS "CIDBlk" OR "Block Callerid" + SENDDTMF "*67" + SETFLAG "nocallwaiting" +ENDKEY + +; +; Begin main subroutine +; + +SUB "main" IS + IFEVENT NEARANSWER THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "talkingto" AT 2 NOUPDATE + SHOWDISPLAY "callname" AT 3 + SHOWDISPLAY "callnum" AT 4 + GOTO "stableCall" + ENDIF + IFEVENT OFFHOOK THEN + CLEAR + CLEARFLAG "nocallwaiting" + CLEARDISPLAY + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail" + SHOWKEYS "cidblock" + SHOWKEYS "cwdisable" UNLESS "nocallwaiting" + GOTO "offHook" + ENDIF + IFEVENT IDLE THEN + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail_OH" + ENDIF + IFEVENT CALLERID THEN + CLEAR +; SHOWDISPLAY "titles" AT 1 NOUPDATE +; SHOWDISPLAY "incoming" AT 2 NOUPDATE + SHOWDISPLAY "callname" AT 3 NOUPDATE + SHOWDISPLAY "callnum" AT 4 + ENDIF + IFEVENT RING THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "incoming" AT 2 + ENDIF + IFEVENT ENDOFRING THEN + SHOWDISPLAY "missedcall" AT 2 + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "vmail_OH" + ENDIF + IFEVENT TIMER THEN + CLEAR + SHOWDISPLAY "empty" AT 4 + ENDIF +ENDSUB + +SUB "offHook" IS + IFEVENT FARRING THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "ringing" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF + IFEVENT FARANSWER THEN + CLEAR + SHOWDISPLAY "talkingto" AT 2 + GOTO "stableCall" + ENDIF + IFEVENT BUSY THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "busy" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF + IFEVENT REORDER THEN + CLEAR + SHOWDISPLAY "titles" AT 1 NOUPDATE + SHOWDISPLAY "reorder" AT 2 NOUPDATE + SHOWDISPLAY "callname" at 3 NOUPDATE + SHOWDISPLAY "callnum" at 4 + ENDIF +ENDSUB + +SUB "stableCall" IS + IFEVENT REORDER THEN + SHOWDISPLAY "callended" AT 2 + ENDIF +ENDSUB + diff --git a/asterisk/asterisk.conf b/asterisk/asterisk.conf new file mode 100644 index 0000000..5025f88 --- /dev/null +++ b/asterisk/asterisk.conf @@ -0,0 +1,102 @@ +[directories](!) +astetcdir => /etc/asterisk +astmoddir => /usr/lib64/asterisk/modules +astvarlibdir => /var/lib/asterisk +astdbdir => /var/lib/asterisk +astkeydir => /var/lib/asterisk +astdatadir => /var/lib/asterisk +astagidir => /var/lib/asterisk/agi-bin +astspooldir => /var/spool/asterisk +astrundir => /var/run/asterisk +astlogdir => /var/log/asterisk +astsbindir => /usr/sbin + +[options] +;verbose = 3 +;debug = 3 +;alwaysfork = yes ; Same as -F at startup. +;nofork = yes ; Same as -f at startup. +;quiet = yes ; Same as -q at startup. +;timestamp = yes ; Same as -T at startup. +;execincludes = yes ; Support #exec in config files. +;console = yes ; Run as console (same as -c at startup). +;highpriority = yes ; Run realtime priority (same as -p at + ; startup). +;initcrypto = yes ; Initialize crypto keys (same as -i at + ; startup). +;nocolor = yes ; Disable console colors. +;dontwarn = yes ; Disable some warnings. +;dumpcore = yes ; Dump core on crash (same as -g at startup). +;languageprefix = yes ; Use the new sound prefix path syntax. +;systemname = my_system_name ; Prefix uniqueid with a system name for + ; Global uniqueness issues. +;autosystemname = yes ; Automatically set systemname to hostname, + ; uses 'localhost' on failure, or systemname if + ; set. +;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms) + ; If we get shorter DTMF messages, these will be + ; changed to the minimum duration +;maxcalls = 10 ; Maximum amount of calls allowed. +;maxload = 0.9 ; Asterisk stops accepting new calls if the + ; load average exceed this limit. +;maxfiles = 1000 ; Maximum amount of openfiles. +;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if + ; the amount of free memory falls below this + ; watermark. +;cache_record_files = yes ; Cache recorded sound files to another + ; directory during recording. +;record_cache_dir = /tmp ; Specify cache directory (used in conjunction + ; with cache_record_files). +;transmit_silence = yes ; Transmit silence while a channel is in a + ; waiting state, a recording only state, or + ; when DTMF is being generated. Note that the + ; silence internally is generated in raw signed + ; linear format. This means that it must be + ; transcoded into the native format of the + ; channel before it can be sent to the device. + ; It is for this reason that this is optional, + ; as it may result in requiring a temporary + ; codec translation path for a channel that may + ; not otherwise require one. +;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of + ; directly. +;runuser = asterisk ; The user to run as. +;rungroup = asterisk ; The group to run as. +;lightbackground = yes ; If your terminal is set for a light-colored + ; background. +;forceblackbackground = yes ; Force the background of the terminal to be + ; black, in order for terminal colors to show + ; up properly. +;defaultlanguage = en ; Default language +documentation_language = en_US ; Set the language you want documentation + ; displayed in. Value is in the same format as + ; locale names. +;hideconnect = yes ; Hide messages displayed when a remote console + ; connects and disconnects. +;lockconfdir = no ; Protect the directory containing the + ; configuration files (/etc/asterisk) with a + ; lock. +;stdexten = gosub ; How to invoke the extensions.conf stdexten. + ; macro - Invoke the stdexten using a macro as + ; done by legacy Asterisk versions. + ; gosub - Invoke the stdexten using a gosub as + ; documented in extensions.conf.sample. + ; Default gosub. +;live_dangerously = no ; Enable the execution of 'dangerous' dialplan + ; functions from external sources (AMI, + ; etc.) These functions (such as SHELL) are + ; considered dangerous because they can allow + ; privilege escalation. + ; Default yes, for backward compatability. + +; Changing the following lines may compromise your security. +;[files] +;astctlpermissions = 0660 +;astctlowner = root +;astctlgroup = apache +;astctl = asterisk.ctl + +[compat] +pbx_realtime=1.6 +res_agi=1.6 +app_set=1.6 diff --git a/asterisk/calendar.conf b/asterisk/calendar.conf new file mode 100644 index 0000000..82b8702 --- /dev/null +++ b/asterisk/calendar.conf @@ -0,0 +1,109 @@ +;[calendar1] +;type = ical ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/home/jdoe/Calendar/ ; URL to shared calendar (Zimbra example) +;user = jdoe ; web username +;secret = supersecret ; web password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +; The following fields are available from the ${CALENDAR_EVENT()} dialplan function: +; +; summary : The VEVENT Summary property or Exchange subject +; description : The text description of the vent +; organizer : The organizer of the event +; location : The location field of the event +; calendar : The name of the calendar tied to the event +; uid : The unique ID for this event +; start : Start time of the event +; end : The end time of the event +; busystate : 0=FREE, 1=TENTATIVE, 2=BUSY +; +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/60001 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 123 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds +; +; Channel variables can be set on the notification channel. The format is +; setvar=name=value. Variable subsitution is done on the value to allow the use of dialplan +; functions like CALENDAR_EVENT. The variables are set in order, so one can use the value +; of earlier variables in the definition of later ones. +; +;setvar = CALLERID(name)=${CALENDAR_EVENT(summary)} + +;[calendar2] +; Note: Support for Exchange Server 2003 +; +;type = exchange ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/exchange/jdoe ; URL to MS Exchange OWA for user (usually includes exchange/user) +;user = jdoe ; Exchange username +;secret = mysecret ; Exchange password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;[calendar3] +; Note: Support for Exchange Server 2007+ +; +;type = ews ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://example.com/ews/Exchange.asmx ; URL to MS Exchange EWS +;user = jdoe ; Exchange username +;secret = mysecret ; Exchange password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds + +;[calendar4] +;type = caldav ; type of calendar--currently supported: ical, caldav, exchange, or ews +;url = https://www.google.com/calendar/dav/username@gmail.com/events/ ; Main GMail calendar (the trailing slash is significant!) +;user = jdoe@gmail.com ; username +;secret = mysecret ; password +;refresh = 15 ; refresh calendar every n minutes +;timeframe = 60 ; number of minutes of calendar data to pull for each refresh period +; ; should always be >= refresh +; +; You can set up res_calendar to execute a call upon an upcoming busy status +;autoreminder = 10 ; Override event-defined reminder before each busy status (in mins) +; +;channel = SIP/1234 ; Channel to dial +;context = default ; Context to connect to on answer +;extension = 1234 ; Extension to connect to on answer +; +; or +; +;app = Playback ; Application to execute on answer (instead of context/extension) +;appdata = tt-weasels ; Data part of application to execute on answer +; +;waittime = 30 ; How long to wait for an answer, defaults to 30 seconds diff --git a/asterisk/ccss.conf b/asterisk/ccss.conf new file mode 100644 index 0000000..21b0b06 --- /dev/null +++ b/asterisk/ccss.conf @@ -0,0 +1,205 @@ +; +; --- Call Completion Supplementary Services --- +; +; For more information about CCSS, see the CCSS user documentation +; https://wiki.asterisk.org/wiki/display/AST/Call+Completion+Supplementary+Services+(CCSS) +; + +[general] +; The cc_max_requests option is a global limit on the number of +; CC requests that may be in the Asterisk system at any time. +; +;cc_max_requests = 20 +; +; The cc_STATE_devstate variables listed below can be used to change the +; default mapping of the internal state machine tracking the state of +; call completion to an Asterisk Device State value. The acceptable values +; that can be provided are as follows, with a description of what the +; equivalent device BLF that this maps to: +; +; UNKNOWN ; Device is valid but channel didn't know state +; NOT_INUSE ; Device is not used +; INUSE ; Device is in use +; BUSY ; Device is busy +; INVALID ; Device is invalid +; UNAVAILABLE ; Device is unavailable +; RINGING ; Device is ringing +; RINGINUSE ; Device is ringing *and* in use +; ONHOLD ; Device is on hold +; +; These states are used to generate DEVICE_STATE information that can be +; included with Asterisk hints for phones to subscribe to the state information +; or dialplan to check the state using the EXTENSION_STATE() function or +; the DEVICE_STATE() function. +; +; The states are in the format of: "ccss:TECH/ID" so an example of device +; SIP/3000 making a CallCompletionRequest() could be checked by looking at +; DEVICE_STATE(ccss:SIP/3000) or an Asterisk Hint could be generated such as +; +; [hint-context] +; exten => *843000,hint,ccss:SIP/3000 +; +; and then accessed with EXTENSION_STATE(*843000@hint-context) +; or subscribed to with a BLF button on a phone. +; +; The available state mapping and default values are: +; +; cc_available_devstate = NOT_INUSE +; cc_offered_devstate = NOT_INUSE +; cc_caller_requested_devstate = NOT_INUSE +; cc_active_devstate = INUSE +; cc_callee_ready_devstate = INUSE +; cc_caller_busy_devstate = ONHOLD +; cc_recalling_devstate = RINGING +; cc_complete_devstate = NOT_INUSE +; cc_failed_devstate = NOT_INUSE + +; +;============================================ +; PLEASE READ THIS!!! +; The options described below should NOT be +; set in this file. Rather, they should be +; set per-device in a channel driver +; configuration file. +; PLEASE READ THIS!!! +;=========================================== +; +;--------------------------------------------------------------------- +; Timers +;--------------------------------------------------------------------- +;There are three configurable timers for all types of CC: the +;cc_offer_timer, the ccbs_available_timer, and the ccnr_available_timer. +;In addition, when using a generic agent, there is a fourth timer, +;the cc_recall_timer. All timers are configured in seconds, and the +;values shown below are the defaults. +; +;When a caller is offered CCBS or CCNR, the cc_offer_timer will +;be started. If the caller does not request CC before the +;cc_offer_timer expires, then the caller will be unable to request +;CC for this call. +; +;cc_offer_timer = 20 +; +;Once a caller has requested CC, then either the ccbs_available_timer +;or the ccnr_available_timer will run, depending on the service +;requested. The reason why there are two separate timers for CCBS +;and CCNR is that it is reasonable to want to have a shorter timeout +;configured for CCBS than for CCNR. If the available timer expires +;before the called party becomes available, then the CC attempt +;will have failed and monitoring of the called party will stop. +; +;ccbs_available_timer = 4800 +;ccnr_available_timer = 7200 +; +; When using a generic agent, the original caller is called back +; when one of the original called parties becomes available. The +; cc_recall_timer tells Asterisk how long it should let the original +; caller's phone ring before giving up. Please note that this parameter +; only affects operation when using a generic agent. +; +;cc_recall_timer = 20 +;--------------------------------------------------------------------- +; Policies +;--------------------------------------------------------------------- +; Policy settings tell Asterisk how to behave and what sort of +; resources to allocate in order to facilitate CC. There are two +; settings to control the actions Asterisk will take. +; +; The cc_agent_policy describes the behavior that Asterisk will +; take when communicating with the caller during CC. There are +; three possible options. +; +;never: Never offer CC to the caller. Setting the cc_agent_policy +; to this value is the way to disable CC for a call. +; +;generic: A generic CC agent is one which uses no protocol-specific +; mechanisms to offer CC to the caller. Instead, the caller +; requests CC using a dialplan function. Due to internal +; restrictions, you should only use a generic CC agent on +; phones (i.e. not "trunks"). If you are using phones which +; do not support a protocol-specific method of using CC, then +; generic CC agents are what you should use. +; +;native: A native CC agent is one which uses protocol-specific +; signaling to offer CC to the caller and accept CC requests +; from the caller. The supported protocols for native CC +; agents are SIP, ISDN ETSI PTP, ISDN ETSI PTMP, and Q.SIG +;cc_agent_policy=never +; +; The cc_monitor_policy describes the behavior that Asterisk will +; take when communicating with the called party during CC. There +; are four possible options. +; +;never: Analogous to the cc_agent_policy setting. We will never +; attempt to request CC services on this interface. +; +;generic: Analogous to the cc_agent_policy setting. We will monitor +; the called party's progress using protocol-agnostic +; capabilities. Like with generic CC agents, generic CC +; monitors should only be used for phones. +; +;native: Analogous to the cc_agent_policy setting. We will use +; protocol-specific methods to request CC from this interface +; and to monitor the interface for availability. +; +;always: If an interface is set to "always," then we will accept +; protocol-specific CC offers from the caller and use +; a native CC monitor for the remainder of the CC transaction. +; However, if the interface does not offer protocol-specific +; CC, then we will fall back to using a generic CC monitor +; instead. This is a good setting to use for phones for which +; you do not know if they support protocol-specific CC +; methodologies. +;cc_monitor_policy=never +; +; +;--------------------------------------------------------------------- +; Limits +;--------------------------------------------------------------------- +; +; The use of CC requires Asterisk to potentially use more memory than +; some administrators would like. As such, it is a good idea to limit +; the number of CC requests that can be in the system at a given time. +; The values shown below are the defaults. +; +; The cc_max_agents setting limits the number of outstanding CC +; requests a caller may have at any given time. Please note that due +; to implementation restrictions, this setting is ignored when using +; generic CC agents. Generic CC agents may only have one outstanding +; CC request. +; +;cc_max_agents = 5 +; +; The cc_max_monitors setting limits the number of outstanding CC +; requests can be made to a specific interface at a given time. +; +;cc_max_monitors = 5 +; +;--------------------------------------------------------------------- +; Other +;--------------------------------------------------------------------- +; +; When using a generic CC agent, the caller who requested CC will be +; called back when a called party becomes available. When the caller +; answers his phone, the administrator may opt to have a macro run. +; What this macro does is up to the administrator. By default there +; is no callback macro configured. +; +;cc_callback_macro= +; +; Alternatively, the administrator may run a subroutine. By default +; there is no callback subroutine configured. The subroutine should +; be specified in the format: [[context,]exten,]priority +; +;cc_callback_sub= +; +; When using an ISDN phone and a generic CC agent, Asterisk is unable +; to determine the dialstring that should be used when calling back +; the original caller. Furthermore, if you desire to use any dialstring- +; specific options, such as distinctive ring, you must set this +; configuration option. For non-ISDN phones, it is not necessary to +; set this, since Asterisk can determine the dialstring to use since +; it is identical to the name of the calling device. By default, there +; is no cc_agent_dialstring set. +; +;cc_agent_dialstring= diff --git a/asterisk/cdr.conf b/asterisk/cdr.conf new file mode 100644 index 0000000..458e19a --- /dev/null +++ b/asterisk/cdr.conf @@ -0,0 +1,171 @@ +; +; Asterisk Call Detail Record engine configuration +; +; CDR is Call Detail Record, which provides logging services via a variety of +; pluggable backend modules. Detailed call information can be recorded to +; databases, files, etc. Useful for billing, fraud prevention, compliance with +; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more. +; + +[general] + +; Define whether or not to use CDR logging. Setting this to "no" will override +; any loading of backend CDR modules. Default is "yes". +;enable=yes + +; Define whether or not to log unanswered calls. Setting this to "yes" will +; report every attempt to ring a phone in dialing attempts, when it was not +; answered. For example, if you try to dial 3 extensions, and this option is "yes", +; you will get 3 CDR's, one for each phone that was rung. Default is "no". Some +; find this information horribly useless. Others find it very valuable. Note, in "yes" +; mode, you will see one CDR, with one of the call targets on one side, and the originating +; channel on the other, and then one CDR for each channel attempted. This may seem +; redundant, but cannot be helped. +; +; In brief, this option controls the reporting of unanswered calls which only have an A +; party. Calls which get offered to an outgoing line, but are unanswered, are still +; logged, and that is the intended behaviour. (It also results in some B side CDRs being +; output, as they have the B side channel as their source channel, and no destination +; channel.) +;unanswered = no + +; Define whether or not to log congested calls. Setting this to "yes" will +; report each call that fails to complete due to congestion conditions. Default +; is "no". +;congestion = no + +; Normally, CDR's are not closed out until after all extensions are finished +; executing. By enabling this option, the CDR will be ended before executing +; the "h" extension and hangup handlers so that CDR values such as "end" and +; "billsec" may be retrieved inside of of this extension. +; The default value is "no". +;endbeforehexten=no + +; Normally, the 'billsec' field logged to the backends (text files or databases) +; is simply the end time (hangup time) minus the answer time in seconds. Internally, +; asterisk stores the time in terms of microseconds and seconds. By setting +; initiatedseconds to 'yes', you can force asterisk to report any seconds +; that were initiated (a sort of round up method). Technically, this is +; when the microsecond part of the end time is greater than the microsecond +; part of the answer time, then the billsec time is incremented one second. +; The default value is "no". +;initiatedseconds=no + +; Define the CDR batch mode, where instead of posting the CDR at the end of +; every call, the data will be stored in a buffer to help alleviate load on the +; asterisk server. Default is "no". +; +; WARNING WARNING WARNING +; Use of batch mode may result in data loss after unsafe asterisk termination +; ie. software crash, power failure, kill -9, etc. +; WARNING WARNING WARNING +; +;batch=no + +; Define the maximum number of CDRs to accumulate in the buffer before posting +; them to the backend engines. 'batch' must be set to 'yes'. Default is 100. +;size=100 + +; Define the maximum time to accumulate CDRs in the buffer before posting them +; to the backend engines. If this time limit is reached, then it will post the +; records, regardless of the value defined for 'size'. 'batch' must be set to +; 'yes'. Note that time is in seconds. Default is 300 (5 minutes). +;time=300 + +; The CDR engine uses the internal asterisk scheduler to determine when to post +; records. Posting can either occur inside the scheduler thread, or a new +; thread can be spawned for the submission of every batch. For small batches, +; it might be acceptable to just use the scheduler thread, so set this to "yes". +; For large batches, say anything over size=10, a new thread is recommended, so +; set this to "no". Default is "no". +;scheduleronly=no + +; When shutting down asterisk, you can block until the CDRs are submitted. If +; you don't, then data will likely be lost. You can always check the size of +; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on +; submission of CDR data during asterisk shutdown, set this to "yes". Default +; is "yes". +;safeshutdown=yes + +; +; +; CHOOSING A CDR "BACKEND" (what kind of output to generate) +; +; To choose a backend, you have to make sure either the right category is +; defined in this file, or that the appropriate config file exists, and has the +; proper definitions in it. If there are any problems, usually, the entry will +; silently ignored, and you get no output. +; +; Also, please note that you can generate CDR records in as many formats as you +; wish. If you configure 5 different CDR formats, then each event will be logged +; in 5 different places! In the example config files, all formats are commented +; out except for the cdr-csv format. +; +; Here are all the possible back ends: +; +; csv, custom, manager, odbc, pgsql, radius, sqlite, tds +; (also, mysql is available via the asterisk-addons, due to licensing +; requirements) +; (please note, also, that other backends can be created, by creating +; a new backend module in the source cdr/ directory!) +; +; Some of the modules required to provide these backends will not build or install +; unless some dependency requirements are met. Examples of this are pgsql, odbc, +; etc. If you are not getting output as you would expect, the first thing to do +; is to run the command "make menuselect", and check what modules are available, +; by looking in the "2. Call Detail Recording" option in the main menu. If your +; backend is marked with XXX, you know that the "configure" command could not find +; the required libraries for that option. +; +; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv +; file, define the [csv] category in this file. No database necessary. The example +; config files are set up to provide this kind of output by default. +; +; To get custom csv CDR records, make sure the cdr_custom.conf file +; is present, and contains the proper [mappings] section. The advantage to +; using this backend, is that you can define which fields to output, and in +; what order. By default, the example configs are set up to mimic the cdr-csv +; output. If you don't make any changes to the mappings, you are basically generating +; the same thing as cdr-csv, but expending more CPU cycles to do so! +; +; To get manager events generated, make sure the cdr_manager.conf file exists, +; and the [general] section is defined, with the single variable 'enabled = yes'. +; +; For odbc, make sure all the proper libs are installed, that "make menuselect" +; shows that the modules are available, and the cdr_odbc.conf file exists, and +; has a [global] section with the proper variables defined. +; +; For pgsql, make sure all the proper libs are installed, that "make menuselect" +; shows that the modules are available, and the cdr_pgsql.conf file exists, and +; has a [global] section with the proper variables defined. +; +; For logging to radius databases, make sure all the proper libs are installed, that +; "make menuselect" shows that the modules are available, and the [radius] +; category is defined in this file, and in that section, make sure the 'radiuscfg' +; variable is properly pointing to an existing radiusclient.conf file. +; +; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory, +; which is usually /var/log/asterisk. Of course, the proper libraries should be available +; during the 'configure' operation. +; +; For tds logging, make sure the proper libraries are available during the 'configure' +; phase, and that cdr_tds.conf exists and is properly set up with a [global] category. +; +; Also, remember, that if you wish to log CDR info to a database, you will have to define +; a specific table in that databse to make things work! See the doc directory for more details +; on how to create this table in each database. +; + +[csv] +usegmtime=yes ; log date/time in GMT. Default is "no" +loguniqueid=yes ; log uniqueid. Default is "no" +loguserfield=yes ; log user field. Default is "no" +accountlogs=yes ; create separate log file for each account code. Default is "yes" + +;[radius] +;usegmtime=yes ; log date/time in GMT +;loguniqueid=yes ; log uniqueid +;loguserfield=yes ; log user field +; Set this to the location of the radiusclient-ng configuration file +; The default is /etc/radiusclient-ng/radiusclient.conf +;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf diff --git a/asterisk/cdr_adaptive_odbc.conf b/asterisk/cdr_adaptive_odbc.conf new file mode 100644 index 0000000..f3c806e --- /dev/null +++ b/asterisk/cdr_adaptive_odbc.conf @@ -0,0 +1,60 @@ +; The point of this module is to allow you log whatever you like in terms of +; the CDR variables. Do you want to log uniqueid? Then simply ensure that +; your table has that column. If you don't want the column, ensure that it +; does not exist in the table structure. If you'd like to call uniqueid +; something else in your table, simply provide an alias in the configuration +; file that maps the standard CDR field name (uniqueid) to whatever column +; name you like. Perhaps you'd like some extra CDR values logged that aren't +; in the standard repertoire of CDR variables (some that come to mind are +; certain values used for LCR: route, per_minute_cost, and per_minute_price). +; Simply set those CDR variables in your dialplan, i.e. Set(CDR(route)=27), +; ensure that a corresponding column exists in your table, and cdr_adaptive_odbc +; will do the rest. +; +; This configuration defines the connections and tables for which CDRs may +; be populated. Each context specifies a different CDR table to be used. +; +; The columns in the tables should match up word-for-word (case-insensitive) +; to the CDR variables set in the dialplan. The natural advantage to this +; system is that beyond setting up the configuration file to tell you what +; tables to look at, there isn't anything more to do beyond creating the +; columns for the fields that you want, and populating the corresponding +; CDR variables in the dialplan. For the builtin variables only, you may +; create aliases for the real column name. +; +; Please note that after adding columns to the database, it is necessary to +; reload this module to get the new column names and types read. +; +; Warning: if you specify two contexts with exactly the same connection and +; table names, you will get duplicate records in that table. So be careful. +; + +;[first] +;connection=mysql1 +;table=cdr + +;[second] +;connection=mysql1 +;table=extracdr + +;[third] +;connection=sqlserver +;table=AsteriskCDR +;schema=public ; for databases which support schemas +;usegmtime=yes ; defaults to no +;alias src => source +;alias channel => source_channel +;alias dst => dest +;alias dstchannel => dest_channel +; +; Any filter specified MUST match exactly or the CDR will be discarded +;filter accountcode => somename +;filter src => 123 +; Negative filters are also now available +;filter src != 456 +; +; Additionally, we now support setting static values per column. The reason +; for this is to allow different sections to specify different values for +; a certain named column, presumably separated by filters. +;static "Some Special Value" => identifier_code + diff --git a/asterisk/cdr_custom.conf b/asterisk/cdr_custom.conf new file mode 100644 index 0000000..bec9e33 --- /dev/null +++ b/asterisk/cdr_custom.conf @@ -0,0 +1,14 @@ +; +; Mappings for custom config file +; +; To get your CSV output in a format tailored to your liking, uncomment the +; following lines and look for the output in the cdr-custom directory (usually +; in /var/log/asterisk). Depending on which mapping you uncomment, you may see +; Master.csv, Simple.csv, or both. +; +;[mappings] +;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} +; +; High Resolution Time for billsec and duration fields +;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration,f)})},${CSV_QUOTE(${CDR(billsec,f)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} +;Simple.csv => ${CSV_QUOTE(${EPOCH})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})} diff --git a/asterisk/cdr_manager.conf b/asterisk/cdr_manager.conf new file mode 100644 index 0000000..aa596b7 --- /dev/null +++ b/asterisk/cdr_manager.conf @@ -0,0 +1,15 @@ +; +; Asterisk Call Management CDR +; +[general] +enabled = no + +; The "mappings" category can be used to define additional "key: value" pairs +; that will be included in the manager event. (after AccountCode, Source, etc). +; +; Each line like "varname => label" will include a "label: ${CDR(varname)}" +; in the generated event where ${CDR(varname)} its replaced with its value +; +;[mappings] +;rate => Rate +;carrier => Carrier diff --git a/asterisk/cdr_mysql.conf b/asterisk/cdr_mysql.conf new file mode 100644 index 0000000..04b7049 --- /dev/null +++ b/asterisk/cdr_mysql.conf @@ -0,0 +1,60 @@ +; +; Note - if the database server is hosted on the same machine as the +; asterisk server, you can achieve a local Unix socket connection by +; setting hostname=localhost +; +; port and sock are both optional parameters. If hostname is specified +; and is not "localhost" (you can use address 127.0.0.1 instead), then +; cdr_mysql will attempt to connect to the port specified or use the +; default port. If hostname is not specified or if hostname is +; "localhost", then cdr_mysql will attempt to connect to the socket file +; specified by sock or otherwise use the default socket file. +; +;[global] +;hostname=database.host.name +;dbname=asteriskcdrdb +;table=cdr +;password=password +;user=asteriskcdruser +;port=3306 +;sock=/tmp/mysql.sock +;timezone=UTC ; Previously called usegmtime +; +; If your system's locale differs from mysql database character set, +; cdr_mysql can damage non-latin characters in CDR variables. Use this +; option to protect your data. +;charset=koi8r +; +; Older versions of cdr_mysql set the calldate field to whenever the +; record was posted, rather than the start date of the call. This flag +; reverts to the old (incorrect) behavior. Note that you'll also need +; to comment out the "start=calldate" alias, below, to use this. +;compat=no +; +; ssl connections (optional) +;ssl_ca= +;ssl_cert= +;ssl_key= +; +; You may also configure the field names used in the CDR table. +; +[columns] +;static "" => +;alias => +alias start => calldate +;alias clid => +;alias src => +;alias dst => +;alias dcontext => +;alias channel => +;alias dstchannel => +;alias lastapp => +;alias lastdata => +;alias duration => +;alias billsec => +;alias disposition => +;alias amaflags => +;alias accountcode => +;alias userfield => +;alias uniqueid => + diff --git a/asterisk/cdr_odbc.conf b/asterisk/cdr_odbc.conf new file mode 100644 index 0000000..93bd6ff --- /dev/null +++ b/asterisk/cdr_odbc.conf @@ -0,0 +1,11 @@ +; +; cdr_odbc.conf +; + +;[global] +;dsn=MySQL-test +;loguniqueid=yes +;dispositionstring=yes +;table=cdr ;"cdr" is default table name +;usegmtime=no ; set to "yes" to log in GMT +;hrtime=yes ;Enables microsecond accuracy with the billsec and duration fields diff --git a/asterisk/cdr_pgsql.conf b/asterisk/cdr_pgsql.conf new file mode 100644 index 0000000..7a90910 --- /dev/null +++ b/asterisk/cdr_pgsql.conf @@ -0,0 +1,15 @@ +; Sample Asterisk config file for CDR logging to PostgresSQL +; +; Note that you can use TLS connections to your database server. +; This is configured for your PostgreSQL client installation +; on this system (check for pgsessions.conf) + +[global] +;hostname=localhost +;port=5432 +;dbname=asterisk +;password=password +;user=postgres +;table=cdr ;SQL table where CDRs will be inserted +;encoding=LATIN9 ; Encoding of logged characters in Asterisk +;timezone=UTC ; Uncomment if you want datetime fields in UTC/GMT diff --git a/asterisk/cdr_sqlite3_custom.conf b/asterisk/cdr_sqlite3_custom.conf new file mode 100644 index 0000000..0d5dc09 --- /dev/null +++ b/asterisk/cdr_sqlite3_custom.conf @@ -0,0 +1,10 @@ +; +; Mappings for custom config file +; +[master] ; currently, only file "master.db" is supported, with only one table at a time. +;table => cdr +;columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, test +;values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}','${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}' + +;Enable High Resolution Times for billsec and duration fields +;values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration,f)}','${CDR(billsec,f)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}' diff --git a/asterisk/cdr_syslog.conf b/asterisk/cdr_syslog.conf new file mode 100644 index 0000000..3a619be --- /dev/null +++ b/asterisk/cdr_syslog.conf @@ -0,0 +1,83 @@ +; +; Asterisk Call Detail Records (CDR) - Syslog Backend +; + +; The cdr_syslog module writes CDRs using the facilities provided by syslog. +; +; Not only must you configure cdr_syslog from this file (cdr_syslog.conf) but +; you will also need to make changes to your /etc/syslog.conf before CDRs will +; be written to syslog. +; +; As an example, you can add the following to /etc/syslog.conf: +; +; local4.info /var/log/asterisk-cdr.log +; +; And then instruct syslogd to re-read the configuration file by sending it a +; HUP signal. On Linux this can be done like this: +; +; kill -HUP `cat /var/run/syslogd.pid` +; +; Finally, you will need to uncomment the [cdr-simple] section below, and restart +; Asterisk. When calls are placed, you should start seeing records appear in +; /var/log/asterisk-cdr.log. + +[general] +; Facility +; +; The 'facility' keyword specifies the syslog facility to use when writing out +; CDRs. +; +; Accepted values: One of the following: +; user, local0, local1, local2, local3, local4, local5, local6 +; and local7. +; +; Note: Depending on your platform, the following may also be +; available: +; auth, authpriv, cron, daemon, ftp, kern, lpr, mail, +; news, syslog, and uucp. +; +; Default value: local4 + +;facility=local0 + +; Priority +; +; Use the 'priority' keyword to select which of the syslog priority levels to +; use when logging CDRs. +; +; Accepted values: One of the following: +; alert, crit, debug, emerg, err, info, notice, warning +; Default value: info + +;priority=warn + +; Note: The settings for 'facility' and 'priority' in the [general] section +; define the default values for all of the logging locations created +; below in separate sections. + +;[cdr-master] +;facility = local5 +;priority = debug + +; Template +; +; The 'template' value allows you to specify a custom format for messages +; written to syslog. This is similar to how cdr_custom is configured. +; +; Allowed values: A diaplan style string. +; Default value: None, this is required field. +; +; Note: Because of the way substitution is done, the only meaningful values +; available when the record is logged are those available via the CDR() +; dialplan function. All other channel variables will be unavailable. + +;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}" + +; High Resolution Time for billsec and duration fields +;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration,f)}","${CDR(billsec,f)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}" +;[cdr-simple] + +; Since we don't specify a facility or priority for this logging location, the +; records will use the defaults specified in the [general] section. + +;template = "We received a call from ${CDR(src)}" diff --git a/asterisk/cdr_tds.conf b/asterisk/cdr_tds.conf new file mode 100644 index 0000000..309599e --- /dev/null +++ b/asterisk/cdr_tds.conf @@ -0,0 +1,78 @@ +; +; Asterisk Call Detail Records (CDR) - FreeTDS Backend +; + +;[global] + +; Connection +; +; Use the 'connection' keyword to specify one of the instance names from your +; 'freetds.conf' file. Note that 'freetds.conf' is not an Asterisk +; configuration file, but one specific to the FreeTDS library. See the FreeTDS +; documentation on 'freetds.conf' for more information: +; +; http://www.freetds.org/userguide/freetdsconf.htm +; +; Accepted values: One of the connections specified in freetds.conf + +;connection=ConnectionFromFreeTDSConf + +; Database Name +; +; The 'dbname' keyword specifies the database name to use when logging CDRs. +; +; Accepted values: Any valid database name + +;dbname=AsteriskCDRs + +; Database Table Name +; +; The 'table' keyword identifies which database table is used to log CDRs. +; +; Accepted value: Any valid table name +; Default value: If not specified, a table named 'cdr' is assumed + +;table=cdr + +; Credentials +; +; The 'username' and 'password' keywords specify the user credentials that +; Asterisk should use when connecting to the database. +; +; Accepted value: Any valid username and password + +;username=mangUsr +;password= + +; Language +; +; The 'language' keyword changes the language which are used for error and +; information messages returned by SQL Server. Each database and user has their +; own default value, and this default can be overriden here. +; +; Accepted value: Any language installed on the target SQL Server. +; Default value: us_english + +;language=us_english + +; Character Set +; +; The 'charset' setting is used to change the character set used when connecting +; to the database server. Each database and database user has their own +; character set setting, and this default can be overriden here. +; +; Accepted value: Any valid character set available on the target SQL server. +; Default value: iso_1 + +;charset=BIG5 + +; High Resolution Times +; +; The 'hrtime' setting is used to store high resolution (sub second) times for +; billsec and duration fields. +; +; Accepted value: true or false +; Default value: false + +;hrtime=false + diff --git a/asterisk/cel.conf b/asterisk/cel.conf new file mode 100644 index 0000000..7bd7f89 --- /dev/null +++ b/asterisk/cel.conf @@ -0,0 +1,126 @@ +; +; Asterisk Channel Event Logging (CEL) +; + +; Channel Event Logging is a mechanism to provide fine-grained event information +; that can be used to generate billing information. Such event information can +; be recorded to various backend modules. +; + +[general] + +; CEL Activation +; +; Use the 'enable' keyword to turn CEL on or off. +; +; Accepted values: yes and no +; Default value: no + +;enable=yes + +; Application Tracking +; +; Use the 'apps' keyword to specify the list of applications for which you want +; to receive CEL events. This is a comma separated list of Asterisk dialplan +; applications, such as Dial, Queue, and Park. +; +; Accepted values: A comma separated list of Asterisk dialplan applications +; Default value: none +; +; Note: You may also use 'all' which will result in CEL events being reported +; for all Asterisk applications. This may affect Asterisk's performance +; significantly. + +apps=dial,park + +; Event Tracking +; +; Use the 'events' keyword to specify the list of events which you want to be +; raised when they occur. This is a comma separated list of the values in the +; table below. +; +; Accepted values: A comma separated list of one or more of the following: +; ALL -- Generate entries on all events +; CHAN_START -- The time a channel was created +; CHAN_END -- The time a channel was terminated +; ANSWER -- The time a channel was answered (ie, phone taken off-hook) +; HANGUP -- The time at which a hangup occurred +; CONF_ENTER -- The time a channel was connected into a conference room +; CONF_EXIT -- The time a channel was removed from a conference room +; CONF_START -- The time the first person enters a conference room +; CONF_END -- The time the last person left a conference room (and +; turned out the lights?) +; APP_START -- The time a tracked application was started +; APP_END -- the time a tracked application ended +; PARK_START -- The time a call was parked +; PARK_END -- Unpark event +; BRIDGE_START -- The time a bridge is started +; BRIDGE_END -- The time a bridge is ended +; BRIDGE_UPDATE -- This is a replacement channel (Masquerade) +; 3WAY_START -- When a 3-way conference starts (usually via attended transfer) +; 3WAY_END -- When one or all exit a 3-way conference +; BLINDTRANSFER -- When a blind transfer is initiated +; ATTENDEDTRANSFER -- When an attended transfer is initiated +; TRANSFER -- Generic transfer initiated; not used yet...? +; PICKUP -- This channel picked up the peer channel +; FORWARD -- This channel is being forwarded somewhere else +; HOOKFLASH -- So far, when a hookflash event occurs on a DAHDI +; interface +; LINKEDID_END -- The last channel with the given linkedid is retired +; USER_DEFINED -- Triggered from the dialplan, and has a name given by the +; user +; +; Default value: none +; (Track no events) + +events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_START,BRIDGE_END + +; Date Format +; +; Use the 'dateformat' keyword to specify the date format used when CEL events +; are raised. +; +; Accepted values: A strftime format string (see man strftime) +; +; Example: "%F %T" +; -> This gives the date and time in the format "2009-06-23 17:02:35" +; +; If this option is not specified, the default format is "." +; since epoch. The microseconds field will always be 6 digits in length, meaning it +; may have leading zeros. +; +;dateformat = %F %T + +; +; Asterisk Manager Interface (AMI) CEL Backend +; +[manager] + +; AMI Backend Activation +; +; Use the 'enable' keyword to turn CEL logging to the Asterisk Manager Interface +; on or off. +; +; Accepted values: yes and no +; Default value: no +;enabled=yes + +; Use 'show_user_defined' to put "USER_DEFINED" in the EventName header, +; instead of (by default) just putting the user defined event name there. +; When enabled the UserDefType header is added for user defined events to +; provide the user defined event name. +; +;show_user_defined=yes + +; +; RADIUS CEL Backend +; +[radius] +; +; Log date/time in GMT +;usegmtime=yes +; +; Set this to the location of the radiusclient-ng configuration file +; The default is /etc/radiusclient-ng/radiusclient.conf +;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf +; diff --git a/asterisk/cel_custom.conf b/asterisk/cel_custom.conf new file mode 100644 index 0000000..126248a --- /dev/null +++ b/asterisk/cel_custom.conf @@ -0,0 +1,35 @@ +; +; Asterisk Channel Event Logging (CEL) - Custom CSV Backend +; + +; This is the configuration file for the customizable CSV backend for CEL +; logging. +; +; In order to create custom CSV logs for CEL, uncomment the template below +; (Master.csv) and start Asterisk. Once CEL events are generated, a file will +; appear in the following location: +; +; /var/log/asterisk/cel-custom/Master.csv +; +; (Note that /var/log/asterisk is the default and may differ on your system) +; +; You can also create more than one template if desired. All logs will appear +; in the cel-custom directory under your Asterisk logs directory. +; + +; +; Within a mapping, use the CALLERID() and CHANNEL() functions to retrieve +; details from the CEL event. There are also a few variables created by this +; module that can be used in a mapping: +; +; eventtype - The name of the CEL event. +; eventtime - The timestamp of the CEL event. +; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event. +; userdeftype - User defined event type name from CELGenUserEvent(). +; eventextra - Extra data included with this CEL event, typically along with +; an event of type USER_DEFINED from CELGenUserEvent(). +; BRIDGEPEER - Bridged peer channel name at the time of the CEL event. +; CHANNEL(peer) could also be used. +; +[mappings] +;Master.csv => ${CSV_QUOTE(${eventtype})},${CSV_QUOTE(${eventtime})},${CSV_QUOTE(${CALLERID(name)})},${CSV_QUOTE(${CALLERID(num)})},${CSV_QUOTE(${CALLERID(ANI)})},${CSV_QUOTE(${CALLERID(RDNIS)})},${CSV_QUOTE(${CALLERID(DNID)})},${CSV_QUOTE(${CHANNEL(exten)})},${CSV_QUOTE(${CHANNEL(context)})},${CSV_QUOTE(${CHANNEL(channame)})},${CSV_QUOTE(${CHANNEL(appname)})},${CSV_QUOTE(${CHANNEL(appdata)})},${CSV_QUOTE(${CHANNEL(amaflags)})},${CSV_QUOTE(${CHANNEL(accountcode)})},${CSV_QUOTE(${CHANNEL(uniqueid)})},${CSV_QUOTE(${CHANNEL(linkedid)})},${CSV_QUOTE(${BRIDGEPEER})},${CSV_QUOTE(${CHANNEL(userfield)})},${CSV_QUOTE(${userdeftype})},${CSV_QUOTE(${eventextra})} diff --git a/asterisk/cel_odbc.conf b/asterisk/cel_odbc.conf new file mode 100644 index 0000000..0c0b83f --- /dev/null +++ b/asterisk/cel_odbc.conf @@ -0,0 +1,108 @@ +; +; Asterisk Channel Event Logging (CEL) - Adaptive ODBC Backend +; + +; General module options category. +[general] +; Use 'show_user_defined' to put "USER_DEFINED" in the eventtype field, +; instead of (by default) just putting the user defined event name there. +; +;show_user_defined=yes + +; This configuration defines the connections and tables for which CEL records +; may be populated. Each context specifies a different CEL table to be used. +; +; The columns in the tables should match up word-for-word (case-insensitive) to +; the CEL variables set in the dialplan. The natural advantage to this system +; is that beyond setting up the configuration file to tell you what tables to +; look at, there isn't anything more to do beyond creating the columns for the +; fields that you want, and populating the corresponding CEL variables in the +; dialplan. +; +; Please note that after adding columns to the database, it is necessary to +; reload this module to get the new column names and types read. +; +; Warning: if you specify two contexts with exactly the same connection and +; table names, you will get duplicate records in that table. So be careful. +; +; CEL FIELDS: +; eventtype +; CHANNEL_START = 1 +; CHANNEL_END = 2 +; HANGUP = 3 +; ANSWER = 4 +; APP_START = 5 +; APP_END = 6 +; BRIDGE_START = 7 +; BRIDGE_END = 8 +; CONF_START = 9 +; CONF_END = 10 +; PARK_START = 11 +; PARK_END = 12 +; BLINDTRANSFER = 13 +; ATTENDEDTRANSFER = 14 +; TRANSFER = 15 +; HOOKFLASH = 16 +; 3WAY_START = 17 +; 3WAY_END = 18 +; CONF_ENTER = 19 +; CONF_EXIT = 20 +; USER_DEFINED = 21 +; LINKEDID_END = 22 +; BRIDGE_UPDATE = 23 +; PICKUP = 24 +; FORWARD = 25 +; eventtime (timeval, includes microseconds) +; userdeftype (set only if eventtype == USER_DEFINED) +; cid_name +; cid_num +; cid_ani +; cid_rdnis +; cid_dnid +; exten +; context +; channame +; appname +; appdata +; accountcode +; peeraccount +; uniqueid +; linkedid +; amaflags (an int) +; userfield +; peer +; extra + +; The point of this module is to allow you log whatever you like in terms of the +; CEL variables. Do you want to log uniqueid? Then simply ensure that your +; table has that column. If you don't want the column, ensure that it does not +; exist in the table structure. If you'd like to call uniqueid something else +; in your table, simply provide an alias in this file that maps the standard CEL +; field name (uniqueid) to whatever column name you like. + +;[first] +;connection=mysql1 +;table=cel + +;[second] +;connection=mysql1 +;table=extracel + +;[third] +;connection=sqlserver +;table=AsteriskCEL +;usegmtime=yes ; defaults to no +;allowleapsecond=no ; allow leap second in SQL column for eventtime, default yes. +;alias src => source +;alias channel => source_channel +;alias dst => dest +;alias dstchannel => dest_channel + +; Any filter specified MUST match exactly or the event will be discarded +;filter accountcode => somename +;filter src => 123 + +; Additionally, we now support setting static values per column. Reason +; for this is to allow different sections to specify different values for +; a certain named column, presumably separated by filters. +;static "Some Special Value" => identifier_code diff --git a/asterisk/cel_pgsql.conf b/asterisk/cel_pgsql.conf new file mode 100644 index 0000000..cc9b9ff --- /dev/null +++ b/asterisk/cel_pgsql.conf @@ -0,0 +1,67 @@ +; +; Asterisk Channel Event Logging (CEL) - PostgreSQL Backend +; + +; Sample Asterisk config file for CEL logging to PostgreSQL +; +; CEL field names: +; +; eventtype +; CHANNEL_START = 1 +; CHANNEL_END = 2 +; HANGUP = 3 +; ANSWER = 4 +; APP_START = 5 +; APP_END = 6 +; BRIDGE_START = 7 +; BRIDGE_END = 8 +; CONF_START = 9 +; CONF_END = 10 +; PARK_START = 11 +; PARK_END = 12 +; BLINDTRANSFER = 13 +; ATTENDEDTRANSFER = 14 +; TRANSFER = 15 +; HOOKFLASH = 16 +; 3WAY_START = 17 +; 3WAY_END = 18 +; CONF_ENTER = 19 +; CONF_EXIT = 20 +; USER_DEFINED = 21 +; LINKEDID_END = 22 +; BRIDGE_UPDATE = 23 +; PICKUP = 24 +; FORWARD = 25 +; eventtime (timeval, includes microseconds) +; userdeftype (set only if eventtype == USER_DEFINED) +; cid_name +; cid_num +; cid_ani +; cid_rdnis +; cid_dnid +; exten +; context +; channame +; appname +; appdata +; accountcode +; peeraccount +; uniqueid +; linkedid +; amaflags (an int) +; userfield +; peer +; extra + +[global] +; Use 'show_user_defined' to put "USER_DEFINED" in the eventtype field, +; instead of (by default) just putting the user defined event name there. +; +;show_user_defined=yes + +;hostname=localhost +;port=5432 +;dbname=asterisk +;password=password +;user=postgres +;table=cel ;SQL table where CEL's will be inserted diff --git a/asterisk/cel_sqlite3_custom.conf b/asterisk/cel_sqlite3_custom.conf new file mode 100644 index 0000000..2d9a24f --- /dev/null +++ b/asterisk/cel_sqlite3_custom.conf @@ -0,0 +1,24 @@ +; +; Asterisk Channel Event Logging (CEL) - SQLite 3 Backend +; + +; +; Mappings for sqlite3 config file +; +; Within a mapping, use the CALLERID() and CHANNEL() functions to retrieve +; details from the CEL event. There are also a few variables created by this +; module that can be used in a mapping: +; +; eventtype - The name of the CEL event. +; eventtime - The timestamp of the CEL event. +; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event. +; userdeftype - User defined event type name from CELGenUserEvent(). +; eventextra - Extra data included with this CEL event, typically along with +; an event of type USER_DEFINED from CELGenUserEvent(). +; BRIDGEPEER - Bridged peer channel name at the time of the CEL event. +; CHANNEL(peer) could also be used. +; +;[master] ; currently, only file "master.db" is supported, with only one table at a time. +;table => cel +;columns => eventtype, eventtime, cidname, cidnum, cidani, cidrdnis, ciddnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra +;values => '${eventtype}','${eventtime}','${CALLERID(name)}','${CALLERID(num)}','${CALLERID(ANI)}','${CALLERID(RDNIS)}','${CALLERID(DNID)}','${CHANNEL(context)}','${CHANNEL(exten)}','${CHANNEL(channame)}','${CHANNEL(appname)}','${CHANNEL(appdata)}','${CHANNEL(amaflags)}','${CHANNEL(accountcode)}','${CHANNEL(uniqueid)}','${CHANNEL(userfield)}','${BRIDGEPEER}','${userdeftype}','${eventextra}' diff --git a/asterisk/cel_tds.conf b/asterisk/cel_tds.conf new file mode 100644 index 0000000..399093b --- /dev/null +++ b/asterisk/cel_tds.conf @@ -0,0 +1,69 @@ +; +; Asterisk Channel Event Logging (CEL) - FreeTDS Backend +; + +;[global] + +; Connection +; +; Use the 'connection' keyword to specify one of the instance names from your +; 'freetds.conf' file. Note that 'freetds.conf' is not an Asterisk +; configuration file, but one specific to the FreeTDS library. See the FreeTDS +; documentation on 'freetds.conf' for more information: +; +; http://www.freetds.org/userguide/freetdsconf.htm +; +; Accepted values: One of the connections specified in freetds.conf + +;connection=ConnectionFromFreeTDSConf + +; Database Name +; +; The 'dbname' keyword specifies the database name to use when logging CEL +; records. +; +; Accepted values: Any valid database name + +;dbname=MalicoHN + +; Database Table Name +; +; The 'table' keyword identifies which database table is used to log CEL +; records. +; +; Accepted value: Any valid table name +; Default value: If not specified, a table named 'cel' is assumed + +;table=cel + +; Credentials +; +; The 'username' and 'password' keywords specify the user credentials that +; Asterisk should use when connecting to the database. +; +; Accepted value: Any valid username and password + +;username=mangUsr +;password= + +; Language +; +; The 'language' keyword changes the language which are used for error and +; information messages returned by SQL Server. Each database and user has their +; own default value, and this default can be overriden here. +; +; Accepted value: Any language installed on the target SQL Server. +; Default value: Server default + +;language=us_english + +; Character Set +; +; The 'charset' setting is used to change the character set used when connecting +; to the database server. Each database and database user has their own +; character set setting, and this default can be overriden here. +; +; Accepted value: Any valid character set available on the target server. +; Default value: Server setting + +;charset=BIG5 diff --git a/asterisk/chan_dahdi.conf b/asterisk/chan_dahdi.conf new file mode 100644 index 0000000..dfd6e52 --- /dev/null +++ b/asterisk/chan_dahdi.conf @@ -0,0 +1,1618 @@ +; +; DAHDI Telephony Configuration file +; +; You need to restart Asterisk to re-configure the DAHDI channel +; CLI> module reload chan_dahdi.so +; will reload the configuration file, but not all configuration options +; are re-configured during a reload (signalling, as well as PRI and +; SS7-related settings cannot be changed on a reload). +; +; This file documents many configuration variables. Normally unless you know +; what a variable means or that it should be changed, there's no reason to +; un-comment those lines. +; +; Examples below that are commented out (those lines that begin with a ';' but +; no space afterwards) typically show a value that is not the default value, +; but would make sense under certain circumstances. The default values are +; usually sane. Thus you should typically not touch them unless you know what +; they mean or you know you should change them. + +[trunkgroups] +; +; Trunk groups are used for NFAS connections. +; +; Group: Defines a trunk group. +; trunkgroup => ,[,...] +; +; trunkgroup is the numerical trunk group to create +; dchannel is the DAHDI channel which will have the +; d-channel for the trunk. +; backup1 is an optional list of backup d-channels. +; +;trunkgroup => 1,24,48 +;trunkgroup => 1,24 +; +; Spanmap: Associates a span with a trunk group +; spanmap => ,[,] +; +; dahdispan is the DAHDI span number to associate +; trunkgroup is the trunkgroup (specified above) for the mapping +; logicalspan is the logical span number within the trunk group to use. +; if unspecified, no logical span number is used. +; +;spanmap => 1,1,1 +;spanmap => 2,1,2 +;spanmap => 3,1,3 +;spanmap => 4,1,4 + +[channels] +; +; Default language +; +;language=en +; +; Context for incoming calls. Defaults to 'default' +; +context=public +; +; Switchtype: Only used for PRI. +; +; national: National ISDN 2 (default) +; dms100: Nortel DMS100 +; 4ess: AT&T 4ESS +; 5ess: Lucent 5ESS +; euroisdn: EuroISDN (common in Europe) +; ni1: Old National ISDN 1 +; qsig: Q.SIG +; +;switchtype=euroisdn +; +; MSNs for ISDN spans. Asterisk will listen for the listed numbers on +; incoming calls and ignore any calls not listed. +; Here you can give a comma separated list of numbers or dialplan extension +; patterns. An empty list disables MSN matching to allow any incoming call. +; Only set on PTMP CPE side of ISDN span if needed. +; The default is an empty list. +;msn= +; +; Some switches (AT&T especially) require network specific facility IE. +; Supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet' +; +; nsf cannot be changed on a reload. +; +;nsf=none +; +;service_message_support=yes +; Enable service message support for channel. Must be set after switchtype. +; +; Dialing options for ISDN (i.e., Dial(DAHDI/g1/exten/options)): +; R Reverse Charge Indication +; Indicate to the called party that the call will be reverse charged. +; K(n) Keypad digits n +; Send out the specified digits as keypad digits. +; +; PRI Dialplan: The ISDN-level Type Of Number (TON) or numbering plan, used for +; the dialed number. Leaving this as 'unknown' (the default) works for most +; cases. In some very unusual circumstances, you may need to set this to +; 'dynamic' or 'redundant'. +; +; unknown: Unknown +; private: Private ISDN +; local: Local ISDN +; national: National ISDN +; international: International ISDN +; dynamic: Dynamically selects the appropriate dialplan using the +; prefix settings. +; redundant: Same as dynamic, except that the underlying number is not +; changed (not common) +; +; pridialplan cannot be changed on reload. +;pridialplan=unknown +; +; PRI Local Dialplan: Only RARELY used for PRI (sets the calling number's +; numbering plan). In North America, the typical use is sending the 10 digit +; callerID number and setting the prilocaldialplan to 'national' (the default). +; Only VERY rarely will you need to change this. +; +; unknown: Unknown +; private: Private ISDN +; local: Local ISDN +; national: National ISDN +; international: International ISDN +; from_channel: Use the CALLERID(ton) value from the channel. +; dynamic: Dynamically selects the appropriate dialplan using the +; prefix settings. +; redundant: Same as dynamic, except that the underlying number is not +; changed (not common) +; +; prilocaldialplan cannot be changed on reload. +;prilocaldialplan=national +; +; PRI Connected Line Dialplan: Sets the connected party number's numbering plan. +; +; unknown: Unknown +; private: Private ISDN +; local: Local ISDN +; national: National ISDN +; international: International ISDN +; from_channel: Use the CONNECTEDLINE(ton) value from the channel. +; dynamic: Dynamically selects the appropriate dialplan using the +; prefix settings. +; redundant: Same as dynamic, except that the underlying number is not +; changed (not common) +; +; pricpndialplan cannot be changed on reload. +;pricpndialplan=from_channel +; +; pridialplan may be also set at dialtime, by prefixing the dialed number with +; one of the following letters: +; U - Unknown +; I - International +; N - National +; L - Local (Net Specific) +; S - Subscriber +; V - Abbreviated +; R - Reserved (should probably never be used but is included for completeness) +; +; Additionally, you may also set the following NPI bits (also by prefixing the +; dialed string with one of the following letters): +; u - Unknown +; e - E.163/E.164 (ISDN/telephony) +; x - X.121 (Data) +; f - F.69 (Telex) +; n - National +; p - Private +; r - Reserved (should probably never be used but is included for completeness) +; +; You may also set the prilocaldialplan in the same way, but by prefixing the +; Caller*ID Number rather than the dialed number. + +; Please note that telcos which require this kind of additional manipulation +; of the TON/NPI are *rare*. Most telco PRIs will work fine simply by +; setting pridialplan to unknown or dynamic. +; +; +; PRI caller ID prefixes based on the given TON/NPI (dialplan) +; This is especially needed for EuroISDN E1-PRIs +; +; None of the prefix settings can be changed on reload. +; +; sample 1 for Germany +;internationalprefix = 00 +;nationalprefix = 0 +;localprefix = 0711 +;privateprefix = 07115678 +;unknownprefix = +; +; sample 2 for Germany +;internationalprefix = + +;nationalprefix = +49 +;localprefix = +49711 +;privateprefix = +497115678 +;unknownprefix = +; +; PRI resetinterval: sets the time in seconds between restart of unused +; B channels; defaults to 'never'. +; +;resetinterval = 3600 +; +; Assume inband audio may be present when a SETUP ACK message is received. +; Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a +; dialtone is sent from the network side, progress indicator 8 "Inband info +; now available" MAY be sent to the CPE if no digits were received with +; the SETUP. It is thus implied that the ie is mandatory if digits came +; with the SETUP and dialtone is needed. +; This option should be enabled, when the network sends dialtone and you +; want to hear it, but the network doesn't send the progress indicator when +; needed. +; +; NOTE: For Q.SIG setups this option should be enabled when outgoing overlap +; dialing is also enabled because Q.SIG does not send the progress indicator +; with the SETUP ACK. +; Default yes in current release branches for backward compatibility. +; +;inband_on_setup_ack=yes +; +; Assume inband audio may be present when a PROCEEDING message is received. +; Q.931 Section 5.1.2 says the network cannot assume that the CPE side has +; attached to the B channel at this time without explicitly sending the +; progress indicator ie informing the CPE side to attach to the B channel +; for audio. However, some non-compliant ISDN switches send a PROCEEDING +; without the progress indicator ie indicating inband audio is available and +; assume that the CPE device has connected the media path for listening to +; ringback and other messages. +; Default yes in current release branches for backward compatibility. +; +;inband_on_proceeding=yes +; +; Overlap dialing mode (sending overlap digits) +; Cannot be changed on a reload. +; +; incoming: incoming direction only +; outgoing: outgoing direction only +; no: neither direction +; yes or both: both directions +; +;overlapdial=yes + +; Send/receive ISDN display IE options. The display options are a comma separated +; list of the following options: +; +; block: Do not pass display text data. +; Q.SIG: Default for send/receive. +; ETSI CPE: Default for send. +; name_initial: Use display text in SETUP/CONNECT messages as the party name. +; Default for all other modes. +; name_update: Use display text in other messages (NOTIFY/FACILITY) for COLP name +; update. +; name: Combined name_initial and name_update options. +; text: Pass any unused display text data as an arbitrary display message +; during a call. Sent text goes out in an INFORMATION message. +; +; * Default is an empty string for legacy behavior. +; * The name options are not recommended for Q.SIG since Q.SIG already +; supports names. +; * The send block is the only recommended setting for CPE mode since Q.931 uses +; the display IE only in the network to user direction. +; +; display_send and display_receive cannot be changed on reload. +; +;display_send= +;display_receive= + +; Allow sending an ISDN Malicious Caller ID (MCID) request on this span. +; Default disabled +; +;mcid_send=yes + +; Send ISDN date/time IE in CONNECT message option. Only valid on NT spans. +; +; no: Do not send date/time IE in CONNECT message. +; date: Send date only. +; date_hh Send date and hour. +; date_hhmm Send date, hour, and minute. +; date_hhmmss Send date, hour, minute, and second. +; +; Default is an empty string which lets libpri pick the default +; date/time IE send policy. +; +;datetime_send= + +; Send ISDN conected line information. +; +; block: Do not send any connected line information. +; connect: Send connected line information on initial connect. +; update: Same as connect but also send any updates during a call. +; Updates happen if the call is transferred. (Default) +; +;colp_send=update + +; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI +; +;inbanddisconnect=yes +; +; Allow a held call to be transferred to the active call on disconnect. +; This is useful on BRI PTMP NT lines where an ISDN phone can simulate the +; transfer feature of an analog phone. +; The default is no. +;hold_disconnect_transfer=yes + +; BRI PTMP layer 1 presence. +; You should normally not need to set this option. +; You may need to set this option if your telco brings layer 1 down when +; the line is idle. +; required: Layer 1 presence required for outgoing calls. (default) +; ignore: Ignore alarms from DAHDI about this span. +; (Layer 1 and 2 will be brought back up for an outgoing call.) +; NOTE: You will not be able to detect physical line problems +; until an outgoing call is attempted and fails. +; +;layer1_presence=ignore + +; BRI PTMP layer 2 persistence. +; You should normally not need to set this option. +; You may need to set this option if your telco brings layer 1 down when +; the line is idle. +; : Use libpri default. +; keep_up: Bring layer 2 back up if peer takes it down. +; leave_down: Leave layer 2 down if peer takes it down. (Libpri default) +; (Layer 2 will be brought back up for an outgoing call.) +; +;layer2_persistence=leave_down + +; PRI Out of band indications. +; Enable this to report Busy and Congestion on a PRI using out-of-band +; notification. Inband indication, as used by Asterisk doesn't seem to work +; with all telcos. +; +; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT +; inband: Signal Busy/Congestion using in-band tones (default) +; +; priindication cannot be changed on a reload. +; +;priindication = outofband +; +; If you need to override the existing channels selection routine and force all +; PRI channels to be marked as exclusively selected, set this to yes. +; +; priexclusive cannot be changed on a reload. +; +;priexclusive = yes +; +; +; If you need to use the logical channel mapping with your Q.SIG PRI instead +; of the physical mapping you must use the qsigchannelmapping option. +; +; logical: Use the logical channel mapping +; physical: Use physical channel mapping (default) +; +;qsigchannelmapping=logical +; +; If you wish to ignore remote hold indications (and use MOH that is supplied over +; the B channel) enable this option. +; +;discardremoteholdretrieval=yes +; +; ISDN Timers +; All of the ISDN timers and counters that are used are configurable. Specify +; the timer name, and its value (in ms for timers). +; K: Layer 2 max number of outstanding unacknowledged I frames (default 7) +; N200: Layer 2 max number of retransmissions of a frame (default 3) +; T200: Layer 2 max time before retransmission of a frame (default 1000 ms) +; T203: Layer 2 max time without frames being exchanged (default 10000 ms) +; T305: Wait for DISCONNECT acknowledge (default 30000 ms) +; T308: Wait for RELEASE acknowledge (default 4000 ms) +; T309: Maintain active calls on Layer 2 disconnection (default 6000 ms) +; EuroISDN: 6000 to 12000 ms, according to (N200 + 1) x T200 + 2s +; May vary in other ISDN standards (Q.931 1993 : 90000 ms) +; T313: Wait for CONNECT acknowledge, CPE side only (default 3000 ms) +; +; T-RESPONSE: Maximum time to wait for a typical APDU response. (default 4000 ms) +; This is an implementation timer when the standard does not specify one. +; T-ACTIVATE: Request supervision timeout. (default 10000 ms) +; T-RETENTION: Maximum time to wait for user A to activate call-completion. (default 30000 ms) +; Used by ETSI PTP, ETSI PTMP, and Q.SIG as the cc_offer_timer. +; T-CCBS1: T-STATUS timer equivalent for CC user A status. (default 4000 ms) +; T-CCBS2: Maximum time the CCBS service will be active (default 45 min in ms) +; T-CCBS3: Maximum time to wait for user A to respond to user B availability. (default 20000 ms) +; T-CCBS5: Network B CCBS supervision timeout. (default 60 min in ms) +; T-CCBS6: Network A CCBS supervision timeout. (default 60 min in ms) +; T-CCNR2: Maximum time the CCNR service will be active (default 180 min in ms) +; T-CCNR5: Network B CCNR supervision timeout. (default 195 min in ms) +; T-CCNR6: Network A CCNR supervision timeout. (default 195 min in ms) +; CC-T1: Q.SIG CC request supervision timeout. (default 30000 ms) +; CCBS-T2: Q.SIG CCBS supervision timeout. (default 60 min in ms) +; CCNR-T2: Q.SIG CCNR supervision timeout. (default 195 min in ms) +; CC-T3: Q.SIG CC Maximum time to wait for user A to respond to user B availability. (default 30000 ms) +; +;pritimer => t200,1000 +;pritimer => t313,4000 +; +; CC PTMP recall mode: +; specific - Only the CC original party A can participate in the CC callback +; global - Other compatible endpoints on the PTMP line can be party A in the CC callback +; +; cc_ptmp_recall_mode cannot be changed on a reload. +; +;cc_ptmp_recall_mode = specific +; +; CC Q.SIG Party A (requester) retain signaling link option +; retain Require that the signaling link be retained. +; release Request that the signaling link be released. +; do_not_care The responder is free to choose if the signaling link will be retained. +; +;cc_qsig_signaling_link_req = retain +; +; CC Q.SIG Party B (responder) retain signaling link option +; retain Prefer that the signaling link be retained. +; release Prefer that the signaling link be released. +; +;cc_qsig_signaling_link_rsp = retain +; +; See ccss.conf.sample for more options. The timers described by ccss.conf.sample +; are not used by ISDN for the native protocol since they are defined by the +; standards and set by pritimer above. +; +; To enable transmission of facility-based ISDN supplementary services (such +; as caller name from CPE over facility), enable this option. +; Cannot be changed on a reload. +; +;facilityenable = yes +; + +; This option enables Advice of Charge pass-through between the ISDN PRI and +; Asterisk. This option can be set to any combination of 's', 'd', and 'e' which +; represent the different variants of Advice of Charge, AOC-S, AOC-D, and AOC-E. +; Advice of Charge pass-through is currently only supported for ETSI. Since most +; AOC messages are sent on facility messages, the 'facilityenable' option must +; also be enabled to fully support AOC pass-through. +; +;aoc_enable=s,d,e +; +; When this option is enabled, a hangup initiated by the ISDN PRI side of the +; asterisk channel will result in the channel delaying its hangup in an +; attempt to receive the final AOC-E message from its bridge. The delay +; period is configured as one half the T305 timer length. If the channel +; is not bridged the hangup will occur immediatly without delay. +; +;aoce_delayhangup=yes + +; pritimer cannot be changed on a reload. +; +; Signalling method. The default is "auto". Valid values: +; auto: Use the current value from DAHDI. +; em: E & M +; em_e1: E & M E1 +; em_w: E & M Wink +; featd: Feature Group D (The fake, Adtran style, DTMF) +; featdmf: Feature Group D (The real thing, MF (domestic, US)) +; featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through +; a Tandem Access point +; featb: Feature Group B (MF (domestic, US)) +; fgccama: Feature Group C-CAMA (DP DNIS, MF ANI) +; fgccamamf: Feature Group C-CAMA MF (MF DNIS, MF ANI) +; fxs_ls: FXS (Loop Start) +; fxs_gs: FXS (Ground Start) +; fxs_ks: FXS (Kewl Start) +; fxo_ls: FXO (Loop Start) +; fxo_gs: FXO (Ground Start) +; fxo_ks: FXO (Kewl Start) +; pri_cpe: PRI signalling, CPE side +; pri_net: PRI signalling, Network side +; bri_cpe: BRI PTP signalling, CPE side +; bri_net: BRI PTP signalling, Network side +; bri_cpe_ptmp: BRI PTMP signalling, CPE side +; bri_net_ptmp: BRI PTMP signalling, Network side +; sf: SF (Inband Tone) Signalling +; sf_w: SF Wink +; sf_featd: SF Feature Group D (The fake, Adtran style, DTMF) +; sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US)) +; sf_featb: SF Feature Group B (MF (domestic, US)) +; e911: E911 (MF) style signalling +; ss7: Signalling System 7 +; mfcr2: MFC/R2 Signalling. To specify the country variant see 'mfcr2_variant' +; +; The following are used for Radio interfaces: +; fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the +; channel bank) +; fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the +; channel bank) +; fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the +; channel bank) +; fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at +; the channel bank) +; em_rx: Receive audio/COR on an E&M interface (1-way) +; em_tx: Transmit audio/PTT on an E&M interface (1-way) +; em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface +; (2-way) +; em_rxtx: Same as em_txrx (for our dyslexic friends) +; sf_rx: Receive audio/COR on an SF interface (1-way) +; sf_tx: Transmit audio/PTT on an SF interface (1-way) +; sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface +; (2-way) +; sf_rxtx: Same as sf_txrx (for our dyslexic friends) +; ss7: Signalling System 7 +; +; signalling of a channel can not be changed on a reload. +; +;signalling=fxo_ls +; +; If you have an outbound signalling format that is different from format +; specified above (but compatible), you can specify outbound signalling format, +; (see below). The 'signalling' format specified will be the inbound signalling +; format. If you only specify 'signalling', then it will be the format for +; both inbound and outbound. +; +; outsignalling can only be one of: +; em, em_e1, em_w, sf, sf_w, sf_featd, sf_featdmf, sf_featb, featd, +; featdmf, featdmf_ta, e911, fgccama, fgccamamf +; +; outsignalling cannot be changed on a reload. +; +;signalling=featdmf +; +;outsignalling=featb +; +; For Feature Group D Tandem access, to set the default CIC and OZZ use these +; parameters (Will not be updated on reload): +; +;defaultozz=0000 +;defaultcic=303 +; +; A variety of timing parameters can be specified as well +; The default values for those are "-1", which is to use the +; compile-time defaults of the DAHDI kernel modules. The timing +; parameters, (with the standard default from DAHDI): +; +; prewink: Pre-wink time (default 50ms) +; preflash: Pre-flash time (default 50ms) +; wink: Wink time (default 150ms) +; flash: Flash time (default 750ms) +; start: Start time (default 1500ms) +; rxwink: Receiver wink time (default 300ms) +; rxflash: Receiver flashtime (default 1250ms) +; debounce: Debounce timing (default 600ms) +; +; None of them will update on a reload. +; +; How long generated tones (DTMF and MF) will be played on the channel +; (in milliseconds). +; +; This is a global, rather than a per-channel setting. It will not be +; updated on a reload. +; +;toneduration=100 +; +; Whether or not to do distinctive ring detection on FXO lines: +; +;usedistinctiveringdetection=yes +; +; enable dring detection after caller ID for those countries like Australia +; where the ring cadence is changed *after* the caller ID spill: +; +;distinctiveringaftercid=yes +; +; Whether or not to use caller ID: +; +usecallerid=yes +; +; Type of caller ID signalling in use +; bell = bell202 as used in US (default) +; v23 = v23 as used in the UK +; v23_jp = v23 as used in Japan +; dtmf = DTMF as used in Denmark, Sweden and Netherlands +; smdi = Use SMDI for caller ID. Requires SMDI to be enabled (usesmdi). +; +;cidsignalling=v23 +; +; What signals the start of caller ID +; ring = a ring signals the start (default) +; polarity = polarity reversal signals the start +; polarity_IN = polarity reversal signals the start, for India, +; for dtmf dialtone detection; using DTMF. +; (see https://wiki.asterisk.org/wiki/display/AST/Caller+ID+in+India) +; dtmf = causes monitor loop to look for dtmf energy on the +; incoming channel to initate cid acquisition +; +;cidstart=polarity +; +; When cidstart=dtmf, the energy level on the line used to trigger dtmf cid +; acquisition. This number is compared to the average over a packet of audio +; of the absolute values of 16 bit signed linear samples. The default is set +; to 256. The choice of 256 is arbitrary. The value you should select should +; be high enough to prevent false detections while low enough to insure that +; no dtmf spills are missed. +; +;dtmfcidlevel=256 +; +; Whether or not to hide outgoing caller ID (Override with *67 or *82) +; (If your dialplan doesn't catch it) +; +;hidecallerid=yes +; +; Enable if you need to hide just the name and not the number for legacy PBX use. +; Only applies to PRI channels. +;hidecalleridname=yes +; +; On UK analog lines, the caller hanging up determines the end of calls. So +; Asterisk hanging up the line may or may not end a call (DAHDI could just as +; easily be re-attaching to a prior incoming call that was not yet hung up). +; This option changes the hangup to wait for a dialtone on the line, before +; marking the line as once again available for use with outgoing calls. +; Specified in milliseconds, not set by default. +;waitfordialtone=1000 +; +; For analog lines, enables Asterisk to use dialtone detection per channel +; if an incoming call was hung up before it was answered. If dialtone is +; detected, the call is hung up. +; no: Disabled. (Default) +; yes: Look for dialtone for 10000 ms after answer. +; : Look for dialtone for the specified number of ms after answer. +; always: Look for dialtone for the entire call. Dialtone may return +; if the far end hangs up first. +; +;dialtone_detect=no +; +; The following option enables receiving MWI on FXO lines. The default +; value is no. +; The mwimonitor can take the following values +; no - No mwimonitoring occurs. (default) +; yes - The same as specifying fsk +; fsk - the FXO line is monitored for MWI FSK spills +; fsk,rpas - the FXO line is monitored for MWI FSK spills preceded +; by a ring pulse alert signal. +; neon - The fxo line is monitored for the presence of NEON pulses +; indicating MWI. +; When detected, an internal Asterisk MWI event is generated so that any other +; part of Asterisk that cares about MWI state changes is notified, just as if +; the state change came from app_voicemail. +; For FSK MWI Spills, the energy level that must be seen before starting the +; MWI detection process can be set with 'mwilevel'. +; +;mwimonitor=no +;mwilevel=512 +; +; This option is used in conjunction with mwimonitor. This will get executed +; when incoming MWI state changes. The script is passed 2 arguments. The +; first is the corresponding mailbox, and the second is 1 or 0, indicating if +; there are messages waiting or not. +; +;mwimonitornotify=/usr/local/bin/dahdinotify.sh +; +; The following keyword 'mwisendtype' enables various VMWI methods on FXS lines (if supported). +; The default is to send FSK only. +; The following options are available; +; 'rpas' Ring Pulse Alert Signal, alerts intelligent phones that a FSK message is about to be sent. +; 'lrev' Line reversed to indicate messages waiting. +; 'hvdc' 90Vdc OnHook DC voltage to indicate messages waiting. +; 'hvac' or 'neon' 90Vac OnHook AC voltage to light Neon bulb. +; 'nofsk' Disables FSK MWI spills from being sent out. +; It is feasible that multiple options can be enabled. +;mwisendtype=rpas,lrev +; +; Whether or not to enable call waiting on internal extensions +; With this set to 'yes', busy extensions will hear the call-waiting +; tone, and can use hook-flash to switch between callers. The Dial() +; app will not return the "BUSY" result for extensions. +; +callwaiting=yes +; +; Configure the number of outstanding call waiting calls for internal ISDN +; endpoints before bouncing the calls as busy. This option is equivalent to +; the callwaiting option for analog ports. +; A call waiting call is a SETUP message with no B channel selected. +; The default is zero to disable call waiting for ISDN endpoints. +;max_call_waiting_calls=0 +; +; Allow incoming ISDN call waiting calls. +; A call waiting call is a SETUP message with no B channel selected. +;allow_call_waiting_calls=no + +; Configure the ISDN span to indicate MWI for the list of mailboxes. +; You can give a comma separated list of up to 8 mailboxes per span. +; An empty list disables MWI. +; The default is an empty list. +;mwi_mailboxes=mailbox_number[@context]{,mailbox_number[@context]} +; +; Configure the ISDN span voicemail numbers for MWI mailboxes. What number +; to call for a user to retrieve voicemail messages. +; +; You can give a comma separated list of numbers. The position of the number +; corresponds to the position in mwi_mailboxes. If a position is empty then +; the last number is reused. +; +; For example: +; mwi_vm_numbers=700,,800,,900 +; is equivalent to: +; mwi_vm_numbers=700,700,800,800,900 +; +; The default is no number. +;mwi_vm_numbers= + +; Whether or not restrict outgoing caller ID (will be sent as ANI only, not +; available for the user) +; Mostly use with FXS ports +; Does nothing. Use hidecallerid instead. +; +;restrictcid=no +; +; Whether or not to use the caller ID presentation from the Asterisk channel +; for outgoing calls. +; See dialplan function CALLERID(pres) for more information. +; Only applies to PRI and SS7 channels. +; +usecallingpres=yes +; +; Some countries (UK) have ring tones with different ring tones (ring-ring), +; which means the caller ID needs to be set later on, and not just after +; the first ring, as per the default (1). +; +;sendcalleridafter = 2 +; +; +; Support caller ID on Call Waiting +; +callwaitingcallerid=yes +; +; Support three-way calling +; +threewaycalling=yes +; +; For FXS ports (either direct analog or over T1/E1): +; Support flash-hook call transfer (requires three way calling) +; Also enables call parking (overrides the 'canpark' parameter) +; +; For digital ports using ISDN PRI protocols: +; Support switch-side transfer (called 2BCT, RLT or other names) +; This setting must be enabled on both ports involved, and the +; 'facilityenable' setting must also be enabled to allow sending +; the transfer to the ISDN switch, since it sent in a FACILITY +; message. +; NOTE: This should be disabled for NT PTMP mode. Phones cannot +; have tromboned calls pushed down to them. +; +transfer=yes +; +; Allow call parking +; ('canpark=no' is overridden by 'transfer=yes') +; +canpark=yes + +; Sets the default parking lot for call parking. +; This is setable per channel. +; Parkinglots are configured in features.conf +; +;parkinglot=plaza + +; +; Support call forward variable +; +cancallforward=yes +; +; Whether or not to support Call Return (*69, if your dialplan doesn't +; catch this first) +; +callreturn=yes +; +; Stutter dialtone support: If a mailbox is specified without a voicemail +; context, then when voicemail is received in a mailbox in the default +; voicemail context in voicemail.conf, taking the phone off hook will cause a +; stutter dialtone instead of a normal one. +; +; If a mailbox is specified *with* a voicemail context, the same will result +; if voicemail received in mailbox in the specified voicemail context. +; +; for default voicemail context, the example below is fine: +; +;mailbox=1234 +; +; for any other voicemail context, the following will produce the stutter tone: +; +;mailbox=1234@context +; +; Enable echo cancellation +; Use either "yes", "no", or a power of two from 32 to 256 if you wish to +; actually set the number of taps of cancellation. +; +; Note that when setting the number of taps, the number 256 does not translate +; to 256 ms of echo cancellation. echocancel=256 means 256 / 8 = 32 ms. +; +; Note that if any of your DAHDI cards have hardware echo cancellers, +; then this setting only turns them on and off; numeric settings will +; be treated as "yes". There are no special settings required for +; hardware echo cancellers; when present and enabled in their kernel +; modules, they take precedence over the software echo canceller compiled +; into DAHDI automatically. +; +; +echocancel=yes +; +; Some DAHDI echo cancellers (software and hardware) support adjustable +; parameters; these parameters can be supplied as additional options to +; the 'echocancel' setting. Note that Asterisk does not attempt to +; validate the parameters or their values, so if you supply an invalid +; parameter you will not know the specific reason it failed without +; checking the kernel message log for the error(s) put there by DAHDI. +; +;echocancel=128,param1=32,param2=0,param3=14 +; +; Generally, it is not necessary (and in fact undesirable) to echo cancel when +; the circuit path is entirely TDM. You may, however, change this behavior +; by enabling the echo canceller during pure TDM bridging below. +; +echocancelwhenbridged=yes +; +; In some cases, the echo canceller doesn't train quickly enough and there +; is echo at the beginning of the call. Enabling echo training will cause +; DAHDI to briefly mute the channel, send an impulse, and use the impulse +; response to pre-train the echo canceller so it can start out with a much +; closer idea of the actual echo. Value may be "yes", "no", or a number of +; milliseconds to delay before training (default = 400) +; +; WARNING: In some cases this option can make echo worse! If you are +; trying to debug an echo problem, it is worth checking to see if your echo +; is better with the option set to yes or no. Use whatever setting gives +; the best results. +; +; Note that these parameters do not apply to hardware echo cancellers. +; +;echotraining=yes +;echotraining=800 +; +; If you are having trouble with DTMF detection, you can relax the DTMF +; detection parameters. Relaxing them may make the DTMF detector more likely +; to have "talkoff" where DTMF is detected when it shouldn't be. +; +;relaxdtmf=yes +; +; You may also set the default receive and transmit gains (in dB) +; +; Gain Settings: increasing / decreasing the volume level on a channel. +; The values are in db (decibells). A positive number +; increases the volume level on a channel, and a +; negavive value decreases volume level. +; +; Dynamic Range Compression: you can also enable dynamic range compression +; on a channel. This will amplify quiet sounds while leaving +; louder sounds untouched. This is useful in situations where +; a linear gain setting would cause clipping. Acceptable values +; are in the range of 0.0 to around 6.0 with higher values +; causing more compression to be done. +; +; There are several independent gain settings: +; rxgain: gain for the rx (receive - into Asterisk) channel. Default: 0.0 +; txgain: gain for the tx (transmit - out of Asterisk Asterisk) channel. +; Default: 0.0 +; cid_rxgain: set the gain just for the caller ID sounds Asterisk +; emits. Default: 5.0 . +; rxdrc: dynamic range compression for the rx channel. Default: 0.0 +; txdrc: dynamic range compression for the tx channel. Default: 0.0 + +;rxgain=2.0 +;txgain=3.0 +; +;rxdrc=1.0 +;txdrc=4.0 +; +; Logical groups can be assigned to allow outgoing roll-over. Groups range +; from 0 to 63, and multiple groups can be specified. By default the +; channel is not a member of any group. +; +; Note that an explicit empty value for 'group' is invalid, and will not +; override a previous non-empty one. The same applies to callgroup and +; pickupgroup as well. +; +group=1 +; +; Ring groups (a.k.a. call groups) and pickup groups. If a phone is ringing +; and it is a member of a group which is one of your pickup groups, then +; you can answer it by picking up and dialing *8#. For simple offices, just +; make these both the same. Groups range from 0 to 63. +; +callgroup=1 +pickupgroup=1 +; +; Named ring groups (a.k.a. named call groups) and named pickup groups. +; If a phone is ringing and it is a member of a group which is one of your +; named pickup groups, then you can answer it by picking up and dialing *8#. +; For simple offices, just make these both the same. +; The number of named groups is not limited. +; +;namedcallgroup=engineering,sales,netgroup,protgroup +;namedpickupgroup=sales + +; Channel variable to be set for all calls from this channel +;setvar=CHANNEL=42 +;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will + ; cause the given audio file to + ; be played upon completion of + ; an attended transfer. + +; +; Specify whether the channel should be answered immediately or if the simple +; switch should provide dialtone, read digits, etc. +; Note: If immediate=yes the dialplan execution will always start at extension +; 's' priority 1 regardless of the dialed number! +; +;immediate=yes +; +; Specify whether flash-hook transfers to 'busy' channels should complete or +; return to the caller performing the transfer (default is yes). +; +;transfertobusy=no + +; Calls will have the party id user tag set to this string value. +; +;cid_tag= + +; With this set, you can automatically append the MSN of a party +; to the cid_tag. An '_' is used to separate the tag from the MSN. +; Applies to ISDN spans. +; Default is no. +; +; Table of what number is appended: +; outgoing incoming +; net dialed caller +; cpe caller dialed +; +;append_msn_to_cid_tag=no + +; caller ID can be set to "asreceived" or a specific number if you want to +; override it. Note that "asreceived" only applies to trunk interfaces. +; fullname sets just the +; +; fullname: sets just the name part. +; cid_number: sets just the number part: +; +;callerid = 123456 +; +;callerid = My Name <2564286000> +; Which can also be written as: +;cid_number = 2564286000 +;fullname = My Name +; +;callerid = asreceived +; +; should we use the caller ID from incoming call on DAHDI transfer? +; +;useincomingcalleridondahditransfer = yes +; +; Add a description for the channel which can be shown through the Asterisk +; console when executing the 'dahdi show channels' command is run. +; +;description=Phone located in lobby +; +; AMA flags affects the recording of Call Detail Records. If specified +; it may be 'default', 'omit', 'billing', or 'documentation'. +; +;amaflags=default +; +; Channels may be associated with an account code to ease +; billing +; +;accountcode=lss0101 +; +; ADSI (Analog Display Services Interface) can be enabled on a per-channel +; basis if you have (or may have) ADSI compatible CPE equipment +; +;adsi=yes +; +; SMDI (Simplified Message Desk Interface) can be enabled on a per-channel +; basis if you would like that channel to behave like an SMDI message desk. +; The SMDI port specified should have already been defined in smdi.conf. The +; default port is /dev/ttyS0. +; +;usesmdi=yes +;smdiport=/dev/ttyS0 +; +; On trunk interfaces (FXS) and E&M interfaces (E&M, Wink, Feature Group D +; etc, it can be useful to perform busy detection either in an effort to +; detect hangup or for detecting busies. This enables listening for +; the beep-beep busy pattern. +; +;busydetect=yes +; +; If busydetect is enabled, it is also possible to specify how many busy tones +; to wait for before hanging up. The default is 3, but it might be +; safer to set to 6 or even 8. Mind that the higher the number, the more +; time that will be needed to hangup a channel, but lowers the probability +; that you will get random hangups. +; +;busycount=6 +; +; If busydetect is enabled, it is also possible to specify the cadence of your +; busy signal. In many countries, it is 500msec on, 500msec off. Without +; busypattern specified, we'll accept any regular sound-silence pattern that +; repeats times as a busy signal. If you specify busypattern, +; then we'll further check the length of the sound (tone) and silence, which +; will further reduce the chance of a false positive. +; +;busypattern=500,500 +; +; NOTE: In make menuselect, you'll find further options to tweak the busy +; detector. If your country has a busy tone with the same length tone and +; silence (as many countries do), consider enabling the +; BUSYDETECT_COMPARE_TONE_AND_SILENCE option. +; +; To further detect which hangup tone your telco provider is sending, it is +; useful to use the dahdi_monitor utility to record the audio that main/dsp.c +; is receiving after the caller hangs up. +; +; For FXS (FXO signalled) ports +; switch the line polarity to signal the connected PBX that an outgoing +; call was answered by the remote party. +; For FXO (FXS signalled) ports +; watch for a polarity reversal to mark when a outgoing call is +; answered by the remote party. +; +;answeronpolarityswitch=yes +; +; For FXS (FXO signalled) ports +; switch the line polarity to signal the connected PBX that the current +; call was "hung up" by the remote party +; For FXO (FXS signalled) ports +; In some countries, a polarity reversal is used to signal the disconnect of a +; phone line. If the hanguponpolarityswitch option is selected, the call will +; be considered "hung up" on a polarity reversal. +; +;hanguponpolarityswitch=yes +; +; polarityonanswerdelay: minimal time period (ms) between the answer +; polarity switch and hangup polarity switch. +; (default: 600ms) +; +; On trunk interfaces (FXS) it can be useful to attempt to follow the progress +; of a call through RINGING, BUSY, and ANSWERING. If turned on, call +; progress attempts to determine answer, busy, and ringing on phone lines. +; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers, +; so don't count on it being very accurate. +; +; Few zones are supported at the time of this writing, but may be selected +; with "progzone". +; +; progzone also affects the pattern used for buzydetect (unless +; busypattern is set explicitly). The possible values are: +; us (default) +; ca (alias for 'us') +; cr (Costa Rica) +; br (Brazil, alias for 'cr') +; uk +; +; This feature can also easily detect false hangups. The symptoms of this is +; being disconnected in the middle of a call for no reason. +; +;callprogress=yes +;progzone=uk +; +; Set the tonezone. Equivalent of the defaultzone settings in +; /etc/dahdi/system.conf. This sets the tone zone by number. +; Note that you'd still need to load tonezones (loadzone in +; /etc/dahdi/system.conf). +; The default is -1: not to set anything. +;tonezone = 0 ; 0 is US +; +; FXO (FXS signalled) devices must have a timeout to determine if there was a +; hangup before the line was answered. This value can be tweaked to shorten +; how long it takes before DAHDI considers a non-ringing line to have hungup. +; +; ringtimeout will not update on a reload. +; +;ringtimeout=8000 +; +; For FXO (FXS signalled) devices, whether to use pulse dial instead of DTMF +; Pulse digits from phones (FXS devices, FXO signalling) are always +; detected. +; +;pulsedial=yes +; +; For fax detection, uncomment one of the following lines. The default is *OFF* +; +;faxdetect=both +;faxdetect=incoming +;faxdetect=outgoing +;faxdetect=no +; +; When 'faxdetect' is used, one could use 'faxbuffers' to configure the DAHDI +; transmit buffer policy. The default is *OFF*. When this configuration +; option is used, the faxbuffer policy will be used for the life of the call +; after a fax tone is detected. The faxbuffer policy is reverted after the +; call is torn down. The sample below will result in 6 buffers and a full +; buffer policy. +; +;faxbuffers=>6,full +; +; Configure the default number of DAHDI buffers and the transmit policy to use. +; This can be used to eliminate data drops when scheduling jitter prevents +; Asterisk from writing to a DAHDI channel regularly. Most users will probably +; want "faxbuffers" instead of "buffers". +; +; The policies are: +; immediate - DAHDI will immediately start sending the data to the hardware after +; Asterisk writes to the channel. This is the default mode. It +; introduces the least amount of latency but has an increased chance for +; hardware under runs if Asterisk is not able to keep the DAHDI write +; queue from going empty. +; half - DAHDI will wait until half of the configured buffers are full before +; starting to transmit. This adds latency to the audio but reduces +; the chance of under runs. Essentially, this is like an in-kernel jitter +; buffer. +; full - DAHDI will not start transmitting until all buffers are full. +; Introduces the most amount of latency and is susceptible to over +; runs from the Asterisk process. +; +; The receive policy is never changed. DAHDI will always pass up audio as soon +; as possible. +; +; The default number of buffers is 4 (from jitterbuffers) and the default policy +; is immediate. +; +;buffers=4,immediate +; +; This option specifies what to do when the channel's bridged peer puts the +; ISDN channel on hold. Settable per logical ISDN span. +; moh: Generate music-on-hold to the remote party. +; notify: Send hold notification signaling to the remote party. +; For ETSI PTP and ETSI PTMP NT links. +; (The notify setting deprecates the mohinterpret=passthrough setting.) +; hold: Use HOLD/RETRIEVE signaling to release the B channel while on hold. +; For ETSI PTMP TE links. +; +;moh_signaling=moh +; +; 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. +; +; This option may be set globally or on a per-channel basis. +; +;mohinterpret=default +; +; This option specifies which music on hold class to suggest to the peer channel +; when this channel places the peer on hold. This option may be set globally, +; or on a per-channel basis. +; +;mohsuggest=default +; +; PRI channels can have an idle extension and a minunused number. So long as +; at least "minunused" channels are idle, chan_dahdi will try to call "idledial" +; on them, and then dump them into the PBX in the "idleext" extension (which +; is of the form exten@context). When channels are needed the "idle" calls +; are disconnected (so long as there are at least "minidle" calls still +; running, of course) to make more channels available. The primary use of +; this is to create a dynamic service, where idle channels are bundled through +; multilink PPP, thus more efficiently utilizing combined voice/data services +; than conventional fixed mappings/muxings. +; +; Those settings cannot be changed on reload. +; +;idledial=6999 +;idleext=6999@dialout +;minunused=2 +;minidle=1 +; +; +; ignore_failed_channels: Continue even if some channels failed to configure. +; False by default, as if even a single channel failed to configure, it might +; mean other channels are misplaced and having them work may not be a good +; idea. If enabled (set to true), chan_dahdi will nevertheless attempt to +; configure other channels rather than giving up. This normally makes sense +; only if you use names (!) for DAHDI channels. +;ignore_failed_channels = true +; +; Configure jitter buffers in DAHDI (each one is 20ms, default is 4) +; This is set globally, rather than per-channel. +; +;jitterbuffers=4 +; +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a + ; DAHDI 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 DAHDI channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive DAHDI side will always + ; be used if the sending side can create jitter. + +; 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 DAHDI + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) 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". +;----------------------------------------------------------------------------------- +; +; You can define your own custom ring cadences here. You can define up to 8 +; pairs. If the silence is negative, it indicates where the caller ID spill is +; to be placed. Also, if you define any custom cadences, the default cadences +; will be turned off. +; +; This setting is global, rather than per-channel. It will not update on +; a reload. +; +; Syntax is: cadence=ring,silence[,ring,silence[...]] +; +; These are the default cadences: +; +;cadence=125,125,2000,-4000 +;cadence=250,250,500,1000,250,250,500,-4000 +;cadence=125,125,125,125,125,-4000 +;cadence=1000,500,2500,-5000 +; +; Each channel consists of the channel number or range. It inherits the +; parameters that were specified above its declaration. +; +; +;callerid="Green Phone"<(256) 428-6121> +;description=Reception Phone ; add a description for 'dahdi show channels' +;channel => 1 +;callerid="Black Phone"<(256) 428-6122> +;description=Courtesy Phone +;channel => 2 +;callerid="CallerID Phone" <(630) 372-1564> +;description= ; reset the description for following channels +;channel => 3 +;callerid="Pac Tel Phone" <(256) 428-6124> +;channel => 4 +;callerid="Uniden Dead" <(256) 428-6125> +;channel => 5 +;callerid="Cortelco 2500" <(256) 428-6126> +;channel => 6 +;callerid="Main TA 750" <(256) 428-6127> +;channel => 44 +; +; For example, maybe we have some other channels which start out in a +; different context and use E & M signalling instead. +; +;context=remote +;signaling=em +;channel => 15 +;channel => 16 + +;signalling=em_w +; +; All those in group 0 I'll use for outgoing calls +; +; Strip most significant digit (9) before sending +; +;stripmsd=1 +;callerid=asreceived +;group=0 +;signalling=fxs_ls +;channel => 45 + +;signalling=fxo_ls +;group=1 +;callerid="Joe Schmoe" <(256) 428-6131> +;channel => 25 +;callerid="Megan May" <(256) 428-6132> +;channel => 26 +;callerid="Suzy Queue" <(256) 428-6233> +;channel => 27 +;callerid="Larry Moe" <(256) 428-6234> +;channel => 28 +; +; Sample PRI (CPE) config: Specify the switchtype, the signalling as either +; pri_cpe or pri_net for CPE or Network termination, and generally you will +; want to create a single "group" for all channels of the PRI. +; +; switchtype cannot be changed on a reload. +; +; switchtype = national +; signalling = pri_cpe +; group = 2 +; channel => 1-23 +; +; Alternatively, the number of the channel may be replaced with a relative +; path to a device file under /dev/dahdi . The final element of that file +; must be a number, though. The directory separator is '!', as we can't +; use '/' in a dial string. So if we have +; +; /dev/dahdi/span-name/pstn/00/1 +; /dev/dahdi/span-name/pstn/00/2 +; /dev/dahdi/span-name/pstn/00/3 +; /dev/dahdi/span-name/pstn/00/4 +; +; we could use: +;channel => span-name!pstn!00!1-4 +; +; or: +;channel => span-name!pstn!00!1,2,3,4 +; +; See also ignore_failed_channels above. + +; Used for distinctive ring support for x100p. +; You can see the dringX patterns is to set any one of the dringXcontext fields +; and they will be printed on the console when an inbound call comes in. +; +; dringXrange is used to change the acceptable ranges for "tone offsets". Defaults to 10. +; Note: a range of 0 is NOT what you might expect - it instead forces it to the default. +; A range of -1 will force it to always match. +; Anything lower than -1 would presumably cause it to never match. +; +;dring1=95,0,0 +;dring1context=internal1 +;dring1range=10 +;dring2=325,95,0 +;dring2context=internal2 +;dring2range=10 +; If no pattern is matched here is where we go. +;context=default +;channel => 1 + +; AMI alarm event reporting +;reportalarms=channels +;Possible values are: +;channels - report each channel alarms (current behavior, default for backward compatibility) +;spans - report an "SpanAlarm" event when the span of any configured channel is alarmed +;all - report channel and span alarms (aggregated behavior) +;none - do not report any alarms. + +; ---------------- Options for use with signalling=ss7 ----------------- +; None of them can be changed by a reload. +; +; Variant of SS7 signalling: +; Options are itu and ansi +;ss7type = itu + +; SS7 Called Nature of Address Indicator +; +; unknown: Unknown +; subscriber: Subscriber +; national: National +; international: International +; dynamic: Dynamically selects the appropriate dialplan +; +;ss7_called_nai=dynamic +; +; SS7 Calling Nature of Address Indicator +; +; unknown: Unknown +; subscriber: Subscriber +; national: National +; international: International +; dynamic: Dynamically selects the appropriate dialplan +; +;ss7_calling_nai=dynamic +; +; +; sample 1 for Germany +;ss7_internationalprefix = 00 +;ss7_nationalprefix = 0 +;ss7_subscriberprefix = +;ss7_unknownprefix = +; + +; This option is used to disable automatic sending of ACM when the call is started +; in the dialplan. If you do use this option, you will need to use the Proceeding() +; application in the dialplan to send ACM. +;ss7_explictacm=yes + +; All settings apply to linkset 1 +;linkset = 1 + +; Point code of the linkset. For ITU, this is the decimal number +; format of the point code. For ANSI, this can either be in decimal +; number format or in the xxx-xxx-xxx format +;pointcode = 1 + +; Point code of node adjacent to this signalling link (Possibly the STP between you and +; your destination). Point code format follows the same rules as above. +;adjpointcode = 2 + +; Default point code that you would like to assign to outgoing messages (in case of +; routing through STPs, or using A links). Point code format follows the same rules +; as above. +;defaultdpc = 3 + +; Begin CIC (Circuit indication codes) count with this number +;cicbeginswith = 1 + +; What the MTP3 network indicator bits should be set to. Choices are +; national, national_spare, international, international_spare +;networkindicator=international + +; First signalling channel +;sigchan = 48 + +; Additional signalling channel for this linkset (So you can have a linkset +; with two signalling links in it). It seems like a silly way to do it, but +; for linksets with multiple signalling links, you add an additional sigchan +; line for every additional signalling link on the linkset. +;sigchan = 96 + +; Channels to associate with CICs on this linkset +;channel = 25-47 +; +; For more information on setting up SS7, see the README file in libss7 or +; https://wiki.asterisk.org/wiki/display/AST/Signaling+System+Number+7 +; ----------------- SS7 Options ---------------------------------------- + +; ---------------- Options for use with signalling=mfcr2 -------------- + +; MFC-R2 signaling has lots of variants from country to country and even sometimes +; minor variants inside the same country. The only mandatory parameters here are: +; mfcr2_variant, mfcr2_max_ani and mfcr2_max_dnis. +; IT IS RECOMMENDED that you leave the default values (leaving it commented) for the +; other parameters unless you have problems or you have been instructed to change some +; parameter. OpenR2 library uses the mfcr2_variant parameter to try to determine the +; best defaults for your country, also refer to the OpenR2 package directory +; doc/asterisk/ where you can find sample configurations for some countries. If you +; want to contribute your configs for a particular country send them to the e-mail +; of the primary OpenR2 developer that you can find in the AUTHORS file of the OpenR2 package + +; MFC/R2 variant. This depends on the OpenR2 supported variants +; A list of values can be found by executing the openr2 command r2test -l +; some valid values are: +; ar (Argentina) +; br (Brazil) +; mx (Mexico) +; ph (Philippines) +; itu (per ITU spec) +; mfcr2_variant=mx + +; Max amount of ANI to ask for +; mfcr2_max_ani=10 + +; Max amount of DNIS to ask for +; mfcr2_max_dnis=4 + +; whether or not to get the ANI before getting DNIS. +; some telcos require ANI first some others do not care +; if this go wrong, change this value +; mfcr2_get_ani_first=no + +; Caller Category to send +; national_subscriber +; national_priority_subscriber +; international_subscriber +; international_priority_subscriber +; collect_call +; usually national_subscriber works just fine +; you can change this setting from the dialplan +; by setting the variable MFCR2_CATEGORY +; (remember to set _MFCR2_CATEGORY from originating channels) +; MFCR2_CATEGORY will also be a variable available in your context +; on incoming calls set to the value received from the far end +; mfcr2_category=national_subscriber + +; Call logging is stored at the Asterisk +; logging directory specified in asterisk.conf +; plus mfcr2/ +; if you specify 'span1' here and asterisk.conf has +; as logging directory /var/log/asterisk then the full +; path to your MFC/R2 call logs will be /var/log/asterisk/mfcr2/span1 +; (the directory will be automatically created if not present already) +; remember to set mfcr2_call_files=yes +; mfcr2_logdir=span1 + +; whether or not to drop call files into mfcr2_logdir +; mfcr2_call_files=yes|no + +; MFC/R2 valid logging values are: all,error,warning,debug,notice,cas,mf,stack,nothing +; error,warning,debug and notice are self-descriptive +; 'cas' is for logging ABCD CAS tx and rx +; 'mf' is for logging of the Multi Frequency tones +; 'stack' is for very verbose output of the channel and context call stack, only useful +; if you are debugging a crash or want to learn how the library works. The stack logging +; will be only enabled if the openr2 library was compiled with -DOR2_TRACE_STACKS +; You can mix up values, like: loglevel=error,debug,mf to log just error, debug and +; multi frequency messages +; 'all' is a special value to log all the activity +; 'nothing' is a clean-up value, in case you want to not log any activity for +; a channel or group of channels +; BE AWARE that the level of output logged will ALSO depend on +; the value you have in logger.conf, if you disable output in logger.conf +; then it does not matter you specify 'all' here, nothing will be logged +; so logger.conf has the last word on what is going to be logged +; mfcr2_logging=all + +; MFC/R2 value in milliseconds for the MF timeout. Any negative value +; means 'default', smaller values than 500ms are not recommended +; and can cause malfunctioning. If you experience protocol error +; due to MF timeout try incrementing this value in 500ms steps +; mfcr2_mfback_timeout=-1 + +; MFC/R2 value in milliseconds for the metering pulse timeout. +; Metering pulses are sent by some telcos for some R2 variants +; during a call presumably for billing purposes to indicate costs, +; however this pulses use the same signal that is used to indicate +; call hangup, therefore a timeout is sometimes required to distinguish +; between a *real* hangup and a billing pulse that should not +; last more than 500ms, If you experience call drops after some +; minutes of being stablished try setting a value of some ms here, +; values greater than 500ms are not recommended. +; BE AWARE that choosing the proper protocol mfcr2_variant parameter +; implicitly sets a good recommended value for this timer, use this +; parameter only when you *really* want to override the default, otherwise +; just comment out this value or put a -1 +; Any negative value means 'default'. +; mfcr2_metering_pulse_timeout=-1 + +; Brazil uses a special calling party category for collect calls (llamadas por cobrar) +; instead of using the operator (as in Mexico). The R2 spec in Brazil says a special GB tone +; should be used to reject collect calls. If you want to ALLOW collect calls specify 'yes', +; if you want to BLOCK collect calls then say 'no'. Default is to block collect calls. +; (see also 'mfcr2_double_answer') +; mfcr2_allow_collect_calls=no + +; This feature is related but independent of mfcr2_allow_collect_calls +; Some PBX's require a double-answer process to block collect calls, if +; you ever have problems blocking collect calls using Group B signals (mfcr2_allow_collect_calls=no) +; then you may want to try with mfcr2_double_answer=yes, this will cause that every answer signal +; is changed by answer->clear back->answer (sort of a flash) +; (see also 'mfcr2_allow_collect_calls') +; mfcr2_double_answer=no + +; This feature allows to skip the use of Group B/II signals and go directly +; to the accepted state for incoming calls +; mfcr2_immediate_accept=no + +; You most likely dont need this feature. Default is yes. +; When this is set to yes, all calls that are offered (incoming calls) which +; DNIS is valid (exists in extensions.conf) and pass collect call validation +; will be accepted with a Group B tone (either call with charge or not, depending on mfcr2_charge_calls) +; with this set to 'no' then the call will NOT be accepted on offered, and the call will start its +; execution in extensions.conf without being accepted until the channel is answered (either with Answer() or +; any other application resulting in the channel being answered). +; This can be set to 'no' if your telco or PBX needs the hangup cause to be set accurately +; when this option is set to no you must explicitly accept the call with DAHDIAcceptR2Call +; or implicitly through the Answer() application. +; mfcr2_accept_on_offer=yes + +; Skip request of calling party category and ANI +; you need openr2 >= 1.2.0 to use this feature +; mfcr2_skip_category=no + +; WARNING: advanced users only! I really mean it +; this parameter is commented by default because +; YOU DON'T NEED IT UNLESS YOU REALLY GROK MFC/R2 +; READ COMMENTS on doc/r2proto.conf in openr2 package +; for more info +; mfcr2_advanced_protocol_file=/path/to/r2proto.conf + +; Brazil use a special signal to force the release of the line (hangup) from the +; backward perspective. When mfcr2_forced_release=no, the normal clear back signal +; will be sent on hangup, which is OK for all mfcr2 variants I know of, except for +; Brazilian variant, where the central will leave the line up for several seconds (30, 60) +; which sometimes is not what people really want. When mfcr2_forced_release=yes, a different +; signal will be sent to hangup the call indicating that the line should be released immediately +; mfcr2_forced_release=no + +; Whether or not report to the other end 'accept call with charge' +; This setting has no effect with most telecos, usually is safe +; leave the default (yes), but once in a while when interconnecting with +; old PBXs this may be useful. +; Concretely this affects the Group B signal used to accept calls +; The application DAHDIAcceptR2Call can also be used to decide this +; in the dial plan in a per-call basis instead of doing it here for all calls +; mfcr2_charge_calls=yes + +; ---------------- END of options to be used with signalling=mfcr2 + +; Configuration Sections +; ~~~~~~~~~~~~~~~~~~~~~~ +; You can also configure channels in a separate chan_dahdi.conf section. In +; this case the keyword 'channel' is not used. Instead the keyword +; 'dahdichan' is used (as in users.conf) - configuration is only processed +; in a section where the keyword dahdichan is used. It will only be +; processed in the end of the section. Thus the following section: +; +;[phones] +;echocancel = 64 +;dahdichan = 1-8 +;group = 1 +; +; Is somewhat equivalent to the following snippet in the section +; [channels]: +; +;echocancel = 64 +;group = 1 +;channel => 1-8 +; +; When starting a new section almost all of the configuration values are +; copied from their values at the end of the section [channels] in +; chan_dahdi.conf and [general] in users.conf - one section's configuration +; does not affect another one's. +; +; Instead of letting common configuration values "slide through" you can +; use configuration templates to easily keep the common part in one +; place and override where needed. +; +;[phones](!) +;echocancel = yes +;group = 0,4 +;callgroup = 3 +;pickupgroup = 3 +;threewaycalling = yes +;transfer = yes +;context = phones +;faxdetect = incoming +; +;[phone-1](phones) +;dahdichan = 1 +;callerid = My Name <501> +;mailbox = 501@mailboxes +; +; +;[fax](phones) +;dahdichan = 2 +;faxdetect = no +;context = fax +; +;[phone-3](phones) +;dahdichan = 3 +;pickupgroup = 3,4 diff --git a/asterisk/chan_mobile.conf b/asterisk/chan_mobile.conf new file mode 100644 index 0000000..c9c4d2d --- /dev/null +++ b/asterisk/chan_mobile.conf @@ -0,0 +1,69 @@ +; +; chan_mobile.conf +; configuration file for chan_mobile +; + +[general] +interval=30 ; Number of seconds between trying to connect to devices. + +; The following is a list of adapters we use. +; id must be unique and address is the bdaddr of the adapter from hciconfig. +; Each adapter may only have one device (headset or phone) connected at a time. +; Add an [adapter] entry for each adapter you have. + +[adapter] +id=blue +address=00:09:DD:60:01:A3 +;forcemaster=yes ; attempt to force adapter into master mode. default is no. +;alignmentdetection=yes ; enable this if you sometimes get 'white noise' on asterisk side of the call + ; its a bug in the bluetooth adapter firmware, enabling this will compensate for it. + ; default is no. + +[adapter] +id=dlink +address=00:80:C8:35:52:78 + +; The following is a list of the devices we deal with. +; Every device listed below will be available for calls in and out of Asterisk. +; Each device needs an adapter=xxxx entry which determines which bluetooth adapter is used. +; Use the CLI command 'mobile search' to discover devices. +; Use the CLI command 'mobile show devices' to see device status. +; +; To place a call out through a mobile phone use Dial(Mobile/[device]/NNN.....) or Dial(Mobile/gn/NNN......) in your dialplan. +; To call a headset use Dial(Mobile/[device]). + +[LGTU550] +address=00:E0:91:7F:46:44 ; the address of the phone +port=4 ; the rfcomm port number (from mobile search) +context=incoming-mobile ; dialplan context for incoming calls +adapter=dlink ; adapter to use +group=1 ; this phone is in channel group 1 +;sms=no ; support SMS, defaults to yes +;nocallsetup=yes ; set this only if your phone reports that it supports call progress notification, but does not do it. Motorola L6 for example. + +[blackberry] +address=00:60:57:32:7E:B2 +port=2 +context=incoming-mobile +adapter=dlink +group=1 +;blackberry=yes ; set this if you are using a blackberry device + +[6310i] +address=00:60:57:32:7E:B1 +port=13 +context=incoming-mobile +adapter=dlink +group=1 ; this phone is in channel group 1 also. + +[headset] +address=00:0B:9E:11:AE:C6 +port=1 +type=headset ; This is a headset, not a Phone ! +adapter=blue + +[headset1] +address=00:0B:9E:11:74:A5 +port=1 +type=headset +adapter=dlink diff --git a/asterisk/cli.conf b/asterisk/cli.conf new file mode 100644 index 0000000..0ddd92c --- /dev/null +++ b/asterisk/cli.conf @@ -0,0 +1,12 @@ +; +; Asterisk CLI configuration +; + +[startup_commands] +; +; Any commands listed in this section will get automatically executed +; when Asterisk starts as a daemon or foreground process (-c). +; +;sip set debug on = yes +;core set verbose 3 = yes +;core set debug 1 = yes diff --git a/asterisk/cli_aliases.conf b/asterisk/cli_aliases.conf new file mode 100644 index 0000000..34a34ee --- /dev/null +++ b/asterisk/cli_aliases.conf @@ -0,0 +1,201 @@ +; +; CLI Aliases configuration +; +; This module also registers a "cli show aliases" CLI command to list +; configured CLI aliases. + +[general] +; Here you define what alias templates you want to use. You can also define +; multiple templates to use as well. If you do, and there is a conflict, then +; the first alias defined will win. +; +template = friendly ; By default, include friendly aliases +;template = asterisk12 ; Asterisk 1.2 style syntax +;template = asterisk14 ; Asterisk 1.4 style syntax +;template = individual_custom ; see [individual_custom] example below which + ; includes a list of aliases from an external + ; file + + +; Because the Asterisk CLI syntax follows a "module verb argument" syntax, +; sometimes we run into an issue between being consistant with this format +; in the core system, and maintaining system friendliness. In order to get +; around this we're providing some useful aliases by default. +; +[friendly] +hangup request=channel request hangup +originate=channel originate +help=core show help +pri intense debug span=pri set debug intense span +reload=module reload + +; CLI Alias Templates +; ------------------- +; +; You can define several alias templates. +; It works with context templates like all other configuration files +; +;[asterisk](!) +; To create an alias you simply set the variable name as the alias and variable +; value as the real CLI command you want executed +; +;die die die=stop now + +;[asterisk16](asterisk) +; Alias for making voicemail reload actually do module reload app_voicemail.so +;voicemail reload=module reload app_voicemail.so +; This will make the CLI command "mr" behave as though it is "module reload". +;mr=module reload +; +; +; In addition, you could also include a flat file of aliases which is loaded by +; the [individual_custom] template in the [general] section. +; +;[individual_custom] +;#include "/etc/asterisk/aliases" + +; Implemented CLI Alias Templates +; ------------------------------- +; +; Below here we have provided you with some templates, easily allowing you to +; utilize previous Asterisk CLI commands with any version of Asterisk. In this +; way you will be able to use Asterisk 1.2 and 1.4 style CLI syntax with any +; version Asterisk going forward into the future. +; +; We have also separated out the vanilla syntax into a context template which +; allows you to keep your custom changes separate of the standard templates +; we have provided you. In this way you can clearly see your custom changes, +; and also allowing you to combine various templates as you see fit. +; +; The naming scheme we have used is recommended, but certainly is not enforced +; by Asterisk. If you wish to use the provided templates, simply define the +; context name which does not utilize the '_tpl' at the end. For example, +; if you would like to use the Asterisk 1.2 style syntax, define in the +; [general] section + +[asterisk12_tpl](!) +show channeltypes=core show channeltypes +show channeltype=core show channeltype +show manager command=manager show command +show manager commands=manager show commands +show manager connected=manager show connected +show manager eventq=manager show eventq +rtp no debug=rtp set debug off +rtp rtcp debug ip=rtcp debug ip +rtp rtcp debug=rtcp debug +rtp rtcp no debug=rtcp debug off +rtp rtcp stats=rtcp stats +rtp rtcp no stats=rtcp stats off +stun no debug=stun debug off +udptl no debug=udptl debug off +show image formats=core show image formats +show file formats=core show file formats +show applications=core show applications +show functions=core show functions +show switches=core show switches +show hints=core show hints +show globals=core show globals +show function=core show function +show application=core show application +set global=core set global +show dialplan=dialplan show +show codecs=core show codecs +show audio codecs=core show audio codecs +show video codecs=core show video codecs +show image codecs=core show image codecs +show codec=core show codec +moh classes show=moh show classes +moh files show=moh show files +agi no debug=agi debug off +show agi=agi show +dump agihtml=agi dumphtml +show features=feature show +show indications=indication show +answer=console answer +hangup=console hangup +flash=console flash +dial=console dial +mute=console mute +unmute=console unmute +transfer=console transfer +send text=console send text +autoanswer=console autoanswer +oss boost=console boost +console=console active +save dialplan=dialplan save +add extension=dialplan add extension +remove extension=dialplan remove extension +add ignorepat=dialplan add ignorepat +remove ignorepat=dialplan remove ignorepat +include context=dialplan add include +dont include=dialplan remove include +extensions reload=dialplan reload +show translation=core show translation +convert=file convert +show queue=queue show +add queue member=queue add member +remove queue member=queue remove member +ael no debug=ael nodebug +sip debug=sip set debug +sip no debug=sip set debug off +show voicemail users=voicemail show users +show voicemail zones=voicemail show zones +iax2 trunk debug=iax2 set debug trunk +iax2 jb debug=iax2 set debug jb +iax2 no debug=iax2 set debug off +iax2 no trunk debug=iax2 set debug trunk off +iax2 no jb debug=iax2 set debug jb off +show agents=agent show +show agents online=agent show online +show memory allocations=memory show allocations +show memory summary=memory show summary +show version=core show version +show version files=core show file version +show profile=core show profile +clear profile=core clear profile +soft hangup=channel request hangup + +[asterisk12](asterisk12_tpl) +; add any additional custom commands you want below here, for example: +;die quickly=stop now + +[asterisk14_tpl](!) +cdr status=cdr show status +rtp debug=rtp set debug on +rtcp debug=rtcp set debug on +rtcp stats=rtcp set stats on +stun debug=stun set debug on +udptl debug=udptl set debug on +core show globals=dialplan show globals +core set global=dialplan set global +core set chanvar=dialplan set chanvar +agi dumphtml=agi dump html +ael debug=ael set debug +funcdevstate list=devstate list +sip history=sip set history on +skinny debug=skinny set debug on +mgcp set debug=mgcp set debug on +abort shutdown=core abort shutdown +stop now=core stop now +stop gracefully=core stop gracefully +stop when convenient=core stop when convenient +restart now=core restart now +restart gracefully=core restart gracefully +restart when convenient=core restart when convenient +soft hangup=channel request hangup + +[asterisk14](asterisk14_tpl) +; add any additional custom commands you want below here. + +[asterisk11_tpl](!) +jabber list nodes=xmpp list nodes +jabber purge nodes=xmpp purge nodes +jabber delete node=xmpp delete node +jabber create collection=xmpp create collection +jabber create leaf=xmpp create leaf +jabber set debug=xmpp set debug +jabber show connections=xmpp show connections +jabber show buddies=xmpp show buddies + +[asterisk11](asterisk11_tpl) +; add any additional custom commands you want below here. diff --git a/asterisk/cli_permissions.conf b/asterisk/cli_permissions.conf new file mode 100644 index 0000000..4a6973f --- /dev/null +++ b/asterisk/cli_permissions.conf @@ -0,0 +1,82 @@ +; +; CLI permissions configuration example for Asterisk +; +; All the users that you want to connect with asterisk using +; rasterisk, should have write/read access to the +; asterisk socket (asterisk.ctl). You could change the permissions +; of this file in 'asterisk.conf' config parameter: 'astctlpermissions' (0666) +; found on the [files] section. +; +; general options: +; +; default_perm = permit | deny +; This is the default permissions to apply for a user that +; does not has a permissions definided. +; +; user options: +; permit = | all ; allow the user to run 'command' | +; ; allow the user to run 'all' the commands +; deny = | all ; disallow the user to run 'command' | +; ; disallow the user to run 'all' commands. +; + +[general] + +default_perm=permit ; To leave asterisk working as normal + ; we should set this parameter to 'permit' +; +; Follows the per-users permissions configs. +; +; This list is read in the sequence that is being written, so +; In this example the user 'eliel' is allow to run only the following +; commands: +; sip show peer +; core set debug +; core set verbose +; If the user is not specified, the default_perm option will be apply to +; every command. +; +; Notice that you can also use regular expressions to allow or deny access to a +; certain command like: 'core show application D*'. In this example the user will be +; allowed to view the documentation for all the applications starting with 'D'. +; Another regular expression could be: 'channel originate SIP/[0-9]* extension *' +; allowing the user to use 'channel originate' on a sip channel and with the 'extension' +; parameter and avoiding the use of the 'application' parameter. +; +; We can also use the templates syntax: +; [supportTemplate](!) +; deny=all +; permit=sip show ; all commands starting with 'sip show' will be allowed +; permit=core show +; +; You can specify permissions for a local group instead of a user, +; just put a '@' and we will know that is a group. +; IMPORTANT NOTE: Users permissions overwrite group permissions. +; +;[@adm] +;deny=all +;permit=sip +;permit=core +; +; +;[eliel] +;deny=all +;permit=sip show peer +;deny=sip show peers +;permit=core set +; +; +;User 'tommy' inherits from template 'supportTemplate': +; deny=all +; permit=sip show +; permit=core show +;[tommy](supportTemplate) +;permit=core set debug +;permit=dialplan show +; +; +;[mark] +;deny=all +;permit=all +; +; diff --git a/asterisk/codecs.conf b/asterisk/codecs.conf new file mode 100644 index 0000000..9b57385 --- /dev/null +++ b/asterisk/codecs.conf @@ -0,0 +1,153 @@ +[speex] +; CBR encoding quality [0..10] +; used only when vbr = false +quality => 3 + +; codec complexity [0..10] +; tradeoff between cpu/quality +complexity => 2 + +; perceptual enhancement [true / false] +; improves clarity of decoded speech +enhancement => true + +; voice activity detection [true / false] +; reduces bitrate when no voice detected, used only for CBR +; (implicit in VBR/ABR) +vad => true + +; variable bit rate [true / false] +; uses bit rate proportionate to voice complexity +vbr => true + +; available bit rate [bps, 0 = off] +; encoding quality modulated to match this target bit rate +; not recommended with dtx or pp_vad - may cause bandwidth spikes +abr => 0 + +; VBR encoding quality [0-10] +; floating-point values allowed +vbr_quality => 4 + +; discontinuous transmission [true / false] +; stops transmitting completely when silence is detected +; pp_vad is far more effective but more CPU intensive +dtx => false + +; preprocessor configuration +; these options only affect Speex v1.1.8 or newer + +; enable preprocessor [true / false] +; allows dsp functionality below but incurs CPU overhead +preprocess => false + +; preproc voice activity detection [true / false] +; more advanced equivalent of DTX, based on voice frequencies +pp_vad => false + +; preproc automatic gain control [true / false] +pp_agc => false +pp_agc_level => 8000 + +; preproc denoiser [true / false] +pp_denoise => false + +; preproc dereverb [true / false] +pp_dereverb => false +pp_dereverb_decay => 0.4 +pp_dereverb_level => 0.3 + + +[plc] +; for all codecs which do not support native PLC +; this determines whether to perform generic PLC +; there is a minor performance penalty for this +genericplc => true + +; Generate custom formats for formats requiring attributes. +; After defining the custom format, the name used in defining +; the format can be used throughout Asterisk in the format 'allow' +; and 'disallow' options. +; +; Example: silk8 is a predefined custom format in this config file. +; Once this config file is loaded, silk8 can be used anywhere a +; peer's codec capabilities are defined. +; +; In sip.conf 'silk8' can be defined as a capability for a peer. +; [peer1] +; type=peer +; host=dynamic +; disallow=all +; allow=silk8 ;custom codec defined in codecs.conf +; +; LIMITATIONS +; Custom formats can only be defined at startup. Any changes to this +; file made after startup will not take into effect until after Asterisk +; is restarted. +; + +; Default Custom SILK format definitions, only one custom SILK format per +; sample rate is allowed. +[silk8] +type=silk +samprate=8000 +fec=true ; turn on or off encoding with forward error correction. + ; On recommended, off by default. +packetloss_percentage=10 ; Estimated packet loss percentage in uplink direction. This + ; affects how much redundancy is built in when using fec. + ; The higher the percentage, the larger amount of bandwidth is + ; used. Default is 0%, 10% is recommended when fec is in use. + +maxbitrate=10000 ; Use the table below to make sure a useful bitrate is choosen + ; for maxbitrate. If not set or value is not within the bounds + ; of the encoder, a default value is chosen. + ; + ; sample rate | bitrate range + ; 8khz | 5000 - 20000 bps + ; 12khz | 7000 - 25000 bps + ; 16khz | 8000 - 30000 bps + ; 24khz | 20000- 40000 bps + ; +;dtx=true ; Encode using discontinuous transmission mode or not. Turning this + ; on will save bandwidth during periods of silence at the cost of + ; increased computational complexity. Off by default. + +[silk12] +type=silk +samprate=12000 +maxbitrate=12000 +fec=true +packetloss_percentage=10; + +[silk16] +type=silk +samprate=16000 +maxbitrate=20000 +fec=true +packetloss_percentage=10; + +[silk24] +type=silk +samprate=24000 +maxbitrate=30000 +fec=true +packetloss_percentage=10; + + +; Default custom CELT codec definitions. Only one custom CELT definition is allowed +; per a sample rate. +;[celt44] +;type=celt +;samprate=44100 ; The samplerate in hz. This option is required. +;framesize=480 ; The framesize option represents the duration of each frame in samples. + ; This must be a factor of 2. This option is only advertised in an SDP + ; when it is set. Otherwise a default of framesize of 480 is assumed + ; internally + +;[celt48] +;type=celt +;samprate=48000 + +;[celt32] +;type=celt +;samprate=32000 diff --git a/asterisk/confbridge.conf b/asterisk/confbridge.conf new file mode 100644 index 0000000..9e90e61 --- /dev/null +++ b/asterisk/confbridge.conf @@ -0,0 +1,368 @@ +[general] +; The general section of this config +; is not currently used, but reserved +; for future use. + +; +; --- Default Information --- +; The default_user and default_bridge sections are applied +; automatically to all ConfBridge instances invoked without +; a user, or bridge argument. No menu is applied by default. +; +; Note that while properties of the default_user or default_bridge +; profile can be overridden, if removed, they will be automatically +; added and made available to the dialplan upon module load. +; + +; --- ConfBridge User Profile Options --- +[default_user] +type=user +;admin=yes ; Sets if the user is an admin or not. Off by default. +;marked=yes ; Sets if this is a marked user or not. Off by default. +;startmuted=yes; Sets if all users should start out muted. Off by default +;music_on_hold_when_empty=yes ; Sets whether MOH should be played when only + ; one person is in the conference or when the + ; the user is waiting on a marked user to enter + ; the conference. Off by default. +;music_on_hold_class=default ; The MOH class to use for this user. +;quiet=yes ; When enabled enter/leave prompts and user intros are not played. + ; There are some prompts, such as the prompt to enter a PIN number, + ; that must be played regardless of what this option is set to. + ; Off by default +;announce_user_count=yes ; Sets if the number of users should be announced to the + ; caller. Off by default. +;announce_user_count_all=yes ; Sets if the number of users should be announced to + ; all the other users in the conference when someone joins. + ; This option can be either set to 'yes' or a number. + ; When set to a number, the announcement will only occur + ; once the user count is above the specified number. +;announce_only_user=yes ; Sets if the only user announcement should be played + ; when a channel enters a empty conference. On by default. +;wait_marked=yes ; Sets if the user must wait for a marked user to enter before + ; joining the conference. Off by default. +;end_marked=yes ; This option will kick every user with this option set in their + ; user profile after the last Marked user exists the conference. + +;dsp_drop_silence=yes ; This option drops what Asterisk detects as silence from + ; entering into the bridge. Enabling this option will drastically + ; improve performance and help remove the buildup of background + ; noise from the conference. Highly recommended for large conferences + ; due to its performance enhancements. + +;dsp_talking_threshold=128 ; The time in milliseconds of sound above what the dsp has + ; established as base line silence for a user before a user + ; is considered to be talking. This value affects several + ; operations and should not be changed unless the impact on + ; call quality is fully understood. + ; + ; What this value affects internally: + ; + ; 1. Audio is only mixed out of a user's incoming audio stream + ; if talking is detected. If this value is set too + ; loose the user will hear themselves briefly each + ; time they begin talking until the dsp has time to + ; establish that they are in fact talking. + ; 2. When talk detection AMI events are enabled, this value + ; determines when talking has begun which results in + ; an AMI event to fire. If this value is set too tight + ; AMI events may be falsely triggered by variants in + ; room noise. + ; 3. The drop_silence option depends on this value to determine + ; when the user's audio should be mixed into the bridge + ; after periods of silence. If this value is too loose + ; the beginning of a user's speech will get cut off as they + ; transition from silence to talking. + ; + ; By default this value is 160 ms. Valid values are 1 through 2^31 + +;dsp_silence_threshold=2000 ; The time in milliseconds of sound falling within the what + ; the dsp has established as baseline silence before a user + ; is considered be silent. This value affects several + ; operations and should not be changed unless the impact + ; on call quality is fully understood. + ; + ; What this value affects internally: + ; + ; 1. When talk detection AMI events are enabled, this value + ; determines when the user has stopped talking after a + ; period of talking. If this value is set too low + ; AMI events indicating the user has stopped talking + ; may get falsely sent out when the user briefly pauses + ; during mid sentence. + ; 2. The drop_silence option depends on this value to + ; determine when the user's audio should begin to be + ; dropped from the conference bridge after the user + ; stops talking. If this value is set too low the user's + ; audio stream may sound choppy to the other participants. + ; This is caused by the user transitioning constantly from + ; silence to talking during mid sentence. + ; + ; The best way to approach this option is to set it slightly above + ; the maximum amount of ms of silence a user may generate during + ; natural speech. + ; + ; By default this value is 2500ms. Valid values are 1 through 2^31 + +;talk_detection_events=yes ; This option sets whether or not notifications of when a user + ; begins and ends talking should be sent out as events over AMI. + ; By default this option is off. + +;denoise=yes ; Sets whether or not a denoise filter should be applied + ; to the audio before mixing or not. Off by default. Requires + ; func_speex to be built and installed. Do not confuse this option + ; with drop_silence. Denoise is useful if there is a lot of background + ; noise for a user as it attempts to remove the noise while preserving + ; the speech. This option does NOT remove silence from being mixed into + ; the conference and does come at the cost of a slight performance hit. + +;jitterbuffer=yes ; Enabling this option places a jitterbuffer on the user's audio stream + ; before audio mixing is performed. This is highly recommended but will + ; add a slight delay to the audio. This option is using the JITTERBUFFER + ; dialplan function's default adaptive jitterbuffer. For a more fine tuned + ; jitterbuffer, disable this option and use the JITTERBUFFER dialplan function + ; on the user before entering the ConfBridge application. + +;pin=1234 ; Sets if this user must enter a PIN number before entering + ; the conference. The PIN will be prompted for. +;announce_join_leave=yes ; When enabled, this option will prompt the user for a + ; name when entering the conference. After the name is + ; recorded, it will be played as the user enters and exists + ; the conference. This option is off by default. +;dtmf_passthrough=yes ; Sets whether or not DTMF should pass through the conference. + ; This option is off by default. +;announcement= ; Play a sound file to the user when they join the conference. + +; --- ConfBridge Bridge Profile Options --- +[default_bridge] +type=bridge +;max_members=50 ; This option limits the number of participants for a single + ; conference to a specific number. By default conferences + ; have no participant limit. After the limit is reached, the + ; conference will be locked until someone leaves. Note however + ; that an Admin user will always be alowed to join the conference + ; regardless if this limit is reached or not. + +;record_conference=yes ; Records the conference call starting when the first user + ; enters the room, and ending when the last user exits the room. + ; The default recorded filename is + ; 'confbridge--.wav + ; and the default format is 8khz slinear. This file will be + ; located in the configured monitoring directory in asterisk.conf. + +;record_file= ; When record_conference is set to yes, the specific name of the + ; record file can be set using this option. Note that since multiple + ; conferences may use the same bridge profile, this may cause issues + ; depending on the configuration. It is recommended to only use this + ; option dynamically with the CONFBRIDGE() dialplan function. This + ; allows the record name to be specified and a unique name to be chosen. + ; By default, the record_file is stored in Asterisk's spool/monitor directory + ; with a unique filename starting with the 'confbridge' prefix. + +;internal_sample_rate=auto ; Sets the internal native sample rate the + ; conference is mixed at. This is set to automatically + ; adjust the sample rate to the best quality by default. + ; Other values can be anything from 8000-192000. If a + ; sample rate is set that Asterisk does not support, the + ; closest sample rate Asterisk does support to the one requested + ; will be used. + +;mixing_interval=40 ; Sets the internal mixing interval in milliseconds for the bridge. This + ; number reflects how tight or loose the mixing will be for the conference. + ; In order to improve performance a larger mixing interval such as 40ms may + ; be chosen. Using a larger mixing interval comes at the cost of introducing + ; larger amounts of delay into the bridge. Valid values here are 10, 20, 40, + ; or 80. By default 20ms is used. + +;video_mode = follow_talker; Sets how confbridge handles video distribution to the conference participants. + ; Note that participants wanting to view and be the source of a video feed + ; _MUST_ be sharing the same video codec. Also, using video in conjunction with + ; with the jitterbuffer currently results in the audio being slightly out of sync + ; with the video. This is a result of the jitterbuffer only working on the audio + ; stream. It is recommended to disable the jitterbuffer when video is used. + ; + ; --- MODES --- + ; none: No video sources are set by default in the conference. It is still + ; possible for a user to be set as a video source via AMI or DTMF action + ; at any time. + ; + ; follow_talker: The video feed will follow whoever is talking and providing video. + ; + ; last_marked: The last marked user to join the conference with video capabilities + ; will be the single source of video distributed to all participants. + ; If multiple marked users are capable of video, the last one to join + ; is always the source, when that user leaves it goes to the one who + ; joined before them. + ; + ; first_marked: The first marked user to join the conference with video capabilities + ; is the single source of video distribution among all participants. If + ; that user leaves, the marked user to join after them becomes the source. + +;language=en ; Set the language used for announcements to the conference. + ; Default is en (English). + +; All sounds in the conference are customizable using the bridge profile options below. +; Simply state the option followed by the filename or full path of the filename after +; the option. Example: sound_had_joined=conf-hasjoin This will play the conf-hasjoin +; sound file found in the sounds directory when announcing someone's name is joining the +; conference. + +;sound_join ; The sound played to everyone when someone enters the conference. +;sound_leave ; The sound played to everyone when someone leaves the conference. +;sound_has_joined ; The sound played before announcing someone's name has + ; joined the conference. This is used for user intros. + ; Example "_____ has joined the conference" +;sound_has_left ; The sound played when announcing someone's name has + ; left the conference. This is used for user intros. + ; Example "_____ has left the conference" +;sound_kicked ; The sound played to a user who has been kicked from the conference. +;sound_muted ; The sound played when the mute option it toggled on. +;sound_unmuted ; The sound played when the mute option it toggled off. +;sound_only_person ; The sound played when the user is the only person in the conference. +;sound_only_one ; The sound played to a user when there is only one other + ; person is in the conference. +;sound_there_are ; The sound played when announcing how many users there + ; are in a conference. +;sound_other_in_party; ; This file is used in conjunction with 'sound_there_are" + ; when announcing how many users there are in the conference. + ; The sounds are stringed together like this. + ; "sound_there_are" "sound_other_in_party" +;sound_place_into_conference ; The sound played when someone is placed into the conference + ; after waiting for a marked user. This sound is now deprecated + ; since it was only ever used improperly and correcting that bug + ; made it completely unused. +;sound_wait_for_leader ; The sound played when a user is placed into a conference that + ; can not start until a marked user enters. +;sound_leader_has_left ; The sound played when the last marked user leaves the conference. +;sound_get_pin ; The sound played when prompting for a conference pin number. +;sound_invalid_pin ; The sound played when an invalid pin is entered too many times. +;sound_locked ; The sound played to a user trying to join a locked conference. +;sound_locked_now ; The sound played to an admin after toggling the conference to locked mode. +;sound_unlocked_now; The sound played to an admin after toggling the conference to unlocked mode. +;sound_error_menu ; The sound played when an invalid menu option is entered. +;sound_begin ; The sound played to the conference when the first marked user enters the conference. + +; --- ConfBridge Menu Options --- +; The ConfBridge application also has the ability to +; apply custom DTMF menus to each channel using the +; application. Like the User and Bridge profiles +; a menu is passed in to ConfBridge as an argument in +; the dialplan. +; +; Below is a list of menu actions that can be assigned +; to a DTMF sequence. +; +; To have the first DTMF digit in a sequence be the '#' character, you need to +; escape it. If it is not escaped then normal config file processing will +; think it is a directive like #include. For example: +; \#1=toggle_mute ; Pressing #1 will toggle the mute setting. +; +; A single DTMF sequence can have multiple actions associated with it. This is +; accomplished by stringing the actions together and using a ',' as the delimiter. +; Example: Both listening and talking volume is reset when '5' is pressed. +; 5=reset_talking_volume, reset_listening_volume +; +; playback(&) + ; Playback will play back an audio file to a channel + ; and then immediately return to the conference. + ; This file can not be interupted by DTMF. + ; Mutliple files can be chained together using the + ; '&' character. +; playback_and_continue(&) + ; playback_and_continue will + ; play back a prompt while continuing to + ; collect the dtmf sequence. This is useful + ; when using a menu prompt that describes all + ; the menu options. Note however that any DTMF + ; during this action will terminate the prompts + ; playback. Prompt files can be chained together + ; using the '&' character as a delimiter. +; toggle_mute ; Toggle turning on and off mute. Mute will make the user silent + ; to everyone else, but the user will still be able to listen in. + +; no_op ; This action does nothing (No Operation). Its only real purpose exists for + ; being able to reserve a sequence in the config as a menu exit sequence. +; decrease_listening_volume ; Decreases the channel's listening volume. +; increase_listening_volume ; Increases the channel's listening volume. +; reset_listening_volume ; Reset channel's listening volume to default level. + +; decrease_talking_volume ; Decreases the channel's talking volume. +; increase_talking_volume ; Icreases the channel's talking volume. +; reset_talking_volume ; Reset channel's talking volume to default level. +; +; dialplan_exec(context,exten,priority) ; The dialplan_exec action allows a user + ; to escape from the conference and execute + ; commands in the dialplan. Once the dialplan + ; exits the user will be put back into the + ; conference. The possibilities are endless! +; leave_conference ; This action allows a user to exit the conference and continue + ; execution in the dialplan. +; +; admin_kick_last ; This action allows an Admin to kick the last participant from the + ; conference. This action will only work for admins which allows + ; a single menu to be used for both users and admins. +; +; admin_toggle_conference_lock ; This action allows an Admin to toggle locking and + ; unlocking the conference. Non admins can not use + ; this action even if it is in their menu. + +; set_as_single_video_src ; This action allows any user to set themselves as the + ; single video source distributed to all participants. + ; This will make the video feed stick to them regardless + ; of what the video_mode is set to. + +; release_as_single_video_src ; This action allows a user to release themselves as + ; the video source. If video_mode is not set to "none" + ; this action will result in the conference returning to + ; whatever video mode the bridge profile is using. + ; + ; Note that this action will have no effect if the user + ; is not currently the video source. Also, the user is + ; not guaranteed by using this action that they will not + ; become the video source again. The bridge will return + ; to whatever operation the video_mode option is set to + ; upon release of the video src. + +; admin_toggle_mute_participants ; This action allows an administrator to toggle the mute + ; state for all non-admins within a conference. All + ; admin users are unaffected by this option. Note that all + ; users, regardless of their admin status, are notified + ; that the conference is muted. + +; participant_count ; This action plays back the number of participants currently + ; in a conference + +[sample_user_menu] +type=menu +*=playback_and_continue(conf-usermenu) +*1=toggle_mute +1=toggle_mute +*4=decrease_listening_volume +4=decrease_listening_volume +*6=increase_listening_volume +6=increase_listening_volume +*7=decrease_talking_volume +7=decrease_talking_volume +*8=leave_conference +8=leave_conference +*9=increase_talking_volume +9=increase_talking_volume + +[sample_admin_menu] +type=menu +*=playback_and_continue(conf-adminmenu) +*1=toggle_mute +1=toggle_mute +*2=admin_toggle_conference_lock ; only applied to admin users +2=admin_toggle_conference_lock ; only applied to admin users +*3=admin_kick_last ; only applied to admin users +3=admin_kick_last ; only applied to admin users +*4=decrease_listening_volume +4=decrease_listening_volume +*6=increase_listening_volume +6=increase_listening_volume +*7=decrease_talking_volume +7=decrease_talking_volume +*8=no_op +8=no_op +*9=increase_talking_volume +9=increase_talking_volume diff --git a/asterisk/config_test.conf b/asterisk/config_test.conf new file mode 100644 index 0000000..2fff45e --- /dev/null +++ b/asterisk/config_test.conf @@ -0,0 +1,38 @@ +; Config to test config parsing +; global and item have values that differ from defaults +; global_defaults and item_defualts are to show all defaults are set +; there should be an option for every default type, and a custom type + +[global] +intopt=-1 +uintopt=1 +doubleopt=0.1 +sockaddropt=1.2.3.4:1234 +boolopt=true +boolflag1=true +boolflag2=false +boolflag3=true +deny=0.0.0.0/0 +permit=1.2.3.4/32 +codecopt=!all,ulaw,g729 +stropt=test +customopt=yes + +[global_defaults] + +[item] +intopt=-1 +uintopt=1 +doubleopt=0.1 +sockaddropt=1.2.3.4:1234 +boolopt=true +boolflag1=true +boolflag2=false +boolflag3=true +acldenyopt=0.0.0.0/0 +aclpermitopt=1.2.3.4/32 +codecopt=!all,ulaw,g729 +stropt=test +customopt=yes + +[item_defaults] diff --git a/asterisk/console.conf b/asterisk/console.conf new file mode 100644 index 0000000..606254e --- /dev/null +++ b/asterisk/console.conf @@ -0,0 +1,97 @@ +; +; Configuration for chan_console, a cross-platform console channel driver. +; + +[general] + +; Set this option to "yes" to enable automatically answering calls on the +; console. This is very useful if the console is used as an intercom. +; The default value is "no". +; +;autoanswer = no + +; Set the default context to use for outgoing calls. This can be overridden by +; dialing some extension@context, unless the overridecontext option is enabled. +; The default is "default". +; +;context = default + +; Set the default extension to use for outgoing calls. The default is "s". +; +;extension = s + +; Set the default CallerID for created channels. +; +;callerid = MyName Here <(256) 428-6000> + +; Set the default language for created channels. +; +;language = en + +; If you set overridecontext to 'yes', then the whole dial string +; will be interpreted as an extension, which is extremely useful +; to dial SIP, IAX and other extensions which use the '@' character. +; The default is "no". +; +;overridecontext = no ; if 'no', the last @ will start the context + ; if 'yes' the whole string is an extension. + + +; Default Music on Hold class to use when this channel is placed on hold in +; the case that the music class is not 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 class to use. +; +;mohinterpret=default + +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; Console 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 Console channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive Console side will always + ; be used if the sending side can create jitter. + +; 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 Console + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) 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". +;----------------------------------------------------------------------------------- + + +; +; Any configuration context defined beyond the [general] section configures +; specific devices for use. +; + +[default] +input_device = default ; When configuring an input device and output device, +output_device = default ; use the name that you see when you run the "console + ; list available" CLI command. If you say "default", the + ; system default input and output devices will be used. +autoanswer = no +context = default +extension = s +callerid = MyName Here <(256) 428-6000> +language = en +overridecontext = no +mohinterpret = default +active = yes ; This option should only be set for one console. + ; It means that it is the active console to be + ; used from the Asterisk CLI. diff --git a/asterisk/dbsep.conf b/asterisk/dbsep.conf new file mode 100644 index 0000000..9cfa237 --- /dev/null +++ b/asterisk/dbsep.conf @@ -0,0 +1,35 @@ +# +# Configuration file for dbsep.cgi +# +# The purpose of this file is to provide realtime access to a database, +# possibly through ODBC, without needing to load the ODBC drivers into +# Asterisk, since there are several backend drivers which are rather +# buggy. +# +# We accomplish this separation by using the res_config_curl realtime +# driver to connect to a server running dbsep.cgi (or another, which +# implements the same protocol). +# +# This file contains the information necessary to configure dbsep.cgi. +# +# +# Once installed to a web server, you'll need to preload func_curl.so +# and res_config_curl.so in modules.conf and configure extconfig.conf: +# +# voicemail => curl,http://server/path/to/dbsep.cgi/voicemail +# sippeers => curl,http://server/path/to/dbsep.cgi/sippeers +# + +# The Data Source Name, as specified by the Perl DBI module. +# Typically, this will be along the lines of 'DBI:mysql:astdbname[:dbhostname]' or 'DBI:Pg:dbname=astdbname;hostname=dbhostname' +dsn=somedsn + +# Connected database user +dbuser=someuser + +# And its password +dbpass=password + +# For most databases, this is fine. Set to 'no' for Sybase or MS SQL Server. +backslash_is_escape=yes + diff --git a/asterisk/dnsmgr.conf b/asterisk/dnsmgr.conf new file mode 100644 index 0000000..e34dbcf --- /dev/null +++ b/asterisk/dnsmgr.conf @@ -0,0 +1,5 @@ +[general] +;enable=yes ; enable creation of managed DNS lookups + ; default is 'no' +;refreshinterval=1200 ; refresh managed DNS lookups every seconds + ; default is 300 (5 minutes) \ No newline at end of file diff --git a/asterisk/dsp.conf b/asterisk/dsp.conf new file mode 100644 index 0000000..08c5a57 --- /dev/null +++ b/asterisk/dsp.conf @@ -0,0 +1,43 @@ +[default] +; +; Length of sound (in milliseconds) before a period of silence is considered +; to be a change from talking to silence or a period of noise converts silence +; to talking. [default=256] +; +;silencethreshold=256 + +; DTMF Reverse Twist and Normal Twist is the difference in power between the row and column energies. +; +; Normal Twist is where the Column energy is greater than the Row energy +; Reverse Twist is where the Row energy is greater. +; +; Power level difference between frequencies for different Administrations/RPOAs +; Power Gain equiv +; normal reverse dB's +; AT&T(default) 6.31 2.51 8dB(normal), 4dB(reverse) +; NTT 3.16 3.16 Max. 5dB +; Danish 3.98 3.98 Max. 6dB +; Australian 10.0 10.0 Max. 10dB +; Brazilian 7.94 7.94 Max. 9dB +; ETSI 3.98 3.98 Max. 6dB + +;previous version compatible AT&T values +; RADIO_RELAX disabled, and relaxdtmf=no +; 6.30 2.50 7.99dB(normal), 3.98dB(reverse) +; RADIO_RELAX disabled, and relaxdtmf=yes +; 6.30 4.00 7.99dB(normal), 6.02dB(reverse) +; RADIO_RELAX enabled, and relaxdtmf=no +; 6.30 2.50 7.99dB(normal), 3.984dB(reverse) +; RADIO_RELAX enabled, and relaxdtmf=yes +; 6.30 6.50 7.99dB(normal), 8.13dB(reverse) + +;If you don't know what these mean, don't change them. +;dtmf_normal_twist=6.31 +;dtmf_reverse_twist=2.51 +;relax_dtmf_normal_twist=6.31 +;relax_dtmf_reverse_twist=3.98 + +;successive number hits/misses of 12.75ms before a digit/nodigit is considered valid +;dtmf_hits_to_begin=2 +;dtmf_misses_to_end=3 + diff --git a/asterisk/dundi.conf b/asterisk/dundi.conf new file mode 100644 index 0000000..70f97d4 --- /dev/null +++ b/asterisk/dundi.conf @@ -0,0 +1,268 @@ +; +; DUNDi configuration file +; +; For more information about DUNDi, see http://www.dundi.com +; +; +[general] +; +; The "general" section contains general parameters relating +; to the operation of the dundi client and server. +; +; The first part should be your complete contact information +; should someone else in your peer group need to contact you. +; +;department=Your Department +;organization=Your Company, Inc. +;locality=Your City +;stateprov=ST +;country=US +;email=your@email.com +;phone=+12565551212 +; +; +; Specify bind address and port number. Default is +; 4520 +; +;bindaddr=0.0.0.0 +;port=4520 +; +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of the tos parameter. +;tos=ef +; +; Our entity identifier (Should generally be the MAC address of the +; machine it's running on. Defaults to the first eth address, but you +; can override it here, as long as you set it to the MAC of *something* +; you own!) The EID can be overridden by a setting in asterisk.conf, +; or by setting this option. +; +;entityid=00:07:E9:3B:76:60 +; +; Peers shall cache our query responses for the specified time, +; given in seconds. Default is 3600. +; +;cachetime=3600 +; +; This defines the max depth in which to search the DUNDi system. +; Note that the maximum time that we will wait for a response is +; (2000 + 200 * ttl) ms. +; +ttl=32 +; +; If we don't get ACK to our DPDISCOVER 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 +; +; pbx_dundi creates a rotating key called "secret", under the family +; 'secretpath'. The default family is dundi (resulting in +; the key being held at dundi/secret). +; +;secretpath=dundi +; +; The 'storehistory' option (also changeable at runtime with +; 'dundi store history' and 'dundi no store history') will +; cause the DUNDi engine to keep track of the last several +; queries and the amount of time each query took to execute +; for the purpose of tracking slow nodes. This option is +; off by default due to performance impacts. +; +;storehistory=yes + +[mappings] +; +; The "mappings" section maps DUNDi contexts +; to contexts on the local asterisk system. Remember +; that numbers that are made available under the e164 +; DUNDi context are regulated by the DUNDi General Peering +; Agreement (GPA) if you are a member of the DUNDi E.164 +; Peering System. +; +; dundi_context => local_context,weight,tech,dest[,options]] +; +; 'dundi_context' is the name of the context being requested +; within the DUNDi request +; +; 'local_context' is the name of the context on the local system +; in which numbers can be looked up for which responses shall be given. +; +; 'weight' is the weight to use for the responses provided from this +; mapping. The number must be >= 0 and < 60000. Since it is totally +; valid to receive multiple responses to a query, responses received +; with a lower weight are tried first. Note that the weight has a +; special meaning in the e164 context - see the GPA for more details. +; +; 'tech' is the technology to use (IAX, SIP, H323) +; +; 'dest' is the destination to supply for reaching that number. The +; following variables can be used in the destination string and will +; be automatically substituted: +; ${NUMBER}: The number being requested +; ${IPADDR}: The IP address to connect to +; ${SECRET}: The current rotating secret key to be used +; +; Further options may include: +; +; nounsolicited: No unsolicited calls of any type permitted via this +; route +; nocomunsolicit: No commercial unsolicited calls permitted via +; this route +; residential: This number is known to be a residence +; commercial: This number is known to be a business +; mobile: This number is known to be a mobile phone +; nocomunsolicit: No commercial unsolicited calls permitted via +; this route +; nopartial: Do not search for partial matches +; +; There *must* exist an entry in mappings for DUNDi to respond +; to any request, although it may be empty. +; +;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial +;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial +;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial + +;digexten => default,0,IAX2,guest@lappy/${NUMBER} +;asdf => + +; +; Weights for mappings can be set a few different ways: +; +; 1) It can be set as a static number. +;testmap1 => context1,222,IAX2,guest@peer1/${NUMBER} +; +; 2) It can be an Asterisk global variable. +;testmap2 => context2,${DUNDITESTVAR},IAX2,guest@peer2${NUMBER} +; +; 3) It can be retrieved using a dialplan function. This can be extremely +; useful if you want to let an external script decide what the weight +; in a response shouuld be. +;testmap3 => context3,${SHELL(echo 123)},IAX2,guest@peer3/${NUMBER} +; +; The built in variables ${SECRET}, ${IPADDR} and ${NUMBER} can also be +; passed to the weight. For example, you could pass the ${NUMBER} value +; to your SHELL() script and use that to dynamically return a weight. +; +; Note than when using a global variable or dialplan function to set the +; weight for a mapping, that response caching should be disabled if you +; plan for these values to change frequently at all. If the results are +; cached, then any change in value will not take effect until the cache +; has expired. +; + +; +; The remaining sections represent the peers +; that we fundamentally trust. The section name +; represents the name and optionally at a specific +; DUNDi context if you want the trust to be established +; for only a specific DUNDi context. +; +; inkey - What key they will be authenticating to us with +; +; outkey - What key we use to authenticate to them +; +; host - What their host is +; +; port - The port where their host is listening (default: 4520) +; +; order - What search order to use. May be 'primary', 'secondary', +; 'tertiary' or 'quartiary'. In large systems, it is beneficial +; to only query one up-stream host in order to maximize caching +; value. Adding one with primary and one with secondary gives you +; redundancy without sacrificing performance. +; +; include - Includes this peer when searching a particular context +; for lookup (set "all" to perform all lookups with that +; host. This is also the context in which peers are permitted +; to precache. +; +; noinclude - Disincludes this peer when searching a particular context +; for lookup (set "all" to perform no lookups with that +; host. +; +; permit - Permits this peer to search a given DUNDi context on +; the local system. Set "all" to permit this host to +; lookup all contexts. This is also a context for which +; we will create/forward PRECACHE commands. +; +; deny - Denies this peer to search a given DUNDi context on +; the local system. Set "all" to deny this host to +; lookup all contexts. +; +; model - inbound, outbound, or symmetric for whether we receive +; requests only, transmit requests only, or do both. +; +; precache - Utilize/Permit precaching with this peer (to pre +; cache means to provide an answer when no request +; was made and is used so that machines with few +; routes can push those routes up a to a higher level). +; outgoing means we send precache routes to this peer, +; incoming means we permit this peer to send us +; precache routes. symmetric means we do both. +; +; Note: You cannot mix symmetric/outbound model with symmetric/inbound +; precache, nor can you mix symmetric/inbound model with symmetric/outbound +; precache. +; +; +; The '*' peer is special and matches an unspecified entity +; + +; +; Sample Primary e164 DUNDi peer +; +;[00:50:8B:F3:75:BB] +;model = symmetric +;host = 64.215.96.114 +;inkey = digium +;outkey = misery +;include = e164 +;permit = e164 +;qualify = yes + +; +; Sample Secondary e164 DUNDi peer +; +;[00:A0:C9:96:92:84] +;model = symmetric +;host = misery.digium.com +;inkey = misery +;outkey = ourkey +;include = e164 +;permit = e164 +;qualify = yes +;order = secondary + +; +; Sample "push mode" downstream host +; +;[00:0C:76:96:75:28] +;model = inbound +;host = dynamic +;precache = inbound +;inkey = littleguy +;outkey = ourkey +;include = e164 ; In this case used only for precaching +;permit = e164 +;qualify = yes + +; +; Sample "push mode" upstream host +; +;[00:07:E9:3B:76:60] +;model = outbound +;precache = outbound +;host = 216.207.245.34 +;register = yes +;inkey = dhcp34 +;permit = all ; In this case used only for precaching +;include = all +;qualify = yes +;outkey=foo + +;[*] +; diff --git a/asterisk/enum.conf b/asterisk/enum.conf new file mode 100644 index 0000000..39c7231 --- /dev/null +++ b/asterisk/enum.conf @@ -0,0 +1,22 @@ +; +; ENUM Configuration for resolving phone numbers over DNS +; +; Sample config for Asterisk +; This file is reloaded at "module reload enum" in the CLI +; +[general] +; +; The search list for domains may be customized. Domains are searched +; in the order they are listed here. +; +search => e164.arpa +; +; If you'd like to use the E.164.org public ENUM registry in addition +; to the official e164.arpa one, uncomment the following line +; +;search => e164.org +; +; As there are more H323 drivers available you have to select to which +; drive a H323 URI will map. Default is "H323". +; +h323driver => H323 diff --git a/asterisk/extconfig.conf b/asterisk/extconfig.conf new file mode 100644 index 0000000..5f9ee21 --- /dev/null +++ b/asterisk/extconfig.conf @@ -0,0 +1,102 @@ +; +; Static and realtime external configuration +; engine configuration +; +; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration +; for basic table formatting information. +; +[settings] +; +; Static configuration files: +; +; file.conf => driver,database[,table[,priority]] +; +; maps a particular configuration file to the given +; database driver, database and table (or uses the +; name of the file as the table if not specified) +; +;uncomment to load queues.conf via the odbc engine. +; +;queues.conf => odbc,asterisk,ast_config +;extensions.conf => sqlite,asterisk,ast_config +; +; The following files CANNOT be loaded from Realtime storage: +; asterisk.conf +; extconfig.conf (this file) +; logger.conf +; +; Additionally, the following files cannot be loaded from +; Realtime storage unless the storage driver is loaded +; early using 'preload' statements in modules.conf: +; manager.conf +; cdr.conf +; rtp.conf +; +; Named ACLs specified in realtime also can not be used +; from manager.conf unless the storage driver is preloaded. +; Attempting to use a realtime stored named ACL before the +; driver is loaded will result in an invalid ACL which +; rejects all addresses. +; +; Realtime configuration engine +; +; maps a particular family of realtime +; configuration to a given database driver, +; database and table (or uses the name of +; the family if the table is not specified +; +;example => odbc,asterisk,alttable,1 +;example => mysql,asterisk,alttable,2 +;example2 => ldap,"dc=oxymium,dc=net",example2 +; +; Additionally, priorities are now supported for use as failover methods +; for retrieving realtime data. If one connection fails to retrieve any +; information, the next sequential priority will be tried next. This +; especially works well with ODBC connections, since res_odbc now caches +; when connection failures occur and prevents immediately retrying those +; connections until after a specified timeout. Note: priorities must +; start at 1 and be sequential (i.e. if you have only priorities 1, 2, +; and 4, then 4 will be ignored, because there is no 3). +; +; +; Possible driver backends: +; +; "odbc" is shown in the examples below, but is not the only valid realtime +; engine. Here are several of the possible options: +; odbc ... res_config_odbc +; sqlite ... res_config_sqlite +; pgsql ... res_config_pgsql +; curl ... res_config_curl +; ldap ... res_config_ldap +; mysql ... res_config_mysql (available via add-ons in menuselect) +; +; Note: The res_config_pgsql and res_config_sqlite backends configure the +; database used in their respective configuration files and ignore the +; database name configured in this file. +; +;iaxusers => odbc,asterisk +;iaxpeers => odbc,asterisk +;sippeers => odbc,asterisk +;sipregs => odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view) +;voicemail => odbc,asterisk +;extensions => odbc,asterisk +;meetme => mysql,general +;queues => odbc,asterisk +;queue_members => odbc,asterisk +;acls => odbc,asterisk +;musiconhold => mysql,general +;queue_log => mysql,general +; +; +; While most dynamic realtime engines are automatically used when defined in +; this file, 'extensions', distinctively, is not. To activate dynamic realtime +; extensions, you must turn them on in each respective context within +; extensions.conf with a switch statement. The syntax is: +; switch => Realtime/[[db_context@]tablename]/ +; The only option available currently is the 'p' option, which disallows +; extension pattern queries to the database. If you have no patterns defined +; in a particular context, this will save quite a bit of CPU time. However, +; note that using dynamic realtime extensions is not recommended anymore as a +; best practice; instead, you should consider writing a static dialplan with +; proper data abstraction via a tool like func_odbc. + diff --git a/asterisk/extensions.ael b/asterisk/extensions.ael new file mode 100644 index 0000000..495001f --- /dev/null +++ b/asterisk/extensions.ael @@ -0,0 +1,456 @@ +// +// Example AEL config file +// +// +// Static extension configuration file, used by +// the pbx_ael module. This is where you configure all your +// inbound and outbound calls in Asterisk. +// +// This configuration file is reloaded +// - With the "ael reload" command in the CLI +// - With the "reload" command (that reloads everything) in the CLI + +// The "Globals" category contains global variables that can be referenced +// in the dialplan by using the GLOBAL dialplan function: +// ${GLOBAL(VARIABLE)} +// ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid +// Unix/Linux environmental variables are reached with the ENV dialplan +// function: ${ENV(VARIABLE)} +// + +// NOTE! NOTE! NOTE! +// Asterisk by default will load both extensions.conf and extensions.ael files. +// Upon loading these files the dialplans generated from both with be merged, +// so you must make sure that you don't have any overlapping contexts or global +// variables. If you do, then unexpected behavior may result when the data is +// merged. +// NOTE! NOTE! NOTE! + +globals { + CONSOLE-AEL="Console/dsp"; // Console interface for demo + //CONSOLE-AEL=Zap/1; + //CONSOLE-AEL=Phone/phone0; + IAXINFO-AEL=guest; // IAXtel username/password + //IAXINFO-AEL="myuser:mypass"; + OUTBOUND-TRUNK="Zap/g2"; // Trunk interface + // + // Note the 'g2' in the OUTBOUND-TRUNK variable above. It specifies which group (defined + // in chan_dahdi.conf) to dial, i.e. group 2, and how to choose a channel to use in + // the specified group. The four possible options are: + // + // g: select the lowest-numbered non-busy DAHDI channel + // (aka. ascending sequential hunt group). + // G: select the highest-numbered non-busy DAHDI channel + // (aka. descending sequential hunt group). + // r: use a round-robin search, starting at the next highest channel than last + // time (aka. ascending rotary hunt group). + // R: use a round-robin search, starting at the next lowest channel than last + // time (aka. descending rotary hunt group). + // + OUTBOUND-TRUNKMSD=1; // MSD digits to strip (usually 1 or 0) + //OUTBOUND-TRUNK2=IAX2/user:pass@provider; +}; + +// +// Any category other than "General" and "Globals" represent +// extension contexts, which are collections of extensions. +// +// Extension names may be numbers, letters, or combinations +// thereof. If an extension name is prefixed by a '_' +// character, it is interpreted as a pattern rather than a +// literal. In patterns, some characters have special meanings: +// +// X - any digit from 0-9 +// Z - any digit from 1-9 +// N - any digit from 2-9 +// [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) +// . - wildcard, matches anything remaining (e.g. _9011. matches +// anything starting with 9011 excluding 9011 itself) +// ! - wildcard, causes the matching process to complete as soon as +// it can unambiguously determine that no other matches are possible +// +// For example the extension _NXXXXXX would match normal 7 digit dialings, +// while _1NXXNXXXXXX would represent an area code plus phone number +// preceded by a one. +// +// Each step of an extension is ordered by priority, which must +// always start with 1 to be considered a valid extension. The priority +// "next" or "n" means the previous priority plus one, regardless of whether +// the previous priority was associated with the current extension or not. +// The priority "same" or "s" means the same as the previously specified +// priority, again regardless of whether the previous entry was for the +// same extension. Priorities may be immediately followed by a plus sign +// and another integer to add that amount (most useful with 's' or 'n'). +// Priorities may then also have an alias, or label, in +// parenthesis after their name which can be used in goto situations +// +// Contexts contain several lines, one for each step of each +// extension, which can take one of two forms as listed below, +// with the first form being preferred. One may include another +// context in the current one as well, optionally with a +// date and time. Included contexts are included in the order +// they are listed. +// +//context name { +// exten-name => { +// application(arg1,arg2,...); +// +// Timing list for includes is +// +// ; path to the certificate file (*.pem) only. +;tlsprivatekey= ; path to private key file (*.pem) only. +; If no path is given for tlscertfile or tlsprivatekey, default is to look in current +; directory. If no tlsprivatekey is given, default is to search tlscertfile for private key. +; +; To produce a certificate you can e.g. use openssl. This places both the cert and +; private in same .pem file. +; openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem +; +; The post_mappings section maps URLs to real paths on the filesystem. If a +; POST is done from within an authenticated manager session to one of the +; configured POST mappings, then any files in the POST will be placed in the +; configured directory. +; +;[post_mappings] +; +; In this example, if the prefix option is set to "asterisk", then using the +; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/. +;uploads = /var/lib/asterisk/uploads/ +; diff --git a/asterisk/iax.conf b/asterisk/iax.conf new file mode 100644 index 0000000..eb82ad8 --- /dev/null +++ b/asterisk/iax.conf @@ -0,0 +1,668 @@ +; +; 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) + +;bindaddr=192.168.0.1 ; You can specify 'bindaddr' more than once to bind to + ; multiple addresses, but the first will be the + ; default. + +; +; 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: +; +;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: +; +;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. +; +;allow=all +;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. +; +; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels +; we don't want to do jitterbuffering on the switch, since the endpoints +; can each handle this. However, some endpoints may have poor jitterbuffers +; themselves, so this option will force * to always jitterbuffer, even in this +; case. +; +; 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 +forcejitterbuffer=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|) + ; 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 +; + +; +; 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/.pub +; while private keys are named /var/lib/asterisk/keys/.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. +;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=216.207.245.47 +description=Demo System At Digium ; 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 +;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 +; diff --git a/asterisk/iaxprov.conf b/asterisk/iaxprov.conf new file mode 100644 index 0000000..668809c --- /dev/null +++ b/asterisk/iaxprov.conf @@ -0,0 +1,81 @@ +; +; 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 + diff --git a/asterisk/indications.conf b/asterisk/indications.conf new file mode 100644 index 0000000..7ac1ba9 --- /dev/null +++ b/asterisk/indications.conf @@ -0,0 +1,736 @@ +; +; indications.conf +; +; Configuration file for location specific tone indications +; + +; +; NOTE: +; When adding countries to this file, please keep them in alphabetical +; order according to the 2-character country codes! +; +; The [general] category is for certain global variables. +; All other categories are interpreted as location specific indications +; + +[general] +country=us ; default location + + +; [example] +; description = string +; The full name of your country, in English. +; ringcadence = num[,num]* +; List of durations the physical bell rings. +; dial = tonelist +; Set of tones to be played when one picks up the hook. +; busy = tonelist +; Set of tones played when the receiving end is busy. +; congestion = tonelist +; Set of tones played when there is some congestion (on the network?) +; callwaiting = tonelist +; Set of tones played when there is a call waiting in the background. +; dialrecall = tonelist +; Not well defined; many phone systems play a recall dial tone after hook +; flash. +; record = tonelist +; Set of tones played when call recording is in progress. +; info = tonelist +; Set of tones played with special information messages (e.g., "number is +; out of service") +; 'name' = tonelist +; Every other variable will be available as a shortcut for the "PlayList" command +; but will not be used automatically by Asterisk. +; +; +; The tonelist itself is defined by a comma-separated sequence of elements. +; Each element consist of a frequency (f) with an optional duration (in ms) +; attached to it (f/duration). The frequency component may be a mixture of two +; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2). +; The implicit modulation depth is fixed at 90%, though. +; If the list element starts with a !, that element is NOT repeated, +; therefore, only if all elements start with !, the tonelist is time-limited, +; all others will repeat indefinitely. +; +; concisely: +; element = [!]freq[+|*freq2][/duration] +; tonelist = element[,element]* +; + +[at] +description = Austria +ringcadence = 1000,5000 +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +dial = 420 +busy = 420/400,0/400 +ring = 420/1000,0/5000 +congestion = 420/200,0/200 +callwaiting = 420/40,0/1960 +dialrecall = 420 +; RECORDTONE - not specified +record = 1400/80,0/14920 +info = 950/330,1450/330,1850/330,0/1000 +stutter = 380+420 + +[au] +description = Australia +; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf +; Normal Ring +ringcadence = 400,200,400,2000 +; Distinctive Ring 1 - Forwarded Calls +; 400,400,200,200,400,1400 +; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall +; 400,400,200,2000 +; Distinctive Ring 3 - Multiple Subscriber Number 1 +; 200,200,400,2200 +; Distinctive Ring 4 - Selective Ring 1 + Centrex +; 400,2600 +; Distinctive Ring 5 - Selective Ring 3 +; 400,400,200,400,200,1400 +; Distinctive Ring 6 - Multiple Subscriber Number 2 +; 200,400,200,200,400,1600 +; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy +; 200,400,200,400,200,1600 +; Tones +dial = 413+438 +busy = 425/375,0/375 +ring = 413+438/400,0/200,413+438/400,0/2000 +; XXX Congestion: Should reduce by 10 db every other cadence XXX +congestion = 425/375,0/375,420/375,0/375 +callwaiting = 425/200,0/200,425/200,0/4400 +dialrecall = 413+438 +; Record tone used for Call Intrusion/Recording or Conference +record = !425/1000,!0/15000,425/360,0/15000 +info = 425/2500,0/500 +; Other Australian Tones +; The STD "pips" indicate the call is not an untimed local call +std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100 +; Facility confirmation tone (eg. Call Forward Activated) +facility = 425 +; Message Waiting "stutter" dialtone +stutter = 413+438/100,0/40 +; Ringtone for calls to Telstra mobiles +ringmobile = 400+450/400,0/200,400+450/400,0/2000 + +[bg] +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +description = Bulgaria +ringcadence = 1000,4000 +; +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/250,0/250 +callwaiting = 425/150,0/150,425/150,0/4000 +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +record = 1400/425,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +stutter = 425/1500,0/100 + +[br] +description = Brazil +ringcadence = 1000,4000 +dial = 425 +busy = 425/250,0/250 +ring = 425/1000,0/4000 +congestion = 425/250,0/250,425/750,0/250 +callwaiting = 425/50,0/1000 +; Dialrecall not used in Brazil standard (using UK standard) +dialrecall = 350+440 +; Record tone is not used in Brazil, use busy tone +record = 425/250,0/250 +; Info not used in Brazil standard (using UK standard) +info = 950/330,1400/330,1800/330 +stutter = 350+440 + +[be] +description = Belgium +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,3000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/3000 +congestion = 425/167,0/167 +callwaiting = 1400/175,0/175,1400/175,0/3500 +; DIALRECALL - not specified +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +; RECORDTONE - not specified +record = 1400/500,0/15000 +info = 900/330,1400/330,1800/330,0/1000 +stutter = 425/1000,0/250 + +[ch] +description = Switzerland +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/200,0/200,425/200,0/4000 +; DIALRECALL - not specified +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +; RECORDTONE - not specified +record = 1400/80,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +stutter = 425+340/1100,0/1100 + +[cl] +description = Chile +; According to specs from Telefonica CTC Chile +ringcadence = 1000,3000 +dial = 400 +busy = 400/500,0/500 +ring = 400/1000,0/3000 +congestion = 400/200,0/200 +callwaiting = 400/250,0/8750 +dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 +record = 1400/500,0/15000 +info = 950/333,1400/333,1800/333,0/1000 +stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 + +[cn] +description = China +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 450 +busy = 450/350,0/350 +ring = 450/1000,0/4000 +congestion = 450/700,0/700 +callwaiting = 450/400,0/4000 +dialrecall = 450 +record = 950/400,0/10000 +info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400 +; STUTTER - not specified +stutter = 450+425 + +[cz] +description = Czech Republic +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425/330,0/330,425/660,0/660 +busy = 425/330,0/330 +ring = 425/1000,0/4000 +congestion = 425/165,0/165 +callwaiting = 425/330,0/9000 +; DIALRECALL - not specified +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660 +; RECORDTONE - not specified +record = 1400/500,0/14000 +info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 +; STUTTER - not specified +stutter = 425/450,0/50 + +[de] +description = Germany +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425 +busy = 425/480,0/480 +ring = 425/1000,0/4000 +congestion = 425/240,0/240 +callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0 +; DIALRECALL - not specified +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +; RECORDTONE - not specified +record = 1400/80,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +stutter = 425+400 + +[dk] +description = Denmark +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0 +; DIALRECALL - not specified +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +; RECORDTONE - not specified +record = 1400/80,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +; STUTTER - not specified +stutter = 425/450,0/50 + +[ee] +description = Estonia +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425 +busy = 425/300,0/300 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +; CALLWAIT not in accordance to ITU +callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600 +; DIALRECALL - not specified +dialrecall = 425/650,0/25 +; RECORDTONE - not specified +record = 1400/500,0/15000 +; INFO not in accordance to ITU +info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 +; STUTTER not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[es] +description = Spain +ringcadence = 1500,3000 +dial = 425 +busy = 425/200,0/200 +ring = 425/1500,0/3000 +congestion = 425/200,0/200,425/200,0/200,425/200,0/600 +callwaiting = 425/175,0/175,425/175,0/3500 +dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 +record = 1400/500,0/15000 +info = 950/330,0/1000 +dialout = 500 +; STUTTER not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + + +[fi] +description = Finland +ringcadence = 1000,4000 +dial = 425 +busy = 425/300,0/300 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/150,0/150,425/150,0/8000 +dialrecall = 425/650,0/25 +record = 1400/500,0/15000 +info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 +stutter = 425/650,0/25 + +[fr] +description = France +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1500,3500 +; Dialtone can also be 440+330 +dial = 440 +busy = 440/500,0/500 +ring = 440/1500,0/3500 +; CONGESTION - not specified +congestion = 440/250,0/250 +callwait = 440/300,0/10000 +; DIALRECALL - not specified +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +; RECORDTONE - not specified +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330 +stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440 + +[gr] +description = Greece +ringcadence = 1000,4000 +dial = 425/200,0/300,425/700,0/800 +busy = 425/300,0/300 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/150,0/150,425/150,0/8000 +dialrecall = 425/650,0/25 +record = 1400/400,0/15000 +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 +stutter = 425/650,0/25 + +[hu] +description = Hungary +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1250,3750 +dial = 425 +busy = 425/300,0/300 +ring = 425/1250,0/3750 +congestion = 425/300,0/300 +callwaiting = 425/40,0/1960 +dialrecall = 425+450 +; RECORDTONE - not specified +record = 1400/400,0/15000 +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 +stutter = 350+375+400 + +[il] +description = Israel +ringcadence = 1000,3000 +dial = 414 +busy = 414/500,0/500 +ring = 414/1000,0/3000 +congestion = 414/250,0/250 +callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000 +dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414 +record = 1400/500,0/15000 +info = 1000/330,1400/330,1800/330,0/1000 +stutter = !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414 + + +[in] +description = India +ringcadence = 400,200,400,2000 +dial = 400*25 +busy = 400/750,0/750 +ring = 400*25/400,0/200,400*25/400,0/2000 +congestion = 400/250,0/250 +callwaiting = 400/200,0/100,400/200,0/7500 +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,0/1000 +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,400*25 + +[it] +description = Italy +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +dial = 425/200,0/200,425/600,0/1000 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000 +dialrecall = 470/400,425/400 +record = 1400/400,0/15000 +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 +stutter = 470/400,425/400 + +[lt] +description = Lithuania +ringcadence = 1000,4000 +dial = 425 +busy = 425/350,0/350 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/150,0/150,425/150,0/4000 +; DIALRECALL - not specified +dialrecall = 425/500,0/50 +; RECORDTONE - not specified +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 +; STUTTER - not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[jp] +description = Japan +ringcadence = 1000,2000 +dial = 400 +busy = 400/500,0/500 +ring = 400+15/1000,0/2000 +congestion = 400/500,0/500 +callwaiting = 400+16/500,0/8000 +dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400 +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,0 +stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 + +[mx] +description = Mexico +ringcadence = 2000,4000 +dial = 425 +busy = 425/250,0/250 +ring = 425/1000,0/4000 +congestion = 425/250,0/250 +callwaiting = 425/200,0/600,425/200,0/10000 +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +record = 1400/500,0/15000 +info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,425 + +[my] +description = Malaysia +ringcadence = 2000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/400,0/200,425/400,0/2000 +congestion = 425/500,0/500 +; STUTTER - not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[nl] +description = Netherlands +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +ringcadence = 1000,4000 +; Most of these 425's can also be 450's +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/250,0/250 +callwaiting = 425/500,0/9500 +; DIALRECALL - not specified +dialrecall = 425/500,0/50 +; RECORDTONE - not specified +record = 1400/500,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +stutter = 425/500,0/50 + +[no] +description = Norway +ringcadence = 1000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/200,0/200 +callwaiting = 425/200,0/600,425/200,0/10000 +dialrecall = 470/400,425/400 +record = 1400/400,0/15000 +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 +stutter = 470/400,425/400 + +[nz] +description = New Zealand +; Reference = http://www.telepermit.co.nz/TNA102.pdf +ringcadence = 400,200,400,2000 +dial = 400 +busy = 400/500,0/500 +ring = 400+450/400,0/200,400+450/400,0/2000 +congestion = 400/250,0/250 +callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200 +dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 +record = 1400/425,0/15000 +info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400 +stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 +unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400 + +[ph] + +; reference http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf + +description = Philippines +ringcadence = 1000,4000 +dial = 425 +busy = 480+620/500,0/500 +ring = 425+480/1000,0/4000 +congestion = 480+620/250,0/250 +callwaiting = 440/300,0/10000 +; DIALRECALL - not specified +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +; RECORDTONE - not specified +record = 1400/500,0/15000 +; INFO - not specified +info = !950/330,!1400/330,!1800/330,0 +; STUTTER - not specified +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,425 + + +[pl] +description = Poland +ringcadence = 1000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/500,0/500 +callwaiting = 425/150,0/150,425/150,0/4000 +; DIALRECALL - not specified +dialrecall = 425/500,0/50 +; RECORDTONE - not specified +record = 1400/500,0/15000 +; 950/1400/1800 3x0.33 on 1.0 off repeated 3 times +info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000 +; STUTTER - not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[pt] +description = Portugal +ringcadence = 1000,5000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/5000 +congestion = 425/200,0/200 +callwaiting = 440/300,0/10000 +dialrecall = 425/1000,0/200 +record = 1400/500,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[ru] +; References: +; http://www.minsvyaz.ru/site.shtml?id=1806 +; http://www.aboutphone.info/lib/gost/45-223-2001.html +description = Russian Federation / ex Soviet Union +ringcadence = 1000,4000 +dial = 425 +busy = 425/350,0/350 +ring = 425/1000,0/4000 +congestion = 425/175,0/175 +callwaiting = 425/200,0/5000 +record = 1400/400,0/15000 +info = 950/330,1400/330,1800/330,0/1000 +dialrecall = 425/400,0/40 +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + +[se] +description = Sweden +ringcadence = 1000,5000 +dial = 425 +busy = 425/250,0/250 +ring = 425/1000,0/5000 +congestion = 425/250,0/750 +callwaiting = 425/200,0/500,425/200,0/9100 +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +record = 1400/500,0/15000 +info = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0 +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 +; stutter = 425/320,0/20 ; Real swedish standard, not used for now + +[sg] +description = Singapore +; Singapore +; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf +; Frequency specs are: 425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz +ringcadence = 400,200,400,2000 +dial = 425 +ring = 425*24/400,0/200,425*24/400,0/2000 ; modulation should be 100%, not 90% +busy = 425/750,0/750 +congestion = 425/250,0/250 +callwaiting = 425*24/300,0/200,425*24/300,0/3200 +stutter = !425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425 +info = 950/330,1400/330,1800/330,0/1000 ; not currently in use acc. to reference +dialrecall = 425*24/500,0/500,425/500,0/2500 ; unspecified in IDA reference, use repeating Holding Tone A,B +record = 1400/500,0/15000 ; unspecified in IDA reference, use 0.5s tone every 15s +; additionally defined in reference +nutone = 425/2500,0/500 +intrusion = 425/250,0/2000 +warning = 425/624,0/4376 ; end of period tone, warning +acceptance = 425/125,0/125 +holdinga = !425*24/500,!0/500 ; followed by holdingb +holdingb = !425/500,!0/2500 + +[th] +description = Thailand +ringcadence = 1000,4000 +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +dial = 400*50 +busy = 400/500,0/500 +ring = 420/1000,0/5000 +congestion = 400/300,0/300 +callwaiting = 1000/400,10000/400,1000/400 +; DIALRECALL - not specified - use special dial tone instead. +dialrecall = 400*50/400,0/100,400*50/400,0/100 +; RECORDTONE - not specified +record = 1400/500,0/15000 +; INFO - specified as an announcement - use special information tones instead +info = 950/330,1400/330,1800/330 +; STUTTER - not specified +stutter = !400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400 + +[uk] +description = United Kingdom +ringcadence = 400,200,400,2000 +; These are the official tones taken from BT SIN350. The actual tones +; used by BT include some volume differences so sound slightly different +; from Asterisk-generated ones. +dial = 350+440 +; Special dial is the intermittent dial tone heard when, for example, +; you have a divert active on the line +specialdial = 350+440/750,440/750 +; Busy is also called "Engaged" +busy = 400/375,0/375 +; "Congestion" is the Beep-bip engaged tone +congestion = 400/400,0/350,400/225,0/525 +; "Special Congestion" is not used by BT very often if at all +specialcongestion = 400/200,1004/300 +unobtainable = 400 +ring = 400+450/400,0/200,400+450/400,0/2000 +callwaiting = 400/100,0/4000 +; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones +specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000 +; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it +; is and I've not used a payphone for years) +creditexpired = 400/125,0/125 +; These two are used to confirm/reject service requests on exchanges that +; don't do voice announcements. +confirm = 1400 +switching = 400/200,0/400,400/2000,0/400 +; This is the three rising tones Doo-dah-dee "Special Information Tone", +; usually followed by the BT woman saying an appropriate message. +info = 950/330,0/15,1400/330,0/15,1800/330,0/1000 +; Not listed in SIN350 +record = 1400/500,0/60000 +stutter = 350+440/750,440/750 + +[us] +description = United States / North America +ringcadence = 2000,4000 +dial = 350+440 +busy = 480+620/500,0/500 +ring = 440+480/2000,0/4000 +congestion = 480+620/250,0/250 +callwaiting = 440/300,0/10000 +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,0 +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 + +[us-old] +description = United States Circa 1950/ North America +ringcadence = 2000,4000 +dial = 600*120 +busy = 500*100/500,0/500 +ring = 420*40/2000,0/4000 +congestion = 500*100/250,0/250 +callwaiting = 440/300,0/10000 +dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,0 +stutter = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 + +[tw] +description = Taiwan +; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html +; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html +; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm +; http://www.pbx-manufacturer.com/ky120dx.htm +; http://www.nettwerked.net/tones.txt +; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm +; +; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off +; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off +; ringing tone 440+480Hz 1 sec. on ,2 sec. off +; +ringcadence = 1000,4000 +dial = 350+440 +busy = 480+620/500,0/500 +ring = 440+480/1000,0/2000 +congestion = 480+620/250,0/250 +callwaiting = 350+440/250,0/250,350+440/250,0/3250 +dialrecall = 300/1500,0/500 +record = 1400/500,0/15000 +info = !950/330,!1400/330,!1800/330,0 +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 + +[ve] +; Tone definition source for ve found on +; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf +description = Venezuela / South America +ringcadence = 1000,4000 +dial = 425 +busy = 425/500,0/500 +ring = 425/1000,0/4000 +congestion = 425/250,0/250 +callwaiting = 400+450/300,0/6000 +dialrecall = 425 +record = 1400/500,0/15000 +info = !950/330,!1440/330,!1800/330,0/1000 +; STUTTER - not specified +stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 + + +[za] +description = South Africa +; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm +; (definitions for other countries can also be found there) +; Note, though, that South Africa uses two switch types in their network -- +; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere. +; The former use 383+417 in dial, ringback etc. The latter use 400*33 +; I've provided both, uncomment the ones you prefer +ringcadence = 400,200,400,2000 +; dial/ring/callwaiting for the Siemens switches: +dial = 400*33 +ring = 400*33/400,0/200,400*33/400,0/2000 +callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250 +; dial/ring/callwaiting for the Alcatel switches: +; dial = 383+417 +; ring = 383+417/400,0/200,383+417/400,0/2000 +; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250 +congestion = 400/250,0/250 +busy = 400/500,0/500 +dialrecall = 350+440 +; XXX Not sure about the RECORDTONE +record = 1400/500,0/10000 +info = 950/330,1400/330,1800/330,0/330 +stutter = !400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33 diff --git a/asterisk/jabber.conf b/asterisk/jabber.conf new file mode 100644 index 0000000..a838568 --- /dev/null +++ b/asterisk/jabber.conf @@ -0,0 +1,39 @@ +[general] +;debug=yes ; Enable debugging (disabled by default). +;autoprune=yes ; Auto remove users from buddy list. Depending on your + ; setup (ie, using your personal Gtalk account for a test) + ; you might lose your contacts list. Default is 'no'. +;autoregister=yes ; Auto register users from buddy list. +;collection_nodes=yes ; Enable support for XEP-0248 for use with + ; distributed device state. Default is 'no'. +;pubsub_autocreate=yes ; Whether or not the PubSub server supports/is using + ; auto-create for nodes. If it is, we have to + ; explicitly pre-create nodes before publishing them. + ; Default is 'no'. +;auth_policy=accept ; Auto accept users' subscription requests (default). + ; Set to deny for auto denial. +;[asterisk] +;type=client ; Client or Component connection +;serverhost=astjab.org ; Route to server for example, talk.google.com +;pubsub_node=pubsub.astjab.org ; Node to use for publishing events via PubSub +;username=asterisk@astjab.org/asterisk ; Username with optional resource. +;secret=blah ; Password +;priority=1 ; Resource priority +;port=5222 ; Port to use defaults to 5222 +;usetls=yes ; Use tls or not +;usesasl=yes ; Use sasl or not +;buddy=mogorman@astjab.org ; Manual addition of buddy to list. + ; For distributed events, these buddies are + ; automatically added in the whitelist as + ; 'owners' of the node(s). +;distribute_events=yes ; Whether or not to distribute events using + ; this connection. Default is 'no'. +;status=available ; One of: chat, available, away, xaway, or dnd +;statusmessage="I am available" ; Have custom status message for Asterisk +;timeout=5 ; Timeout (in seconds) on the message stack, defaults to 5. + ; Messages stored longer than this value will be deleted by Asterisk. + ; This option applies to incoming messages only, which are intended to + ; be processed by the JABBER_RECEIVE dialplan function. +;sendtodialplan=yes ; Send incoming messages into the dialplan. Off by default. +;context=messages ; Dialplan context to send incoming messages to. If not set, + ; "default" will be used. diff --git a/asterisk/jingle.conf b/asterisk/jingle.conf new file mode 100644 index 0000000..8873d06 --- /dev/null +++ b/asterisk/jingle.conf @@ -0,0 +1,20 @@ +;[general] +;context=default ;;Context to dump call into +;bindaddr=0.0.0.0 ;;Address to bind to +;allowguest=yes ;;Allow calls from people not in + ;;list of peers +; +;[guest] ;;special account for options on guest account +;disallow=all +;allow=ulaw +;context=guest +; +;[ogorman] +;username=ogorman@gmail.com ;;username of the peer your + ;;calling or accepting calls from +;disallow=all +;allow=ulaw +;context=default +;connection=asterisk ;;client or component in jabber.conf + ;;for the call to leave on. +; diff --git a/asterisk/logger.conf b/asterisk/logger.conf new file mode 100644 index 0000000..07d8f1b --- /dev/null +++ b/asterisk/logger.conf @@ -0,0 +1,127 @@ +; +; Logging Configuration +; +; In this file, you configure logging to files or to +; the syslog system. +; +; "logger reload" at the CLI will reload configuration +; of the logging system. + +[general] +; +; Customize the display of debug message time stamps +; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS) +; +; see strftime(3) Linux manual for format specifiers. Note that there is also +; a fractional second parameter which may be used in this field. Use %1q +; for tenths, %2q for hundredths, etc. +; +;dateformat=%F %T ; ISO 8601 date format +;dateformat=%F %T.%3q ; with milliseconds +; +; +; This makes Asterisk write callids to log messages +; (defaults to yes) +;use_callids = no +; +; This appends the hostname to the name of the log files. +;appendhostname = yes +; +; This determines whether or not we log queue events to a file +; (defaults to yes). +;queue_log = no +; +; Determines whether the queue_log always goes to a file, even +; when a realtime backend is present (defaults to no). +;queue_log_to_file = yes +; +; Set the queue_log filename +; (defaults to queue_log) +;queue_log_name = queue_log +; +; Log rotation strategy: +; sequential: Rename archived logs in order, such that the newest +; has the highest sequence number [default]. When +; exec_after_rotate is set, ${filename} will specify +; the new archived logfile. +; rotate: Rotate all the old files, such that the oldest has the +; highest sequence number [this is the expected behavior +; for Unix administrators]. When exec_after_rotate is +; set, ${filename} will specify the original root filename. +; timestamp: Rename the logfiles using a timestamp instead of a +; sequence number when "logger rotate" is executed. +; When exec_after_rotate is set, ${filename} will +; specify the new archived logfile. +;rotatestrategy = rotate +; +; Run a system command after rotating the files. This is mainly +; useful for rotatestrategy=rotate. The example allows the last +; two archive files to remain uncompressed, but after that point, +; they are compressed on disk. +; +; exec_after_rotate=gzip -9 ${filename}.2 +; +; +; For each file, specify what to log. +; +; For console logging, you set options at start of +; Asterisk with -v for verbose and -d for debug +; See 'asterisk -h' for more information. +; +; Directory for log files is configures in asterisk.conf +; option astlogdir +; +[logfiles] +; +; Format is "filename" and then "levels" of debugging to be included: +; debug +; notice +; warning +; error +; verbose() +; dtmf +; fax +; security +; +; Special filename "console" represents the root console +; +; Filenames can either be relative to the standard Asterisk log directory +; (see 'astlogdir' in asterisk.conf), or absolute paths that begin with +; '/'. +; +; Verbose takes an optional argument, in the form of an integer level. +; Verbose messages with higher levels will not be logged to the file. If +; the verbose level is not specified, it will log verbose messages following +; the current level of the root console. +; +; Special level name "*" means all levels, even dynamic levels registered +; by modules after the logger has been initialized (this means that loading +; and unloading modules that create/remove dynamic logger levels will result +; in these levels being included on filenames that have a level name of "*", +; without any need to perform a 'logger reload' or similar operation). +; Note that there is no value in specifying both "*" and specific level names +; for a filename; the "*" level means all levels. The only exception is if +; you need to specify a specific verbose level. e.g, "verbose(3),*". +; +; We highly recommend that you DO NOT turn on debug mode if you are simply +; running a production system. Debug mode turns on a LOT of extra messages, +; most of which you are unlikely to understand without an understanding of +; the underlying code. Do NOT report debug messages as code issues, unless +; you have a specific issue that you are attempting to debug. They are +; messages for just that -- debugging -- and do not rise to the level of +; something that merit your attention as an Asterisk administrator. Debug +; messages are also very verbose and can and do fill up logfiles quickly; +; this is another reason not to have debug mode on a production system unless +; you are in the process of debugging a specific issue. +; +;debug => debug +;security => security +console => notice,warning,error +;console => notice,warning,error,debug +messages => notice,warning,error +;full => notice,warning,error,debug,verbose,dtmf,fax + +;syslog keyword : This special keyword logs to syslog facility +; +;syslog.local0 => notice,warning,error +; diff --git a/asterisk/manager.conf b/asterisk/manager.conf new file mode 100644 index 0000000..d21f46c --- /dev/null +++ b/asterisk/manager.conf @@ -0,0 +1,153 @@ +; +; AMI - The Asterisk Manager Interface +; +; Third party application call management support and PBX event supervision +; +; Use the "manager show commands" at the CLI to list available manager commands +; and their authorization levels. +; +; "manager show command " will show a help text. +; +; ---------------------------- SECURITY NOTE ------------------------------- +; Note that you should not enable the AMI on a public IP address. If needed, +; block this TCP port with iptables (or another FW software) and reach it +; with IPsec, SSH, or SSL vpn tunnel. You can also make the manager +; interface available over http/https if Asterisk's http server is enabled in +; http.conf and if both "enabled" and "webenabled" are set to yes in +; this file. Both default to no. httptimeout provides the maximum +; timeout in seconds before a web based session is discarded. The +; default is 60 seconds. +; +[general] +enabled = no +;webenabled = yes + +port = 5038 +bindaddr = 0.0.0.0 + +; Parameters that control AMI over TLS. ("enabled" must be set too). +; You can open a connection to this socket with e.g. +; +; openssl s_client -connect my_host:5039 +; +;tlsenable=no ; set to YES to enable it +;tlsbindaddr=0.0.0.0:5039 ; address and port to bind to, default to bindaddr and port 5039 +;tlscertfile=/tmp/asterisk.pem ; path to the certificate. +;tlsprivatekey=/tmp/private.pem ; path to the private key, if no private given, + ; if no tlsprivatekey is given, default is to search + ; tlscertfile for private key. +;tlscipher= ; string specifying which SSL ciphers to use or not use +; +;allowmultiplelogin = yes ; IF set to no, rejects manager logins that are already in use. +; ; The default is yes. +; +;displayconnects = yes +; +; Add a Unix epoch timestamp to events (not action responses) +; +;timestampevents = yes + +;brokeneventsaction = yes ; Restore previous behavior that caused the events + ; action to not return a response in certain + ; circumstances. Defaults to 'no'. + +; +; Display certain channel variables every time a channel-oriented +; event is emitted: +; +;channelvars = var1,var2,var3 + +; debug = on ; enable some debugging info in AMI messages (default off). + ; Also accessible through the "manager debug" CLI command. + +; authtimeout specifies the maximum number of seconds a client has to +; authenticate. If the client does not authenticate beofre this timeout +; expires, the client will be disconnected. (default: 30 seconds) + +;authtimeout = 30 + +; authlimit specifies the maximum number of unauthenticated sessions that will +; be allowed to connect at any given time. + +;authlimit = 50 + +;httptimeout = 60 +; a) httptimeout sets the Max-Age of the http cookie +; b) httptimeout is the amount of time the webserver waits +; on a action=waitevent request (actually its httptimeout-10) +; c) httptimeout is also the amount of time the webserver keeps +; a http session alive after completing a successful action + + +;[mark] +;secret = mysecret +;deny=0.0.0.0/0.0.0.0 +;permit=209.16.236.73/255.255.255.0 +;acl=named_acl_example ; use a named ACL from acl.conf +; +; +;setvar=PBXACCOUNT=edvina +; The setvar option defines channel variables that will be set when this account +; originates a call. You can define multiple setvar= commands for one manager +; user. +; +;eventfilter=Event: Newchannel +;eventfilter=!Channel: DAHDI.* +; The eventfilter option is used to whitelist or blacklist events per user. +; A filter consists of a (basic/old-style and unanchored) regular expression +; that is run on the entire event data. If the first character of the filter +; is an exclamation mark (!), the filter is appended to the blacklist instead +; of the whitelist. After first checking the read access below, the regular +; expression filters are processed as follows: +; - If no filters are configured all events are reported as normal. +; - If there are white filters only: implied black all filter processed first, +; then white filters. +; - If there are black filters only: implied white all filter processed first, +; then black filters. +; - If there are both white and black filters: implied black all filter processed +; first, then white filters, and lastly black filters. + +; +; If the device connected via this user accepts input slowly, +; the timeout for writes to it can be increased to keep it +; from being disconnected (value is in milliseconds) +; +; writetimeout = 100 +; +;displayconnects = yes ; Display on CLI user login/logoff +; +; Authorization for various classes +; +; Read authorization permits you to receive asynchronous events, in general. +; Write authorization permits you to send commands and get back responses. The +; following classes exist: +; +; all - All event classes below (including any we may have missed). +; system - General information about the system and ability to run system +; management commands, such as Shutdown, Restart, and Reload. +; call - Information about channels and ability to set information in a +; running channel. +; log - Logging information. Read-only. (Defined but not yet used.) +; verbose - Verbose information. Read-only. (Defined but not yet used.) +; agent - Information about queues and agents and ability to add queue +; members to a queue. +; user - Permission to send and receive UserEvent. +; config - Ability to read and write configuration files. +; command - Permission to run CLI commands. Write-only. +; dtmf - Receive DTMF events. Read-only. +; reporting - Ability to get information about the system. +; cdr - Output of cdr_manager, if loaded. Read-only. +; dialplan - Receive NewExten and VarSet events. Read-only. +; originate - Permission to originate new calls. Write-only. +; agi - Output AGI commands executed. Input AGI command to execute. +; cc - Call Completion events. Read-only. +; aoc - Permission to send Advice Of Charge messages and receive Advice +; - Of Charge events. +; test - Ability to read TestEvent notifications sent to the Asterisk Test +; Suite. Note that this is only enabled when the TEST_FRAMEWORK +; compiler flag is defined. +; message - Permissions to send out of call messages. Write-only +; +;read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan +;write = system,call,agent,user,config,command,reporting,originate,message + diff --git a/asterisk/meetme.conf b/asterisk/meetme.conf new file mode 100644 index 0000000..c40c460 --- /dev/null +++ b/asterisk/meetme.conf @@ -0,0 +1,45 @@ +; +; Configuration file for MeetMe simple conference rooms for Asterisk of course. +; +; This configuration file is read every time you call app meetme() + +[general] +;audiobuffers=32 ; The number of 20ms audio buffers to be used + ; when feeding audio frames from non-DAHDI channels + ; into the conference; larger numbers will allow + ; for the conference to 'de-jitter' audio that arrives + ; at different timing than the conference's timing + ; source, but can also allow for latency in hearing + ; the audio from the speaker. Minimum value is 2, + ; maximum value is 32. +; +; Conferences may be scheduled from realtime? +;schedule=yes +; +; Update realtime when members login/out of the conference +;logmembercount=no +; +; How much earlier than the start time should we allow participants to +; join the conference (in seconds)? +;fuzzystart=300 +; +; If the participants join too early, how much time should we allow +; to tell them that they've joined too early, rather than telling them +; the conference simply doesn't exist (in seconds)? +;earlyalert=3600 +; +; How many seconds before the scheduled end of the conference should +; the participants be warned? +;endalert=120 +; +[rooms] +; +; Usage is conf => confno[,pin][,adminpin] +; +; Note that once a participant has called the conference, a change to the pin +; number done in this file will not take effect until there are no more users +; in the conference and it goes away. When it is created again, it will have +; the new pin number. +; +;conf => 1234 +;conf => 2345,9938 diff --git a/asterisk/mgcp.conf b/asterisk/mgcp.conf new file mode 100644 index 0000000..7c725bc --- /dev/null +++ b/asterisk/mgcp.conf @@ -0,0 +1,142 @@ +; +; MGCP Configuration for Asterisk +; +[general] +;port = 2427 +;bindaddr = 0.0.0.0 + +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters. +;tos=cs3 ; Sets TOS for signaling packets. +;tos_audio=ef ; Sets TOS for RTP audio packets. +;cos=3 ; Sets 802.1p priority for signaling packets. +;cos_audio=5 ; Sets 802.1p priority for RTP audio packets. + +;---------------------- DIGIT TIMEOUTS ---------------------------- +firstdigittimeout = 30000 ; default 16000 = 16s +gendigittimeout = 10000 ; default 8000 = 8s +matchdigittimeout = 5000 ; defaults 3000 = 3s + +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a + ; MGCP 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 MGCP channel can accept jitter, + ; thus an enabled jitterbuffer on the receive MGCP side will only + ; be used if the sending side can create jitter and jbforce is + ; also set to yes. + +; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a MGCP + ; 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 MGCP + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) 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". +;----------------------------------------------------------------------------------- + +;[dlinkgw] +;host = 192.168.0.64 +;context = default +;directmedia = no +;line => aaln/2 +;line => aaln/1 + +;; The MGCP channel supports the following service codes: +;; # - Transfer +;; *67 - Calling Number Delivery Blocking +;; *70 - Cancel Call Waiting +;; *72 - Call Forwarding Activation +;; *73 - Call Forwarding Deactivation +;; *78 - Do Not Disturb Activation +;; *79 - Do Not Disturb Deactivation +;; *8 - Call pick-up +; +; known to work with Swissvoice IP10s +;[192.168.1.20] +;context=local +;host=192.168.1.20 +;callerid = "John Doe" <123> +;callgroup=0 ; in the range from 0 to 63 +;pickupgroup=0 ; in the range from 0 to 63 +;nat=no +;threewaycalling=yes +;transfer=yes ; transfer requires threewaycalling=yes. Use FLASH to transfer +;callwaiting=yes ; this might be a cause of trouble for ip10s +;cancallforward=yes +;line => aaln/1 +; + +;[dph100] +; +; Supporting the DPH100M requires defining DLINK_BUGGY_FIRMWARE in +; chan_mgcp.c in addition to enabling the slowsequence mode due to +; bugs in the D-Link firmware +; +;context=local +;host=dynamic +;dtmfmode=none ; DTMF Mode can be 'none', 'rfc2833', or 'inband' or + ; 'hybrid' which starts in none and moves to inband. Default is none. +;slowsequence=yes ; The DPH100M does not follow MGCP standards for sequencing +;line => aaln/1 + +; known to work with wave7optics FTTH LMGs +;[192.168.1.20] +;accountcode = 1000 ; record this in cdr as account identification for billing +;amaflags = billing ; record this in cdr as flagged for 'billing', + ; 'documentation', or 'omit' +;context = local +;host = 192.168.1.20 +;wcardep = aaln/* ; enables wildcard endpoint and sets it to 'aaln/*' + ; another common format is '*' +;callerid = "Duane Cox" <123> ; now lets setup line 1 using per endpoint configuration... +;callwaiting = no +;callreturn = yes +;cancallforward = yes +;directmedia = no +;transfer = no +;dtmfmode = inband +;setvar=one=1 ; Set channel variables associated with this incoming line +;setvar=two=2 +;line => aaln/1 ; now lets save this config to line1 aka aaln/1 +;clearvars=all ; Reset list of variables back to none +;callerid = "Duane Cox" <456> ; now lets setup line 2 +;callwaiting = no +;callreturn = yes +;cancallforward = yes +;directmedia = no +;transfer = no +;dtmfmode = inband +;line => aaln/2 ; now lets save this config to line2 aka aaln/2 + +; PacketCable +;[sbv5121e-mta.test.local] +;host = 10.0.1.3 +;callwaiting = 1 +;canreinvite = 1 +;dtmfmode = rfc2833 +;amaflags = BILLING +;ncs = yes ; Use NCS 1.0 signalling +;pktcgatealloc = yes ; Allocate DQOS gate on CMTS +;hangupongateremove = yes ; Hangup the channel if the CMTS close the gate +;callerid = 3622622225 +;accountcode = test-3622622225 +;line = aaln/1 +;callerid = 3622622226 +;accountcode = test-3622622226 +;line = aaln/2 diff --git a/asterisk/minivm.conf b/asterisk/minivm.conf new file mode 100644 index 0000000..55a39c8 --- /dev/null +++ b/asterisk/minivm.conf @@ -0,0 +1,218 @@ +; +; Mini-Voicemail Configuration +; for the MiniVM set of applications +; +; MiniVM consists of the following dialplan applications +; MinivmGreet Play personal prompts for busy/unavailable/temporary messages or default prompts +; MinivmRecord Record voice prompts to account directory or default directory +; MinivmNotify Notify via e-mail or pager - with or without attachment +; MinivmDelete Delete voice prompt (filename as argument or channel variable set by MinivmRecord) +; +; MiniVM works without accounts (just give e-mail address as argument) or with accounts in +; this configuration file or realtime. The idea is to build voicemail as building blocks so that +; a complete and adaptive voicemail system can be built in the dialplan +; +;------------------------------ Variables to use in subject, from and message body ------------------ +; Change the from, body and/or subject, variables: +; MVM_NAME, MVM_DUR, MVM_MSGNUM, VM_MAILBOX, MVM_CALLERID, MVM_CIDNUM, +; MVM_CIDNAME, MVM_DATE +; +; In addition to these, you can set the MVM_COUNTER channel variable in the +; dial plan and use that as a counter. It will also be used in the file name +; of the media file attached to the message +; +; Note: The emailbody config row can only be up to 512 characters due to a +; limitation in the Asterisk configuration subsystem. +; To create longer mails, use the templatefile option when creating the template +;---------------------------------------------------------------------------------------------------- + +[general] +; Default format for storing and sending voicemail +; (only one format. Can also be set on a per-mailbox level) +format=wav49 +;format=gsm +; +;Turn on logfile with the following syntax. One line per voicemail received +;with minivmRecord() +; Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:origtime:duration:durationstatus:accountcode +;logfile=/var/log/asterisk/minivm.log +; Who the e-mail notification should appear to come from +serveremail=asterisk +;serveremail=asterisk@asterisk.example.com +; Minimum length of a voicemail message in seconds for the message to be kept +; The default is no minimum. +;minmessage=3 +; How many seconds of silence before we end the recording +maxsilence=10 +; Silence threshold (what we consider silence: the lower, the more sensitive) +silencethreshold=128 +; How long greeting messages (busy/unavailable/temp/name) are allowed to be, in seconds +;maxgreet=120 +; If you need to have an external program, i.e. /usr/bin/myapp called when a +; voicemail is received by the server. The arguments are +; +; +; +;externnotify=/usr/bin/myapp +; The character set for voicemail messages can be specified here +;charset=ISO-8859-1 +; Skip the "[PBX]:" string from the message title +;pbxskip=yes +; Change the From: string + +; You can override the default program to send e-mail if you wish, too +; This is used both for e-mail and pager messages +;mailcmd=/usr/sbin/sendmail -t +; +;--------------Default e-mail message template (used if no templates are used) ------ +;fromstring=The Asterisk PBX +; + +;emailsubject=[PBX]: New message ${MVM_COUNER} in mailbox ${VM_MAILBOX} +; The following definition is very close to the default, but the default shows +; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown +; caller", if they are both null. +;emailbody=Dear ${MVM_NAME}:\n\n\tjust wanted to let you know you were just left a ${MVM_DUR} long message (number ${MVM_COUNTER})\nin mailbox ${MVM_MAILBOX} from ${MVM_CALLERID}, on ${MVM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n +; +; Set the date format on outgoing mails. Valid arguments can be found on the +; strftime(3) man page +; +; Default +emaildateformat=%A, %B %d, %Y at %r +; 24h date format +;emaildateformat=%A, %d %B %Y at %H:%M:%S +; +;--------------Default pager message template (used if no templates are used) ------ +; You can also change the Pager From: string, the pager body and/or subject. +; The above defined variables also can be used here +;pagerfromstring=The Asterisk PBX +;pagersubject=New VM ${MVM_COUNTER} +;pagerbody=New ${MVM_DUR} long msg in box ${MVM_MAILBOX}\nfrom ${MVM_CALLERID}, on ${MVM_DATE} +; +; +;--------------Timezone definitions (used in voicemail accounts) ------------------- +; +; Users may be located in different timezones, or may have different +; message announcements for their introductory message when they enter +; the voicemail system. Set the message and the timezone each user +; hears here. Set the user into one of these zones with the tz= attribute +; in the options field of the mailbox. Of course, language substitution +; still applies here so you may have several directory trees that have +; alternate language choices. +; +; Look in /usr/share/zoneinfo/ for names of timezones. +; Look at the manual page for strftime for a quick tutorial on how the +; variable substitution is done on the values below. +; +; Supported values: +; 'filename' filename of a soundfile (single ticks around the filename +; required) +; ${VAR} variable substitution +; A or a Day of week (Saturday, Sunday, ...) +; B or b or h Month name (January, February, ...) +; d or e numeric day of month (first, second, ..., thirty-first) +; Y Year +; I or l Hour, 12 hour clock +; H Hour, 24 hour clock (single digit hours preceded by "oh") +; k Hour, 24 hour clock (single digit hours NOT preceded by "oh") +; M Minute, with 00 pronounced as "o'clock" +; N Minute, with 00 pronounced as "hundred" (US military time) +; P or p AM or PM +; Q "today", "yesterday" or ABdY +; (*note: not standard strftime value) +; q "" (for today), "yesterday", weekday, or ABdY +; (*note: not standard strftime value) +; R 24 hour time, including minute +; +; The message here is not used in mini-voicemail, but stays for +; backwards compatibility + +[zonemessages] +eastern=America/New_York|'vm-received' Q 'digits/at' IMp +central=America/Chicago|'vm-received' Q 'digits/at' IMp +central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' +military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' + +;----------------------- Message body templates--------------------- +; [template-name] ; "template-" is a verbatim marker +; fromaddress = Your Friendly Asterisk Server +; fromemail = asteriskvm@digium.com +; subject = +; attachmedia = yes | no ; Add media file as attachment? +; dateformat = ; See above +; charset = ; Mime charset definition for e-mail messages +; locale = ; Locale for LC_TIME - to get weekdays in local language +; ; See your O/S documentation for proper settings for setlocale() +; templatefile = ; File name (relative to Asterisk configuration directory, + ; or absolute +; messagebody = Format ; Message body definition with variables +; +[template-sv_SE_email] +messagebody=Hej ${MVM_NAME}:\n\n\tDu har fått ett röstbrevlåde-meddelande från ${MVM_CALLERID}.\nLängd: ${MVM_DUR}\nMailbox ${MVM_MAILBOX}\nDatum: ${MVM_DATE}. \nMeddelandet bifogas det här brevet. Om du inte kan läsa det, kontakta intern support. \nHälsningar\n\n\t\t\t\t--Asterisk\n +subject = Du har fått röstmeddelande (se bilaga) +fromemail = swedish-voicemail-service@stockholm.example.com +fromaddress = Asterisk Röstbrevlåda +charset=iso-8859-1 +attachmedia=yes +dateformat=%A, %d %B %Y at %H:%M:%S +locale=sv_SE + +[template-en_US_email] +messagebody=Dear ${MVM_NAME}:\n\n\tjust wanted to let you know you were just left a ${MVM_DUR} long message \nin mailbox ${MVM_MAILBOX} from ${MVM_CALLERID}, on ${MVM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n +subject = New voicemail +charset=ascii +attachmedia=yes +dateformat=%A, %B %d, %Y at %r + +;[template-sv_SE_pager] +;templatefile = templates/pager_sv_se.txt +;subject = Du har fått voicemail +;charset=iso-8859-1 +;attachmedia=no +;locale=sv_SE + +;[template-nb_NO_email] +;templatefile = templates/email_nb_NO.txt +;subject = Du har fått voicemail +;charset=iso-8859-1 +;locale=nb_NO + +;[template-en_US_email_southern] +;templatefile = templates/email_en_US.txt +;subject = Y'all got voicemail, honey! +;charset=ascii + +;[template-en_UK_email] +;templatefile = templates/email_en_us.txt +;subject = Dear old chap, you've got an electronic communique +;charset=ascii + +;----------------------- Mailbox accounts -------------------------- +;Template for mailbox definition - all options +; +; [username@domain] ; Has to be unique within domain (MWM_USERNAME, MWM_DOMAIN) +; etemplate = sv_SE ; Email template from [templates] +; ptemplate = en_US ; Pager template from [templates] +; email = userpart@domain ; Extra e-mail address (overrides mailbox name) +; pager = pageremail@domain ; E-mail address for pager messages +; fullname = Mark Spencer ; Full name (MWM_NAME) +; options = ; E-mail options, se below +; accountcode = ; Account code (read in dialplan function MINIVMACCOUNT) +; pincode = ; Numeric pin code (read in dialplan function MINIVMACCOUNT) +; timezone=se ; Time zone +; serveremail = asterisk@digium.com ; Who to send email from (overrides template if set) +; externnotify = ; External application for this account +; volgain = ; Volume gain setting (requires "sox") +; setvar=SERVICENAME=Voop.com Networks ; Extra variables to use in template + +; Remember that you can use Asterisk Configuration Templates (ACT) + +; [template@example.com](!) ; Declare template +; setvar=customerdomain=example.com +; setvar=customerclass=gold +; etemplate = sv_se_email +; serveremail = voicemail@example.com + +; [user2@example.com](template@example.com) ; Declare user2 account using template +; fullname = Olle E. Johansson +; ; User inherits everything from template diff --git a/asterisk/misdn.conf b/asterisk/misdn.conf new file mode 100644 index 0000000..ac54dbc --- /dev/null +++ b/asterisk/misdn.conf @@ -0,0 +1,537 @@ +; +; chan_misdn sample config +; + +; general section: +; +; for debugging and general setup, things that are not bound to port groups +; + +[general] +; +; Sets the Path to the misdn-init.conf (for nt_ptp mode checking) +; +misdn_init=/etc/misdn-init.conf + +; set debugging flag: +; 0 - No Debug +; 1 - mISDN Messages and * - Messages, and * - State changes +; 2 - Messages + Message specific Informations (e.g. bearer capability) +; 3 - very Verbose, the above + lots of Driver specific infos +; 4 - even more Verbose than 3 +; +; default value: 0 +; +debug=0 + + + +; set debugging file and flags for mISDNuser (NT-Stack) +; +; flags can be or'ed with the following values: +; +; DBGM_NET 0x00000001 +; DBGM_MSG 0x00000002 +; DBGM_FSM 0x00000004 +; DBGM_TEI 0x00000010 +; DBGM_L2 0x00000020 +; DBGM_L3 0x00000040 +; DBGM_L3DATA 0x00000080 +; DBGM_BC 0x00000100 +; DBGM_TONE 0x00000200 +; DBGM_BCDATA 0x00000400 +; DBGM_MAN 0x00001000 +; DBGM_APPL 0x00002000 +; DBGM_ISDN 0x00004000 +; DBGM_SOCK 0x00010000 +; DBGM_CONN 0x00020000 +; DBGM_CDATA 0x00040000 +; DBGM_DDATA 0x00080000 +; DBGM_SOUND 0x00100000 +; DBGM_SDATA 0x00200000 +; DBGM_TOPLEVEL 0x40000000 +; DBGM_ALL 0xffffffff +; + +ntdebugflags=0 +ntdebugfile=/var/log/misdn-nt.log + + +; some pbx systems do cut the L1 for some milliseconds, to avoid +; dropping running calls, we can set this flag to yes and tell +; mISDNuser not to drop the calls on L2_RELEASE +ntkeepcalls=no + +; the big trace +; +; default value: [not set] +; +;tracefile=/var/log/asterisk/misdn.log + + +; set to yes if you want mISDN_dsp to bridge the calls in HW +; +; default value: yes +; +bridging=no + + +; stops dialtone after getting first digit on nt Port +; +; default value: yes +; +stop_tone_after_first_digit=yes + +; whether to append overlapdialed Digits to Extension or not +; +; default value: yes +; +append_digits2exten=yes + +;;; CRYPTION STUFF + +; Whether to look for dynamic crypting attempt +; +; default value: no +; +dynamic_crypt=no + +; crypt_prefix, what is used for crypting Protocol +; +; default value: [not set] +; +crypt_prefix=** + +; Keys for cryption, you reference them in the dialplan +; later also in dynamic encr. +; +; default value: [not set] +; +crypt_keys=test,muh + +;------------------------------ 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". +;----------------------------------------------------------------------------------- + +; users sections: +; +; name your sections as you wish but not "general" or "default" ! +; the sections are Groups, you can dial out in extensions.conf +; with Dial(mISDN/g:extern/101) where extern is a section name, +; chan_misdn tries every port in this section to find a +; new free channel +; +; The default section is not a group section, it just contains config elements +; which are inherited by group sections. +; +[default] + +; define your default context here +; +; default value: default +; +context=misdn + +; language +; +; default value: en +; +language=en + +; +; This option specifies a default music on hold class to +; use when put on hold if the channel's moh class was not +; explicitly set with Set(CHANNEL(musicclass)=whatever) and +; the peer channel did not suggest a class to use. +; +musicclass=default + +; +; Either if we should produce DTMF Tones ourselves +; +senddtmf=yes + +; +; If we should generate Ringing for chan_sip and others +; +far_alerting=no + + +; +; Here you can list which bearer capabilities should be allowed: +; all - allow any bearer capability +; speech - allow speech +; 3_1khz - allow 3.1KHz audio +; digital_unrestricted - allow unrestricted digital +; digital_restricted - allow restricted digital +; video - allow video +; +; Example: +; allowed_bearers=speech,3_1khz +; +allowed_bearers=all + +; Incoming number prefixes for the indicated Type-Of-Number. These are +; inserted before any number (caller, dialed, connected, redirecting, +; redirection) received from the ISDN link if that number has the +; corresponding Type-Of-Number. +; See the dialplan options. +; +; default values: +; unknownprefix= +; internationalprefix=00 +; nationalprefix=0 +; netspecificprefix= +; subscriberprefix= +; abbreviatedprefix= +; +;unknownprefix= +internationalprefix=00 +nationalprefix=0 +;netspecificprefix= +;subscriberprefix= +;abbreviatedprefix= + +; set rx/tx gains between -8 and 8 to change the RX/TX Gain +; +; default values: rxgain: 0 +; txgain: 0 +; +rxgain=0 +txgain=0 + +; some telcos especially in NL seem to need this set to yes, also in +; switzerland this seems to be important +; +; default value: no +; +te_choose_channel=no + + + +; +; Monitors L1 of the port. If L1 is down it tries +; to bring it up. The polling timeout is given in seconds. +; Setting the value to 0 disables monitoring L1 of the port. +; +; default value: 0 +; +; This option is only read at chan_misdn loading time. +; You need to unload and load chan_misdn to change the +; value. An asterisk restart will also do the trick. +; +l1watcher_timeout=0 + +; +; This option defines, if chan_misdn should check the L1 on a PMP +; before making a group call on it. The L1 may go down for PMP Ports +; so we might need this. +; But be aware! a broken or plugged off cable might be used for a group call +; as well, since chan_misdn has no chance to distinguish if the L1 is down +; because of a lost Link or because the Provider shut it down... +; +; default: no +; +pmp_l1_check=no + + +; +; in PMP this option defines which cause should be sent out to +; the 3. caller. chan_misdn does not support callwaiting on TE +; PMP side. This allows to modify the RELEASE_COMPLETE cause +; at least. +; +reject_cause=16 + + +; +; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING), +; this requests additional Infos, so we can waitfordigits +; without much issues. This works only for PTP Ports +; +; default value: no +; +need_more_infos=no + + +; +; set this to yes if you want to disconnect calls when a timeout occurs +; for example during the overlapdial phase +; +nttimeout=no + +; Set the method to use for channel selection: +; standard - Use the first free channel starting from the lowest number. +; standard_dec - Use the first free channel starting from the highest number. +; round_robin - Use the round robin algorithm to select a channel. Use this +; if you want to balance your load. +; +; default value: standard +; +method=standard + + +; specify if chan_misdn should collect digits before going into the +; dialplan, you can choose yes=4 Seconds, no, or specify the amount +; of seconds you need; +; +overlapdial=yes + +; +; dialplan means Type Of Number in ISDN Terms +; There are different types of the dialplan: +; +; dialplan -> for outgoing call's dialed number +; localdialplan -> for outgoing call's callerid +; (if -1 is set use the value from the asterisk channel) +; cpndialplan -> for incoming call's connected party number sent to caller +; (if -1 is set use the value from the asterisk channel) +; +; dialplan options: +; +; 0 - unknown +; 1 - International +; 2 - National +; 3 - Network-Specific +; 4 - Subscriber +; 5 - Abbreviated +; +; default value: 0 +; +dialplan=0 +localdialplan=0 +cpndialplan=0 + + + +; +; turn this to no if you don't mind correct handling of Progress Indicators +; +early_bconnect=yes + + +; +; turn this on if you like to send Tone Indications to a Incoming +; isdn channel on a TE Port. Rarely used, only if the Telco allows +; you to send indications by yourself, normally the Telco sends the +; indications to the remote party. +; +; default: no +; +incoming_early_audio=no + +; uncomment the following to get into s extension at extension conf +; there you can use DigitTimeout if you can't or don't want to use +; isdn overlap dial. +; note: This will jump into the s exten for every exten! +; +; default value: no +; +;always_immediate=no + +; +; set this to yes if you want to generate your own dialtone +; with always_immediate=yes, else chan_misdn generates the dialtone +; +; default value: no +; +nodialtone=no + + +; uncomment the following if you want callers which called exactly the +; base number (so no extension is set) jump to the s extension. +; if the user dials something more it jumps to the correct extension +; instead +; +; default value: no +; +;immediate=no + +; uncomment the following to have hold and retrieve support +; +; default value: no +; +;hold_allowed=yes + +; Pickup and Callgroup +; +; default values: not set = 0 +; range: 0-63 +; +;callgroup=1 +;pickupgroup=1 + +; Named pickup groups and named call groups +; +; give a name to groups and configure any number of groups +; +;namedcallgroup=engineering,sales,netgroup,protgroup +;namedpickupgroup=sales + +; Set the outgoing caller id to the value. +;callerid="name" + +; +; these are the exact isdn screening and presentation indicators +; if -1 is given for either value the presentation indicators are used +; from asterisks CALLERPRES function. +; s=0, p=0 -> callerid presented +; s=1, p=1 -> callerid restricted (the remote end does not see it!) +; +; default values s=-1, p=-1 +presentation=-1 +screen=-1 + +; Incoming calls will have a caller ID tag set to this value +; +;incoming_cid_tag = "asterisk" + +; With this set, you can automatically append the MSN of a party +; to the cid_tag. Incoming calls have the dialed number appended +; to the tag, and outgoing calls have the caller number appended +; to the tag. An '_' is used to separate the tag from the +; MSN. +; Default is no. +; +;append_msn_to_cid_tag = no + +; Select what to do with outgoing COLP information on this port. +; +; 0 - Send out COLP information unaltered. (default) +; 1 - Force COLP to restricted on all outgoing COLP information. +; 2 - Do not send COLP information. +outgoing_colp=0 + +; Put a display ie in the CONNECT message containing the following +; information if it is available (nt port only): +; +; 0 - Do not put the connected line information in the display ie. +; 1 - Put the available connected line name in the display ie. +; 2 - Put the available connected line number in the display ie. +; 3 - Put the available connected line name and number in the display ie. +; +display_connected=0 + +; Put a display ie in the SETUP message containing the following +; information if it is available (nt port only): +; +; 0 - Do not put the caller information in the display ie. +; 1 - Put the available caller name in the display ie. +; 2 - Put the available caller number in the display ie. +; 3 - Put the available caller name and number in the display ie. +; +display_setup=0 + +; This enables echo cancellation with the given number of taps. +; Be aware: Move this setting only to outgoing portgroups! +; A value of zero turns echo cancellation off. +; +; possible values are: 0,32,64,128,256,yes(=128),no(=0) +; +; default value: no +; +;echocancel=no + +; +; chan_misdns jitterbuffer, default 4000 +; +jitterbuffer=4000 + +; +; change this threshold to enable dejitter functionality +; +jitterbuffer_upper_threshold=0 + + +; +; change this to yes, if you want to bridge a mISDN data channel to +; another channel type or to an application. +; +hdlc=no + + +; +; defines the maximum amount of incoming calls per port for +; this group. Calls which exceed the maximum will be marked with +; the channel variable MAX_OVERFLOW. It will contain the amount of +; overflowed calls +; +max_incoming=-1 + +; +; defines the maximum amount of outgoing calls per port for this group +; exceeding calls will be rejected +; +max_outgoing=-1 + +; +; Enable/disable the call-completion retention option support (ptp only). +; +; Note: To use the CCBS/CCNR supplementary service feature and other +; supplementary services using FACILITY messages requires a +; modified version of mISDN from: +; http://svn.digium.com/svn/thirdparty/mISDN/trunk +; http://svn.digium.com/svn/thirdparty/mISDNuser/trunk +; +cc_request_retention=yes + +[intern] +; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) +ports=1,2 +; context where to go to when incoming Call on one of the above ports +context=Intern + +[internPP] +; +; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn +; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding +; configs. For backwards compatibility you can still set ptp here. +; +ports=3 + +[first_extern] +; again port defs +ports=4 +; again a context for incoming calls +context=Extern1 +; msns for te ports, listen on those numbers on the above ports, and +; indicate the incoming calls to asterisk +; here you can give a comma separated list or simply an '*' for +; any msn. +msns=* + +; here an example with given msns +[second_extern] +ports=5 +context=Extern2 +callerid="Asterisk" <1234> +msns=102,144,101,104 diff --git a/asterisk/modules.conf b/asterisk/modules.conf new file mode 100644 index 0000000..38e33e1 --- /dev/null +++ b/asterisk/modules.conf @@ -0,0 +1,45 @@ +; +; Asterisk configuration file +; +; Module Loader configuration file +; + +[modules] +autoload=yes +; +; Any modules that need to be loaded before the Asterisk core has been +; initialized (just after the logger has been initialized) can be loaded +; using 'preload'. This will frequently be needed if you wish to map all +; module configuration files into Realtime storage, since the Realtime +; driver will need to be loaded before the modules using those configuration +; files are initialized. +; +; An example of loading ODBC support would be: +;preload => res_odbc.so +;preload => res_config_odbc.so +; +; Uncomment the following if you wish to use the Speech Recognition API +;preload => res_speech.so +; +; If you want Asterisk to fail if a module does not load, then use +; the "require" keyword. Asterisk will exit with a status code of 2 +; if a required module does not load. +; +; require = chan_sip.so +; If you want you can combine with preload +; preload-require = res_odbc.so +; +; If you want, load the GTK console right away. +; +noload => pbx_gtkconsole.so +;load => pbx_gtkconsole.so +; +load => res_musiconhold.so +; +; Load one of: chan_oss, alsa, or console (portaudio). +; By default, load chan_oss only (automatically). +; +noload => chan_alsa.so +;noload => chan_oss.so +noload => chan_console.so +; diff --git a/asterisk/motif.conf b/asterisk/motif.conf new file mode 100644 index 0000000..ae3ab30 --- /dev/null +++ b/asterisk/motif.conf @@ -0,0 +1,92 @@ +; Sample configuration file for chan_motif + +; Transports +; +; There are three different transports and protocol derivatives supported by chan_motif. They are in order of preference: +; Jingle using ICE-UDP, Google Jingle, and Google-V1. +; +; Jingle as defined in XEP-0166 supports the widest range of features. It is referred to as "ice-udp" in this file. This is +; the specification that Jingle clients implement. +; +; Google Jingle follows the Jingle specification for signaling but uses a custom transport for media. It is supported +; by the Google Talk Plug-in in Gmail and by some other Jingle clients. It is referred to as "google" in this file. +; +; Google-V1 is the original Google Talk signaling protocol which uses an initial preliminary version of Jingle. +; It also uses the same custom transport as Google Jingle for media. It is supported by Google Voice, some other Jingle +; clients, and the Windows Google Talk client. It is referred to as "google-v1" in this file. +; +; Incoming sessions will automatically switch to the correct transport once it has been determined. +; +; Outgoing sessions are capable of determining if the target is capable of Jingle or a Google transport if the target is +; in the roster. Unfortunately it is not possible to differentiate between a Google Jingle or Google-V1 capable resource +; until a session initiate attempt occurs. If a resource is determined to use a Google transport it will initially use +; Google Jingle but will fall back to Google-V1 if required. +; +; If an outgoing session attempt fails due to failure to support the given transport chan_motif will fall back in preference +; order listed at the beginning of this document until all transports have been exhausted. +; + +; Dialing and Resource Selection Strategy +; +; Placing a call through an endpoint can be accomplished using the following dial string: +; +; Motif// +; +; When placing an outgoing call through an endpoint the requested target is searched for in the roster list. If present +; the first Jingle or Google Jingle capable resource is specifically targetted. Since the capabilities of the resource are +; known the outgoing session initation will disregard the configured transport and use the determined one. +; +; If the target is not found in the roster the target will be used as-is and a session will be initiated using the +; transport specified in this configuration file. If no transport has been specified the endpoint defaults to ice-udp. +; + +; Video Support +; +; Support for video does not need to be explicitly enabled. Configuring any video codec on your endpoint will +; automatically enable it. + +; DTMF +; +; The only supported method for DTMF is RFC2833. This is always enabled on audio streams and negotiated if possible. + +; Incoming Calls +; +; Incoming calls will first look for the extension matching the name of the endpoint in the configured context. If +; no such extension exists the call will automatically fall back to the "s" extension. + +; CallerID +; +; The incoming caller id number is populated with the username of the caller and the name is populated with the full +; identity of the caller. If you would like to perform authentication or filtering of incoming calls it is recommended +; that you use these fields to do so. +; +; Outgoing caller id can *not* be set. +; +; IMPORTANT: Multiple endpoints using the same connection is *NOT* supported. Doing so may result in broken calls. + +; Default template for endpoints, to be included in their definition +[default](!) +disallow=all +allow=ulaw +allow=h264 +context=incoming-motif ; Default context that incoming sessions will land in + +;maxicecandidates = 10 ; Maximum number of ICE candidates we will offer +;maxpayloads = 30 ; Maximum number of payloads we will offer + +; Sample configuration entry for Jingle +[jingle-endpoint](default) +transport=ice-udp ; Change the default protocol of outgoing sessions to Jingle ICE-UDP +allow=g722 ; Add G.722 as an allowed format since the other side may support it +connection=local-jabber-account ; Connection to accept traffic on and send traffic out +accountcode=jingle ; Account code for CDR purposes + +; Sample configuration entry for Google Talk +[gtalk-endpoint](default) +transport=google ; Since this is a Google Talk endpoint we want to offer Google Jingle for outgoing sessions +connection=gtalk-account + +; Sample configuration entry for Google Voice +[gvoice](default) +transport=google-v1 ; Google Voice uses the original Google Talk protocol +connection=gvoice-account diff --git a/asterisk/musiconhold.conf b/asterisk/musiconhold.conf new file mode 100644 index 0000000..1211c8a --- /dev/null +++ b/asterisk/musiconhold.conf @@ -0,0 +1,89 @@ +; +; Music on Hold -- Sample Configuration +; +[general] +;cachertclasses=yes ; use 1 instance of moh class for all users who are using it, + ; decrease consumable cpu cycles and memory + ; disabled by default + + +; valid mode options: +; files -- read files from a directory in any Asterisk supported +; media format +; quietmp3 -- default +; mp3 -- loud +; mp3nb -- unbuffered +; quietmp3nb -- quiet unbuffered +; custom -- run a custom application (See examples below) + +; ========= +; File-based (native) music on hold +; ========= +; +; This plays files directly from the specified directory, no external +; processes are required. Files are played in normal sorting order +; (same as a sorted directory listing), and no volume or other +; sound adjustments are available. If the file is available in +; the same format as the channel's codec, then it will be played +; without transcoding (same as Playback would do in the dialplan). +; Files can be present in as many formats as you wish, and the +; 'best' format will be chosen at playback time. +; +; The path specified can be either an absolute path (starts with '/'), +; or a relative path; relative paths are interpreted as being relative +; to the 'astdatalibdir' in asterisk.conf, which defaults to +; /var/lib/asterisk. +; +; NOTE: +; If you are not using "autoload" in modules.conf, then you +; must ensure that the format modules for any formats you wish +; to use are loaded _before_ res_musiconhold. If you do not do +; this, res_musiconhold will skip the files it is not able to +; understand when it loads. +; + +[default] +mode=files +directory=moh +; +;[native-random] +;mode=files +;directory=moh +;digit=# ; If this option is set for a class, then when callers are +; ; listening to music on hold, they can press this digit, and +; ; they will switch to listening to this music class. +;announcement=queue-thankyou ;If this option is set for a class, then +; ; when callers get put on hold, the specified sound will be +; ; be played to them. Also, if using modes that Asterisk +; ; controls the playlist for (files, mp3, etc), the same +; ; sound will also be played between MOH songs. +;sort=random ; Sort the files in random order + +;[native-alphabetical] +;mode=files +;directory=moh +;sort=alpha ; Sort the files in alphabetical order. If this option is +; ; not specified, the sort order is undefined. + +; ========= +; Other (non-native) playback methods +; ========= + +;[manual] +;mode=custom +; Note that with mode=custom, a directory is not required, such as when reading +; from a stream. +;directory=/var/lib/asterisk/mohmp3 +;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s + +;[ulawstream] +;mode=custom +;application=/usr/bin/streamplayer 192.168.100.52 888 +;format=ulaw + +; mpg123 on Solaris does not always exit properly; madplay may be a better +; choice +;[solaris] +;mode=custom +;directory=/var/lib/asterisk/mohmp3 +;application=/site/sw/bin/madplay -Q -o raw:- --mono -R 8000 -a -12 diff --git a/asterisk/muted.conf b/asterisk/muted.conf new file mode 100644 index 0000000..15c7409 --- /dev/null +++ b/asterisk/muted.conf @@ -0,0 +1,39 @@ +# +# Sample muted configuration file +# +# Copyright (C) 2004 Digium, Inc. +# +# First you have the host, username, and password +# we use to connect to the asterisk system +# +# What is this? Well, haven't you ever wished you could automatically +# turn down the volume on your stereo, CDPlayer, etc, when a call comes in, +# and then return it to normal when the call ends? Well, this is a possible +# mechanism to make this happen! +# You have to fire up the new utils/muted, which runs as a daemon in the +# background. This daemon connects to asterisk via a manager interface, and +# also reads this config file from /etc/muted.conf. when the channels mentioned +# are activated, it tweaks the sound levels on the sound card(s). +# So, depending on the sound card, you may be able to run all your sound +# generating devices thru your sound card, and use this mechanism to quiet +# them down while you are on the phone. If anyone figures out how to make +# this work with kids, please inform!! +# +host localhost +user user +pass pass +# +# List each channel we're supposed to watch +# +channel DAHDI/1 +channel DAHDI/2 +channel SIP/mark +# +# Mute level is the percentage of the current volume we should +# lower the music to. +# +mutelevel 20 +# +# Smooth fade makes the fadein/fadeout nicer sounding +# +smoothfade diff --git a/asterisk/ooh323.conf b/asterisk/ooh323.conf new file mode 100644 index 0000000..d8ccdcf --- /dev/null +++ b/asterisk/ooh323.conf @@ -0,0 +1,204 @@ +; --------------------------------------------------------------------------------- +; --- ******* IMPORTANT NOTE *********** +; --- +; --- This module is currently unsupported. Use it at your own risk. +; --- +; --------------------------------------------------------------------------------- + +; Objective System's H323 Configuration example for Asterisk +; ooh323c driver configuration +; +; [general] section defines global parameters +; +; This is followed by profiles which can be of three types - user/peer/friend +; Name of the user profile should match with the h323id of the user device. +; For peer/friend profiles, host ip address must be provided as "dynamic" is +; not supported as of now. +; +; Syntax for specifying a H323 device in extensions.conf is +; For Registered peers/friends profiles: +; OOH323/name where name is the name of the peer/friend profile. +; +; For unregistered H.323 phones: +; OOH323/ip[:port] OR if gk is used OOH323/alias where alias can be any H323 +; alias +; +; For dialing into another asterisk peer at a specific exten +; OOH323/exten/peer OR OOH323/exten@ip +; +; Domain name resolution is not yet supported. +; +; When a H.323 user calls into asterisk, his H323ID is matched with the profile +; name and context is determined to route the call +; +; The channel driver will register all global aliases and aliases defined in +; peer profiles with the gatekeeper, if one exists. So, that when someone +; outside our pbx (non-user) calls an extension, gatekeeper will route that +; call to our asterisk box, from where it will be routed as per dial plan. + + +[general] +;Define the asetrisk server h323 endpoint + +;The port asterisk should listen for incoming H323 connections. +;Default - 1720 +;port=1720 + +;The dotted IP address asterisk should listen on for incoming H323 +;connections +;Default - tries to find out local ip address on it's own +bindaddr=0.0.0.0 + +;This parameter indicates whether channel driver should register with +;gatekeeper as a gateway or an endpoint. +;Default - no +;gateway=no + +;Whether asterisk should use fast-start and tunneling for H323 connections. +;Default - yes +;faststart=no +;h245tunneling=no + +;Whether media wait for connect +;Default - No +;mediawaitforconnect=yes + +;H323-ID to be used for asterisk server +;Default - Asterisk PBX +h323id=ObjSysAsterisk +e164=100 + +;CallerID to use for calls +;Default - Same as h323id +callerid=asterisk + +;Whether this asterisk server will use gatekeeper. +;Default - DISABLE +;gatekeeper = DISCOVER +;gatekeeper = a.b.c.d +gatekeeper = DISABLE + +;Location for H323 log file +;Default - /var/log/asterisk/h323_log +;logfile=/var/log/asterisk/h323_log + + +;Following values apply to all users/peers/friends defined below, unless +;overridden within their client definition + +;Sets default context all clients will be placed in. +;Default - default +context=default + +;Sets rtptimeout for all clients, unless overridden +;Default - 60 seconds +;rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity + ; when we're not on hold + +;Type of Service +;Default - none (lowdelay, thoughput, reliability, mincost, none) +;tos=lowdelay + +;amaflags = default + +;The account code used by default for all clients. +;accountcode=h3230101 + +;The codecs to be used for all clients.Only ulaw and gsm supported as of now. +;Default - ulaw +; ONLY ulaw, gsm, g729 and g7231 supported as of now +disallow=all ;Note order of disallow/allow is important. +allow=gsm +allow=ulaw + + +; dtmf mode to be used by default for all clients. Supports rfc2833, q931keypad +; h245alphanumeric, h245signal. +;Default - rfc 2833 +dtmfmode=rfc2833 +; +; round trip delay request, default = 0,0 (not send) +; x - count of unreplied requests before hangup, y - interval in sec between requests +; +;roundtrip=x,y + +; +; FAX detection will cause the OOH323 channel to jump to the 'fax' extension (if it exists) +; based one or more events being detected. The events that can be detected are an incoming +; CNG tone or an incoming T.38 RequestMode packet +; +; yes - enable both detection (CNG & T.38) +; no - disable both +; cng - enable CNG detection (default) +; t38 - enable T.38 request detection +; +faxdetect = cng + +; User/peer/friend definitions: +; User config options Peer config options +; ------------------ ------------------- +; context +; disallow disallow +; allow allow +; accountcode accountcode +; amaflags amaflags +; dtmfmode dtmfmode +; rtptimeout ip +; port +; h323id +; email +; url +; e164 +; rtptimeout + +; + +; +; direct rtp between two remote peers, disabled by default +; can be specified globally or per peer/user section +; +directmedia=no +; +; early direct rtp (try to establish direct rtp before asnwer) +; disabled by default, auto enabled by directmedia is enabled +; can be disabled escpecially if directmedia is enabled. +; can be specified globally or per peer/user section +; +; +directrtpsetup=no + +;Define users here +;Section header is extension +[myuser1] +type=user +context=context1 +disallow=all +allow=gsm +allow=ulaw + + + +[mypeer1] +type=peer +context=context2 +ip=a.b.c.d ; UPDATE with appropriate ip address +port=1720 ; UPDATE with appropriate port +e164=101 + + + +[myfriend1] +type=friend +context=default +ip=10.0.0.82 ; UPDATE with appropriate ip address +port=1820 ; UPDATE with appropriate port +disallow=all +allow=ulaw +e164=12345 +rtptimeout=60 +dtmfmode=rfc2833 + + + + + diff --git a/asterisk/osp.conf b/asterisk/osp.conf new file mode 100644 index 0000000..e72aa32 --- /dev/null +++ b/asterisk/osp.conf @@ -0,0 +1,117 @@ +; +; Open Settlement Protocol Sample Configuration File +; +; This file contains configuration of OSP server providers that are used by the +; Asterisk OSP module. The section "general" is reserved for global options. +; All other sections describe specific OSP Providers. The provider "default" +; is used when no provider is otherwise specified. +; +; The "servicepoint" and "source" parameters must be configured. For most +; implementations the other parameters in this file can be left unchanged. +; +[general] +; +; Enable cryptographic acceleration hardware. +; The default value is no. +; +;accelerate=no +; +; Enable security features. +; If security features are disabled, Asterisk cannot validate signed tokens and +; all certificate file name parameters are ignored. +; The default value is no. +; +;securityfeatures=no +; +; Defines the status of tokens that Asterisk will validate. +; 0 - signed tokens only +; 1 - unsigned tokens only +; 2 - both signed and unsigned +; The default value is 0, i.e. the Asterisk will only validate signed tokens. +; If securityfeatures are disabled, Asterisk cannot validate signed tokens. +; +;tokenformat=0 +; +;[default] +; +; List all service points (OSP servers) for this provider. +; Use either domain name or IP address. Most OSP servers use port 5045. +; +;servicepoint=http://osptestserver.transnexus.com:5045/osp +; +; Define the "source" device for requesting OSP authorization. +; This value is usually the domain name or IP address of the the Asterisk server. +; +;source=domain name or [IP address in brackets] +; +; Define path and file name of crypto files. +; The default path for crypto file is /var/lib/asterisk/keys. If no path is +; defined, crypto files will in /var/lib/asterisk/keys directory. +; +; Specify the private key file name. +; If this parameter is unspecified or not present, the default name will be the +; osp.conf section name followed by "-privatekey.pem" (for example: +; default-privatekey.pem) +; If securityfeatures are disabled, this parameter is ignored. +; +;privatekey=pkey.pem +; +; Specify the local certificate file. +; If this parameter is unspecified or not present, the default name will be the +; osp.conf section name followed by "- localcert.pem " (for example: +; default-localcert.pem) +; If securityfeatures are disabled, this parameter is ignored. +; +;localcert=localcert.pem +; +; Specify one or more Certificate Authority key file names. If none are listed, +; a single Certificate Authority key file name is added with the default name of +; the osp.conf section name followed by "-cacert_0.pem " (for example: +; default-cacert_0.pem) +; If securityfeatures are disabled, this parameter is ignored. +; +;cacert=cacert_0.pem +; +; Configure parameters for OSP communication between Asterisk OSP client and OSP +; servers. +; +; maxconnections: Max number of simultaneous connections to the provider OSP +; server (default=20) +; retrydelay: Extra delay between retries (default=0) +; retrylimit: Max number of retries before giving up (default=2) +; timeout: Timeout for response in milliseconds (default=500) +; +;maxconnections=20 +;retrydelay=0 +;retrylimit=2 +;timeout=500 +; +; Set the authentication policy. +; 0 - NO - Accept all calls. +; 1 - YES - Accept calls with valid token or no token. Block calls with +; invalid token. +; 2 - EXCLUSIVE - Accept calls with valid token. Block calls with invalid token +; or no token. +; Default is 1, +; If securityfeatures are disabled, Asterisk cannot validate signed tokens. +; +;authpolicy=1 +; +; Set the default destination protocol. The OSP module supports SIP, H323, and +; IAX protocols. The default protocol is set to SIP. +; +;defaultprotocol=SIP +; +; Set the work mode. +; 0 - Direct +; 1 - Indirect +; Default is 0, +; +;workmode=0 +; +; Set the service type. +; 0 - Normal voice service +; 1 - Ported number query service +; Default is 0, +; +;servicetype=0 diff --git a/asterisk/oss.conf b/asterisk/oss.conf new file mode 100644 index 0000000..c3781a2 --- /dev/null +++ b/asterisk/oss.conf @@ -0,0 +1,153 @@ +; +; Automatically generated from ../channels/chan_oss.c +; + +[general] + ; General config options, with default values shown. + ; You should use one section per device, with [general] being used + ; for the first device and also as a template for other devices. + ; + ; All but 'debug' can go also in the device-specific sections. + ; + ; debug = 0x0 ; misc debug flags, default is 0 + + ; Set the device to use for I/O + ; device = /dev/dsp + + ; Optional mixer command to run upon startup (e.g. to set + ; volume levels, mutes, etc. + ; mixer = + + ; Software mic volume booster (or attenuator), useful for sound + ; cards or microphones with poor sensitivity. The volume level + ; is in dB, ranging from -20.0 to +20.0 + ; boost = n ; mic volume boost in dB + + ; Set the callerid for outgoing calls + ; callerid = John Doe <555-1234> + + ; autoanswer = no ; no autoanswer on call + ; autohangup = yes ; hangup when other party closes + ; extension = s ; default extension to call + ; context = default ; default context for outgoing calls + ; language = "" ; default language + + ; If you set overridecontext to 'yes', then the whole dial string + ; will be interpreted as an extension, which is extremely useful + ; to dial SIP, IAX and other extensions which use the '@' character. + ; The default is 'no' just for backward compatibility, but the + ; suggestion is to change it. + ; overridecontext = no ; if 'no', the last @ will start the context + ; if 'yes' the whole string is an extension. + + ; low level device parameters in case you have problems with the + ; device driver on your operating system. You should not touch these + ; unless you know what you are doing. + ; queuesize = 10 ; frames in device driver + ; frags = 8 ; argument to SETFRAGMENT + + ;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- + ; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; OSS 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 OSS channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive OSS side will always + ; be used if the sending side can create jitter. + + ; 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 an OSS + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) 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". + ;----------------------------------------------------------------------------------- + +; below is an entry for a second console channel +; [card1] + ; device = /dev/dsp1 ; alternate device + +; Below are the settings to support video. You can include them +; in your general configuration as [general](+,video) +; The parameters are all available through the CLI as "console name value" +; Section names used here are only examples. + +[my_video](!) ; you can just include in your config + videodevice = /dev/video0 ; uses your V4L webcam as video source + videodevice = X11 ; X11 grabber. Dragging on the local display moves the origin. + videocodec = h263 ; also h261, h263p, h264, mpeg4, ... + + ; video_size is the geometry used by the encoder. + ; Depending on the codec your choice is restricted. + video_size = 352x288 ; the format WIDTHxHEIGHT is also ok + video_size = cif ; sqcif, qcif, cif, qvga, vga, ... + + ; You can also set the geometry used for the camera, local display and remote display. + ; The local window is on the right, the remote window is on the left. + ; Right clicking with the mouse on a video window increases the size, + ; center-clicking reduces the size. + camera_size = cif + remote_size = cif + local_size = qcif + + bitrate = 60000 ; rate told to ffmpeg. + fps = 5 ; frames per second from the source. + ; qmin = 3 ; quantizer value passed to the encoder. + +; The keypad is made of an image (in any format supported by SDL_image) +; and some configuration entries indicating the location and function of buttons. +; These entries can also be contained in the comment field of the image, +; which is a lot more convenient to manage. +; E.g. for jpeg you can write them with wrjpgcom (part of libjpeg). +; The format to define keys is +; region = x0 y0 x1 y1 h +; where is the event to be generated (a digit, pickup, hangup,...) +; is the shape of the region (currently 'rect' and 'circle' are +; supported, the latter is really an ellipse), x0 y0 x1 y1 are the +; coordinates of the base of the rectangle or main diameter of the ellipse, +; (they can be rotated) while h is the height of the rectangle or the other +; diameter of the ellipse. +; +[my_skin](!) + keypad = /tmp/keypad.jpg + region = 1 rect 19 18 67 18 28 + region = 2 rect 84 18 133 18 28 + region = 3 rect 152 18 201 18 28 + region = 4 rect 19 60 67 60 28 + region = 5 rect 84 60 133 60 28 + region = 6 rect 152 60 201 60 28 + region = 7 rect 19 103 67 103 28 + region = 8 rect 84 103 133 103 28 + region = 9 rect 152 103 201 103 28 + region = * rect 19 146 67 146 28 + region = 0 rect 84 146 133 146 28 + region = # rect 152 146 201 146 28 + region = pickup rect 229 15 267 15 40 + region = hangup rect 230 66 270 64 40 + region = mute circle 232 141 264 141 33 + region = sendvideo circle 235 185 266 185 33 + region = autoanswer rect 228 212 275 212 50 + +; another skin with entries for the keypad and a small font +; to write to the message boards in the skin. +[skin2](!) + keypad = /tmp/kpad2.jpg + keypad_font = /tmp/font.png + +; to add video support, uncomment this and remember to install +; the keypad and keypad_font files to the right place +; [general](+,my_video,skin2) + diff --git a/asterisk/phone.conf b/asterisk/phone.conf new file mode 100644 index 0000000..3d4a7c2 --- /dev/null +++ b/asterisk/phone.conf @@ -0,0 +1,51 @@ +; +; Linux Telephony Interface +; +; Configuration file +; +[interfaces] +; +; Select a mode, either the phone jack provides dialtone, reads digits, +; then starts PBX with the given extension (dialtone mode), or +; immediately provides the PBX without reading any digits or providing +; any dialtone (this is the immediate mode, the default). Also, you +; can set the mode to "fxo" if you have a linejack to make it operate +; properly. If you are using a Sigma Designs board you may set this to +; "sig". +; +mode=immediate +;mode=dialtone +;mode=fxo +;mode=sig +; +; You can decide which format to use by default, "g723.1", "g729", or "slinear". +; Note that g729 is only supported for Sigma Designs boards. +; XXX Be careful, sometimes the card causes kernel panics when running +; in signed linear mode for some reason... XXX +; +format=slinear +;format=g723.1 +;format=g729 +; +; And set the echo cancellation to "off", "low", "medium", and "high". +; This is not supported on all phones. +; +echocancel=medium +; +; You can optionally use VAD/CNG silence suppression +; +;silencesupression=yes +; +; List all devices we can use. Contexts may also be specified +; +;context=local +; +; You can set txgain and rxgain for each device in the same way as context. +; If you want to change default gain value (1.0 =~ 100%) for device, simple +; add txgain or rxgain line before device line. But remember, if you change +; volume all cards listed below will be affected by these values. You can +; use float values (1.0, 0.5, 2.0) or percentage values (100%, 150%, 50%). +; +;txgain=100% +;rxgain=1.0 +;device => /dev/phone0 diff --git a/asterisk/phoneprov.conf b/asterisk/phoneprov.conf new file mode 100644 index 0000000..17d8b1f --- /dev/null +++ b/asterisk/phoneprov.conf @@ -0,0 +1,137 @@ +[general] +; The default behavior of res_phoneprov will be to set the SERVER template variable to +; the IP address that the phone uses to contact the provisioning server and the +; SERVER_PORT variable to the bindport setting in sip.conf. Unless you have a very +; unusual setup, you should not need to set serveraddr, serveriface, or serverport. + +;serveraddr=192.168.1.1 ; Override address to send to the phone to use as server address. +;serveriface=eth0 ; Same as above, except an ethernet interface. + ; Useful for when the interface uses DHCP and the asterisk http + ; server listens on a different IP than chan_sip. +;serverport=5060 ; Override port to send to the phone to use as server port. +default_profile=polycom ; The default profile to use if none specified in users.conf + +; You can define profiles for different phones specifying what files to register +; with the provisioning server. You can define either static files, or dynamically +; generated files that can have dynamic names and point to templates that variables +; can be substituted into. You can also set arbitrary variables for the profiles +; templates to have access to. Example: + +;[example] +;mime_type => application/octet-stream +;static_file => example/firmware +;static_file => example/default.cfg,text/xml +;${TOUPPER(${MAC})}.cfg => templates/example-mac.cfg +;setvar => DB_CIDNAME=${ODBC_CID_NAME_LOOKUP(${USERNAME})} + +; Dynamically generated files have a filename registered with variable substitution +; with variables obtained while reading users.conf. + +; Built in variables and the options in users.conf that they come from +; MAC (macaddress) +; USERNAME (username) +; DISPLAY_NAME (fullname) +; SECRET (secret) +; LABEL (label) +; CALLERID (cid_number) +; VOCIEMAIL_EXTEN (vmexten) +; EXTENSION_LENGTH (localextenlength) +; LINE +; LINEKEYS + +; Built-in variables and the options in phoneprov.conf that they come from +; SERVER (server) +; SERVER_PORT (serverport) + + +; Built-in variables for managing timezones and daylight savings time. +; TZOFFSET +; DST_ENABLE +; DST_START_MONTH +; DST_START_MDAY +; DST_START_HOUR +; DST_END_MONTH +; DST_END_MDAY +; DST_END_HOUR +; TIMEZONE + +[polycom] +staticdir => configs/ ; Sub directory of AST_DATA_DIR/phoneprov that static files reside + ; in. This allows a request to /phoneprov/sip.cfg to pull the file + ; from /phoneprov/configs/sip.cfg +mime_type => text/xml ; Default mime type to use if one isn't specified or the + ; extension isn't recognized +static_file => bootrom.ld,application/octet-stream ; Static files the phone will download +static_file => bootrom.ver,plain/text ; static_file => filename,mime-type +static_file => sip.ld,application/octet-stream +static_file => sip.ver,plain/text +static_file => sip.cfg +static_file => custom.cfg +static_file => 2201-06642-001.bootrom.ld,application/octet-stream +static_file => 2201-06642-001.sip.ld,application/octet-stream +static_file => 2345-11000-001.bootrom.ld,application/octet-stream +static_file => 2345-11300-001.bootrom.ld,application/octet-stream +static_file => 2345-11300-010.bootrom.ld,application/octet-stream +static_file => 2345-11300-010.sip.ld,application/octet-stream +static_file => 2345-11402-001.bootrom.ld,application/octet-stream +static_file => 2345-11402-001.sip.ld,application/octet-stream +static_file => 2345-11500-001.bootrom.ld,application/octet-stream +static_file => 2345-11500-010.bootrom.ld,application/octet-stream +static_file => 2345-11500-020.bootrom.ld,application/octet-stream +static_file => 2345-11500-030.bootrom.ld,application/octet-stream +static_file => 2345-11500-030.sip.ld,application/octet-stream +static_file => 2345-11500-040.bootrom.ld,application/octet-stream +static_file => 2345-11500-040.sip.ld,application/octet-stream +static_file => 2345-11600-001.bootrom.ld,application/octet-stream +static_file => 2345-11600-001.sip.ld,application/octet-stream +static_file => 2345-11605-001.bootrom.ld,application/octet-stream +static_file => 2345-11605-001.sip.ld,application/octet-stream +static_file => 2345-12200-001.bootrom.ld,application/octet-stream +static_file => 2345-12200-001.sip.ld,application/octet-stream +static_file => 2345-12200-002.bootrom.ld,application/octet-stream +static_file => 2345-12200-002.sip.ld,application/octet-stream +static_file => 2345-12200-004.bootrom.ld,application/octet-stream +static_file => 2345-12200-004.sip.ld,application/octet-stream +static_file => 2345-12200-005.bootrom.ld,application/octet-stream +static_file => 2345-12200-005.sip.ld,application/octet-stream +static_file => 2345-12365-001.bootrom.ld,application/octet-stream +static_file => 2345-12365-001.sip.ld,application/octet-stream +static_file => 2345-12500-001.bootrom.ld,application/octet-stream +static_file => 2345-12500-001.sip.ld,application/octet-stream +static_file => 2345-12560-001.bootrom.ld,application/octet-stream +static_file => 2345-12560-001.sip.ld,application/octet-stream +static_file => 2345-12600-001.bootrom.ld,application/octet-stream +static_file => 2345-12600-001.sip.ld,application/octet-stream +static_file => 2345-12670-001.bootrom.ld,application/octet-stream +static_file => 2345-12670-001.sip.ld,application/octet-stream +static_file => 3111-15600-001.bootrom.ld,application/octet-stream +static_file => 3111-15600-001.sip.ld,application/octet-stream +static_file => 3111-40000-001.bootrom.ld,application/octet-stream +static_file => 3111-40000-001.sip.ld,application/octet-stream +static_file => SoundPointIPWelcome.wav,application/octet-stream +static_file => SoundPointIPLocalization/Japanese_Japan/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Norwegian_Norway/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Spanish_Spain/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Portuguese_Portugal/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/English_United_Kingdom/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/English_United_States/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Russian_Russia/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Italian_Italy/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Chinese_China/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Swedish_Sweden/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/English_Canada/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/German_Germany/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/French_France/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Danish_Denmark/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Dutch_Netherlands/SoundPointIP-dictionary.xml +static_file => SoundPointIPLocalization/Korean_Korea/SoundPointIP-dictionary.xml + +${MAC}.cfg => 000000000000.cfg ; Dynamically generated files. +${MAC}-phone.cfg => 000000000000-phone.cfg ; (relative to AST_DATA_DIR/phoneprov) +config/${MAC} => polycom.xml ; Dynamic Filename => template file +${MAC}-directory.xml => 000000000000-directory.xml +setvar => CUSTOM_CONFIG=/var/lib/asterisk/phoneprov/configs/custom.cfg ; Custom variable + +;snom 300, 320, 360, 370, 820, 821, 870 support +snom-${MAC}.xml => snom-mac.xml + diff --git a/asterisk/queuerules.conf b/asterisk/queuerules.conf new file mode 100644 index 0000000..fb2a1ba --- /dev/null +++ b/asterisk/queuerules.conf @@ -0,0 +1,20 @@ +; It is possible to change the value of the QUEUE_MAX_PENALTY and QUEUE_MIN_PENALTY +; channel variables in mid-call by defining rules in the queue for when to do so. This can allow for +; a call to be opened to more members or potentially a different set of members. +; The advantage to changing members this way as opposed to inserting the caller into a +; different queue with more members or reinserting the caller into the same queue with a different +; QUEUE_MAX_PENALTY or QUEUE_MIN_PENALTY set is that the caller does not lose his place in the queue. +; +; Note: There is a limitation to these rules; a caller will follow the penaltychange rules for +; the queue that were defined at the time the caller entered the queue. If an update to the rules is +; made during the caller's stay in the queue, these will not be reflected for that caller. +; +; The syntax for these rules is +; penaltychange => ,[,absolute or relative change to QUEUE_MIN_PENALTY] +; +; Example: +; [myrule] +; penaltychange => 30,+3 ; 30 seconds into the call increase the QUEUE_MAX_PENALTY by 3, no change to QUEUE_MIN_PENALTY +; penaltychange => 60,10,5 ; 60 seconds into the call increase the QUEUE_MAX_PENALTY to 10 and increase the QUEUE_MIN_PENALTY to 5 +; penaltychange => 75,,7 ; 75 seconds into the call keep the QUEUE_MAX_PENALTY the same and increase the QUEUE_MIN_PENALTY to 7 + diff --git a/asterisk/queues.conf b/asterisk/queues.conf new file mode 100644 index 0000000..aa1b668 --- /dev/null +++ b/asterisk/queues.conf @@ -0,0 +1,580 @@ +[general] +; +; Global settings for call queues +; +; Persistent Members +; Store each dynamic member in each queue in the astdb so that +; when asterisk is restarted, each member will be automatically +; read into their recorded queues. Default is 'no'. +; +persistentmembers = yes +; +; AutoFill Behavior +; The old behavior of the queue (autofill=no) is to have a serial type behavior +; in that the queue will make all waiting callers wait in the queue +; even if there is more than one available member ready to take +; calls until the head caller is connected with the member they +; were trying to get to. The next waiting caller in line then +; becomes the head caller, and they are then connected with the +; next available member and all available members and waiting callers +; waits while this happens. The new behavior, enabled by setting +; autofill=yes makes sure that when the waiting callers are connecting +; with available members in a parallel fashion until there are +; no more available members or no more waiting callers. This is +; probably more along the lines of how a queue should work and +; in most cases, you will want to enable this behavior. If you +; do not specify or comment out this option, it will default to yes. +; +;autofill = no +; +; Monitor Type +; By setting monitor-type = MixMonitor, when specifying monitor-format +; to enable recording of queue member conversations, app_queue will +; now use the new MixMonitor application instead of Monitor so +; the concept of "joining/mixing" the in/out files now goes away +; when this is enabled. You can set the default type for all queues +; here, and then also change monitor-type for individual queues within +; queue by using the same configuration parameter within a queue +; configuration block. If you do not specify or comment out this option, +; it will default to the old 'Monitor' behavior to keep backward +; compatibility. +; +monitor-type = MixMonitor +; +; UpdateCDR behavior. +; This option is implemented to mimic chan_agents behavior of populating +; CDR dstchannel field of a call with an agent name, which you can set +; at the login time with AddQueueMember membername parameter. +; +; updatecdr = no + +; +; Note that a timeout to fail out of a queue may be passed as part of +; an application call from extensions.conf: +; Queue(queuename,[options],[optionalurl],[announceoverride],[timeout]) +; example: Queue(dave,t,,,45) + +; shared_lastcall will make the lastcall and calls received be the same in +; members logged in more than one queue. This is useful to make the queue +; respect the wrapuptime of another queue for a shared member. +; The default value is no. +; +;shared_lastcall=no +; +; Negative_penalty_invalid will treat members with a negative penalty as logged off +; +;negative_penalty_invalid = no +; +; log_membername_as_agent will cause app_queue to log the membername rather than +; the interface for the ADDMEMBER and REMOVEMEMBER events when a state_interface +; is set. The default value (no) maintains backward compatibility. +; +;log_membername_as_agent = no +; +;[markq] +; +; A sample call queue +; +; Musicclass sets which music applies for this particular call queue. +; The only class which can override this one is if the MOH class is set +; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the +; dialplan. +; +;musicclass = default +; +; An announcement may be specified which is played for the member as +; soon as they answer a call, typically to indicate to them which queue +; this call should be answered as, so that agents or members who are +; listening to more than one queue can differentiated how they should +; engage the customer +; +;announce = queue-markq +; +; A strategy may be specified. Valid strategies include: +; +; ringall - ring all available channels until one answers (default) +; leastrecent - ring interface which was least recently hung up by this queue +; fewestcalls - ring the one with fewest completed calls from this queue +; random - ring random interface +; rrmemory - round robin with memory, remember where we left off last ring pass +; rrordered - same as rrmemory, except the queue member order from config file +; is preserved +; linear - rings interfaces in the order specified in this configuration file. +; If you use dynamic members, the members will be rung in the order in +; which they were added +; wrandom - rings random interface, but uses the member's penalty as a weight +; when calculating their metric. So a member with penalty 0 will have +; a metric somewhere between 0 and 1000, and a member with penalty 1 will +; have a metric between 0 and 2000, and a member with penalty 2 will have +; a metric between 0 and 3000. Please note, if using this strategy, the member +; penalty is not the same as when using other queue strategies. It is ONLY used +; as a weight for calculating metric. +; +;strategy = ringall +; +; Second settings for service level (default 0) +; Used for service level statistics (calls answered within service level time +; frame) +;servicelevel = 60 +; +; A context may be specified, in which if the user types a SINGLE +; digit extension while they are in the queue, they will be taken out +; of the queue and sent to that extension in this context. +; +;context = qoutcon +; +; A limit can be set to disregard penalty settings when the queue has +; too few members. No penalty will be weighed in if there are only X +; or fewer queue members. (default 0) +; +;penaltymemberslimit = 5 +; +;----------------------QUEUE TIMING OPTIONS------------------------------------ +; A Queue has two different "timeout" values associated with it. One is the +; timeout parameter configured in queues.conf. This timeout specifies the +; amount of time to try ringing a member's phone before considering the +; member to be unavailable. The other timeout value is the second argument +; to the Queue() application. This timeout represents the absolute amount +; of time to allow a caller to stay in the queue before the caller is +; removed from the queue. In certain situations, these two timeout values +; may clash. For instance, if the timeout in queues.conf is set to 5 seconds, +; the retry value in queues.conf is set to 4, and the second argument to Queue() +; is 10, then the following may occur: +; +; A caller places a call to a queue. +; The queue selects a member and attempts to ring that member. +; The member's phone is rung for 5 seconds and he does not answer. +; The retry time of 4 seconds occurs. +; The queue selects a second member to call. +; +; How long does that second member's phone ring? Does it ring for 5 seconds +; since the timeout set in app_queue is 5 seconds? Does it ring for 1 second since +; the caller has been in the queue for 9 seconds and is supposed to be removed after +; being in the queue for 10 seconds? This is configurable with the timeoutpriority +; option. By setting the timeoutpriority to "conf" then you are saying that you would +; rather use the time specified in the configuration file even if it means having the +; caller stay in the queue longer than the time specified in the application argument. +; For the scenario described above, timeoutpriority=conf would result in the second +; member's phone ringing for 5 seconds. By specifying "app" as the value for +; timeoutpriority, you are saying that the timeout specified as the argument to the +; Queue application is more important. In the scenario above, timeoutpriority=app +; would result in the second member's phone ringing for 1 second. +; +; There are a few exceptions to the priority rules. For instance, if timeoutpriority=appp +; and the configuration file timeout is set to 0, but the application argument timeout is +; non-zero, then the timeoutpriority is ignored and the application argument is used as +; the timeout. Furthermore, if no application argument timeout is specified, then the +; timeoutpriority option is ignored and the configuration file timeout is always used +; when calling queue members. +; +; In timeoutpriority=conf mode however timeout specified in config file will take higher +; priority than timeout in application arguments, so if config file has timeout 0, each +; queue member will be called indefineately and application timeout will be checked only +; after this call attempt. This is useful for having queue members with custom timeouts +; specified within Dial application of Local channel, and allows handling NO ANSWER which +; would otherwise be interrupted by queue destroying child channel on timeout. +; +; The default value for timeoutpriority is "app" since this was how previous versions of +; Asterisk behaved. +; +;timeout = 15 +;retry = 5 +;timeoutpriority = app|conf +; +;-----------------------END QUEUE TIMING OPTIONS--------------------------------- +; Weight of queue - when compared to other queues, higher weights get +; first shot at available channels when the same channel is included in +; more than one queue. +; +;weight=0 +; +; After a successful call, how long to wait before sending a potentially +; free member another call (default is 0, or no delay) +; +;wrapuptime=15 +; +; Autofill will follow queue strategy but push multiple calls through +; at same time until there are no more waiting callers or no more +; available members. The per-queue setting of autofill allows you +; to override the default setting on an individual queue level. +; +;autofill=yes +; +; Autopause will pause a queue member if they fail to answer a call +; no: Member will not be paused +; yes: Member will be paused only in the queue where the timeout took place +; all: Memeber will be paused in all queues he/she is a member +;autopause=yes +; +; Autopausedelay delay autopause for autopausedelay seconds from the +; last call if a member has not taken a call the delay has no effect. +;autopausedelay=60 +; +; Autopausebusy controls whether or not a queue member is set as paused +; automatically upon the member device reporting busy. The autopausedelay +; option applies. Defaults to 'no'. +;autopausebusy=no +; +; Autopauseunavail controls whether or not a queue member is set as paused +; automatically upon the member device reporting congestion. The autopausedely +; option applies. Defaults to 'no'. +;autopauseunavail=no +; +; Maximum number of people waiting in the queue (0 for unlimited) +; +;maxlen = 0 +; +; Note: for below queue channel options (setinterfacevar, setqueueentryvar, +; setqueuevar) if the caller channel is a local channel and optimizations +; is enabled then after optimization has occurred only the queue member +; channel will contain the variables. +; +; If set to yes, just prior to the caller being bridged with a queue member +; the following variables will be set on the caller and queue member channels: +; MEMBERINTERFACE is the interface name (eg. Agent/1234) +; MEMBERNAME is the member name (eg. Joe Soap) +; MEMBERCALLS is the number of calls that interface has taken, +; MEMBERLASTCALL is the last time the member took a call. +; MEMBERPENALTY is the penalty of the member +; MEMBERDYNAMIC indicates if a member is dynamic or not +; MEMBERREALTIME indicates if a member is realtime or not +; +;setinterfacevar=no +; +; If set to yes, just prior to the caller being bridged with a queue member +; the following variables will be set on the caller and queue member channels: +; QEHOLDTIME callers hold time +; QEORIGINALPOS original position of the caller in the queue +; +;setqueueentryvar=no +; +; If set to yes, the following variables will be set +; just prior to the caller being bridged with a queue member (set on the +; caller and queue member channels) and just prior to the caller +; leaving the queue +; QUEUENAME name of the queue +; QUEUEMAX maxmimum number of calls allowed +; QUEUESTRATEGY the strategy of the queue; +; QUEUECALLS number of calls currently in the queue +; QUEUEHOLDTIME current average hold time +; QUEUECOMPLETED number of completed calls for the queue +; QUEUEABANDONED number of abandoned calls +; QUEUESRVLEVEL queue service level +; QUEUESRVLEVELPERF current service level performance +; +;setqueuevar=no + +; if set, run this macro when connected to the queue member +; you can override this macro by setting the macro option on +; the queue application +; +;membermacro=macro_name[,arg1[,...][,argN]] + +; if set, run this gosub when connected to the queue member +; you can override this gosub by setting the gosub option on +; the queue application +; +;membergosub=gosub_context_name[,arg1[,...][,argN]] + +; How often to announce queue position and/or estimated +; holdtime to caller (0=off) +; Note that this value is ignored if the caller's queue +; position has changed (see min-announce-frequency) +; +;announce-frequency = 90 +; +; The absolute minimum time between the start of each +; queue position and/or estimated holdtime announcement +; This is useful for avoiding constant announcements +; when the caller's queue position is changing frequently +; (see announce-frequency) +; +;min-announce-frequency = 15 +; +; How often to make any periodic announcement (see periodic-announce) +; +;periodic-announce-frequency=60 +; +; Should the periodic announcements be played in a random order? Default is no. +; +;random-periodic-announce=no +; +; If set to yes, the periodic announcment frequency will be timed from the end +; of each announcment rather than from the start of each announcment. This +; defaults to off. +; +;relative-periodic-announce=yes +; +; Should we include estimated hold time in position announcements? +; Either yes, no, or only once. +; Hold time will be announced as the estimated time. +; +;announce-holdtime = yes|no|once +; +; Queue position announce? +; Valid values are "yes," "no," "limit," or "more." If set to "no," then the caller's position will +; never be announced. If "yes," then the caller's position in the queue will be announced +; to the caller. If set to "more," then if the number of callers is more than the number +; specified by the announce-position-limit option, then the caller will hear that there +; are more than that many callers waiting (i.e. if a caller number 6 is in a queue with the +; announce-position-limit set to 5, then that caller will hear that there are more than 5 +; callers waiting). If set to "limit," then only callers within the limit specified by announce-position-limit +; will have their position announced. +; +;announce-position = yes +; +; If enabled, play announcements to the first user waiting in the Queue. This may mean +; that announcements are played when an agent attempts to connect to the waiting user, +; which may delay the time before the agent and the user can communicate. Disabled by +; default. +; +; announce-to-first-user = no +; +; If you have specified "limit" or "more" for the announce-position option, then the following +; value is what is used to determine what announcement to play to waiting callers. If you have +; set the announce-position option to anything else, then this will have no bearing on queue operation +; +;announce-position-limit = 5 +; +; What's the rounding time for the seconds? +; If this is non-zero, then we announce the seconds as well as the minutes +; rounded to this value. +; Valid values are 0, 5, 10, 15, 20, and 30. +; +; announce-round-seconds = 10 +; +; Use these sound files in making position/holdtime announcements. The +; defaults are as listed below -- change only if you need to. +; +; Keep in mind that you may also prevent a sound from being played if you +; explicitly set a sound to be an empty string. For example, if you want to +; prevent the queue from playing queue-thankyou, you may set the sound using +; the following line: +; +; queue-thankyou= +; + ; ("You are now first in line.") +;queue-youarenext = queue-youarenext + ; ("There are") +;queue-thereare = queue-thereare + ; ("calls waiting.") +;queue-callswaiting = queue-callswaiting + ; ("The current est. holdtime is") +;queue-holdtime = queue-holdtime + ; ("minute.") +;queue-minute = queue-minute + ; ("minutes.") +;queue-minutes = queue-minutes + ; ("seconds.") +;queue-seconds = queue-seconds + ; ("Thank you for your patience.") +;queue-thankyou = queue-thankyou + ; ("Hold time") +;queue-reporthold = queue-reporthold + ; ("All reps busy / wait for next") +;periodic-announce = queue-periodic-announce +; +; A set of periodic announcements can be defined by separating +; periodic announcements to reproduce by commas. For example: +;periodic-announce = queue-periodic-announce,your-call-is-important,please-wait +; +; The announcements will be played in the order in which they are defined. After +; playing the last announcement, the announcements begin again from the beginning. +; +; Calls may be recorded using Asterisk's monitor/MixMonitor resource +; This can be enabled from within the Queue application, starting recording +; when the call is actually picked up; thus, only successful calls are +; recorded, and you are not recording while people are listening to MOH. +; To enable monitoring, simply specify "monitor-format"; it will be disabled +; otherwise. +; +; You can specify the monitor filename with by calling +; Set(MONITOR_FILENAME=foo) +; Otherwise it will use MONITOR_FILENAME=${UNIQUEID} +; +; Pick any one valid extension for monitor format recording. If you leave +; monitor-format commented out, it will not record calls. +; +; monitor-format = gsm|wav|wav49 +; +; Monitor Type +; By setting monitor-type = MixMonitor, when specifying monitor-format +; to enable recording of queue member conversations, app_queue will +; now use the new MixMonitor application instead of Monitor so +; the concept of "joining/mixing" the in/out files now goes away +; when this is enabled. If you do not specify or comment out this option, +; it will default to the old 'Monitor' behavior to keep backward +; compatibility. +; +; monitor-type = MixMonitor +; +; ----------------------- TYPE MIXMONITOR OPTIONS ----------------------------- +; +; +; You can specify the options supplied to MixMonitor by calling (from the dialplan) +; Set(MONITOR_OPTIONS=av()V()W()) +; The 'b' option for MixMonitor (only save audio to the file while bridged) is +; implied. +; +; You can specify a post recording command to be executed after the end of +; recording by calling (from the dialplan) +; +; Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME} /tmp/^{MONITOR_FILENAME}) +; +; or +; +; Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/^{MIXMONITOR_FILENAME} /tmp/^{MIXMONITOR_FILENAME}) +; +; If you choose to use the latter, you will not be able to switch the monitor-type back to Monitor +; without changing this in the dialplan. +; +; +; The command specified within the contents of MONITOR_EXEC will be executed when +; the recording is over. Any strings matching ^{X} will be unescaped to ${X} and +; all variables will be evaluated just prior to recording being started. +; +; The contents of MONITOR_FILENAME will also be unescaped from ^{X} to ${X} and +; all variables will be evaluated just prior to recording being started. +; +; ---------------------- Queue Empty Options ---------------------------------- +; +; Asterisk has provided the "joinempty" and "leavewhenempty" options for a while +; with tenuous definitions of what they actually mean. The "joinempty" option controls +; whether a caller may join a queue depending on several factors of member availability. +; Similarly, then leavewhenempty option controls whether a caller may remain in a queue +; he has already joined. Both options take a comma-separated list of factors which +; contribute towards whether a caller may join/remain in the queue. The list of +; factors which contribute to these option is as follows: +; +; paused: a member is not considered available if he is paused +; penalty: a member is not considered available if his penalty is less than QUEUE_MAX_PENALTY +; inuse: a member is not considered available if he is currently on a call +; ringing: a member is not considered available if his phone is currently ringing +; unavailable: This applies mainly to Agent channels. If the agent is a member of the queue +; but has not logged in, then do not consider the member to be available +; invalid: Do not consider a member to be available if he has an "invalid" device state. +; This generally is caused by an error condition in the member's channel driver. +; unknown: Do not consider a member to be available if we are unable to determine the member's +; current device state. +; wrapup: A member is not considered available if he is currently in his wrapuptime after +; taking a call. +; +; For the "joinempty" option, when a caller attempts to enter a queue, the members of that +; queue are examined. If all members are deemed to be unavailable due to any of the conditions +; listed for the "joinempty" option, then the caller will be unable to enter the queue. For the +; "leavewhenempty" option, the state of the members of the queue are checked periodically during +; the caller's stay in the queue. If all of the members are unavailable due to any of the above +; conditions, then the caller will be removed from the queue. +; +; Some examples: +; +;joinempty = paused,inuse,invalid +; +; A caller will not be able to enter a queue if at least one member cannot be found +; who is not paused, on the phone, or who has an invalid device state. +; +;leavewhenempty = inuse,ringing +; +; A caller will be removed from the queue if at least one member cannot be found +; who is not on the phone, or whose phone is not ringing. +; +; For the sake of backwards-compatibility, the joinempty and leavewhenempty +; options also accept the strings "yes" "no" "strict" and "loose". The following +; serves as a translation for these values: +; +; yes - (empty) for joinempty; penalty,paused,invalid for leavewhenempty +; no - penalty,paused,invalid for joinempty; (empty) for leavewhenempty +; strict - penalty,paused,invalid,unavailable +; loose - penalty,invalid +; + +; If this is set to yes, the following manager events will be generated: +; AgentCalled, AgentDump, AgentConnect, AgentComplete; setting this to +; vars also sends all channel variables with the event. +; (may generate some extra manager events, but probably ones you want) +; +; eventwhencalled = yes|no|vars +; +; If this is set to yes, the following manager events will be generated: +; QueueMemberStatus +; (may generate a WHOLE LOT of extra manager events) +; The default value is yes and this can not be set globally. +; +; eventmemberstatus = no +; +; If you wish to report the caller's hold time to the member before they are +; connected to the caller, set this to yes. +; +; reportholdtime = no +; +; If you want the queue to avoid sending calls to members whose devices are +; known to be 'in use' (via the channel driver supporting that device state) +; uncomment this option. This can be controlled on a per member basis by +; setting 'ringinuse' on that member. This can be done in the member definition, +; in the 'ringinuse' field on a realtime member, via the QUEUE_MEMBER dialplan +; function, or with CLI/AMI. By default, the per member value will be the same +; as the queue's ringinuse value if it isn't set on the member deliberately. +; (Note: only the SIP channel driver currently is able to report 'in use'.) +; ringinuse = no +; +; If you wish to have a delay before the member is connected to the caller (or +; before the member hears any announcement messages), set this to the number of +; seconds to delay. +; +; memberdelay = 0 +; +; If timeoutrestart is set to yes, then the timeout for an agent to answer is +; reset if a BUSY or CONGESTION is received. This can be useful if agents +; are able to cancel a call with reject or similar. +; +; timeoutrestart = no +; +; If you wish to implement a rule defined in queuerules.conf (see +; configs/queuerules.conf.sample from the asterisk source directory for +; more information about penalty rules) by default, you may specify this +; by setting defaultrule to the rule's name +; +; defaultrule = myrule +; +; Each member of this call queue is listed on a separate line in +; the form technology/dialstring. "member" means a normal member of a +; queue. An optional penalty may be specified after a comma, such that +; entries with higher penalties are considered last. An optional member +; name may also be specified after a second comma, which is used in log +; messages as a "friendly name". Multiple interfaces may share a single +; member name. An optional state interface may be specified after a third +; comma. This interface will be the one for which app_queue receives device +; state notifications, even though the first interface specified is the one +; that is actually called. +; +; A hint can also be used in place of the state interface using the format +; hint:@. If no context is specified then 'default' will +; be used. +; +; It is important to ensure that channel drivers used for members are loaded +; before app_queue.so itself or they may be marked invalid until reload. This +; can be accomplished by explicitly listing them in modules.conf before +; app_queue.so. Additionally, if you use Local channels as queue members, you +; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so, +; or pbx_realtime.so, depending on how your dialplan is configured). +; +; syntax: member => interface,[,penalty][,membername][,state_interface][,ringinuse] +; +;member => DAHDI/1 +;member => DAHDI/2,10 +;member => DAHDI/3,10,Bob Johnson +;member => Agent/1001 +;member => Agent/1002 +;member => Local/1000@default,0,John Smith,SIP/1000 +;member => Local/2000@default,0,Lorem Ipsum,SIP/2000,no + +; +; Note that using agent groups is probably not what you want. Strategies do +; not propagate down to the Agent system so if you want round robin, least +; recent, etc, you should list all the agents in this file individually and not +; use agent groups. +; +;member => Agent/@1 ; Any agent in group 1 +;member => Agent/:1,1 ; Any agent in group 1, wait for first + ; available, but consider with penalty + diff --git a/asterisk/res_config_mysql.conf b/asterisk/res_config_mysql.conf new file mode 100644 index 0000000..ab8ebf0 --- /dev/null +++ b/asterisk/res_config_mysql.conf @@ -0,0 +1,43 @@ +; +; Sample configuration for res_config_mysql.c +; +; The value of dbhost may be either a hostname or an IP address. +; If dbhost is commented out or the string "localhost", a connection +; to the local host is assumed and dbsock is used instead of TCP/IP +; to connect to the server. If no dbcharset is specified, the connection +; is made with no extra charset configurations sent to MySQL, leaving all +; configured MySQL charset options and defaults untouched. +; +; Multiple database contexts may be configured, with the caveat that +; all context names should be unique and must not contain the slash ('/') +; character. If you wish to separate reads from writes in your database +; configuration, you specify the database (NOT HERE, in other files) +; separated by a slash, read database first. If your database +; specification does not contain a slash, the implication is that reads +; and writes should be performed to the same database. +; +; For example, in extconfig.conf, you could specify a line like: +; sippeers => mysql,readhost.asterisk/writehost.asterisk,sippeers +; and then define the contexts [readhost.asterisk] and [writehost.asterisk] +; below. +; +; The requirements parameter is available only in Asterisk 1.6.1 and +; later and must be present in all contexts. It specifies the behavior +; when a column name is required by the system. The default behavior is +; "warn" and simply sends a warning to the logger that the column does +; not exist (or is of the wrong type or precision). The other two +; possibilities are "createclose", which adds the column with the right +; type and length, and "createchar", which adds the column as a char +; type, with the appropriate length to accept the data. Note that with +; the MySQL driver, both "createclose" and "createchar" will, on occasion, +; widen a table column width to meet the requirements specified. +; +[general] +;dbhost = 127.0.0.1 +;dbname = asterisk +;dbuser = myuser +;dbpass = mypass +;dbport = 3306 +;dbsock = /tmp/mysql.sock +;dbcharset = latin1 +;requirements=warn ; or createclose or createchar diff --git a/asterisk/res_config_sqlite.conf b/asterisk/res_config_sqlite.conf new file mode 100644 index 0000000..04e6ae2 --- /dev/null +++ b/asterisk/res_config_sqlite.conf @@ -0,0 +1,11 @@ +[general] + +; The database file. +dbfile => /var/lib/asterisk/sqlite.db + +; Both config_table and cdr_table are optional. If config_table is omitted, +; you must specify it in extconfig.conf. If it is both provided here and in +; extconfig.conf, the value given here is used. If cdr_table is omitted, CDR +; support is simply disabled. +config_table => ast_config +cdr_table => ast_cdr diff --git a/asterisk/res_config_sqlite3.conf b/asterisk/res_config_sqlite3.conf new file mode 100644 index 0000000..5416c80 --- /dev/null +++ b/asterisk/res_config_sqlite3.conf @@ -0,0 +1,31 @@ +; Define a realtime database name to use in extconfig.conf +; +;[asterisk] +;dbfile => /var/lib/asterisk/realtime.sqlite3 +; +; debug - Turn on debugging information +;debug=yes +; +; requirements - At startup, each realtime family will make requirements +; on the backend. There are several strategies for handling requirements: +; warn - Warn if the required column does not exist. +; createclose - Create columns as close to the requirements as possible. +; createchar - Create char columns only +; +;requirements=warn +; +; batch - SQLite 3 write performance can be greatly improved by wrapping +; multiple writes in transactions. This option specifies the duration in +; milliseconds of auto-generated transactions. Any changes made during an +; unfinished transaction will be immediately available to the same database +; connection, but any external connections could see a delay up to the value +; of this setting. It is also possible that if asterisk crashes, any changes +; made during this time could be lost. Due to the nearly 100x performance +; benefit, the default is 100 ms. Set to 0 to disable batching. +; +; PLEASE NOTE: If you need to write to the database from another connection +; you will need to set batch=0 as the transactions will cause the database +; to lock for writing. +; +;batch=1000 + diff --git a/asterisk/res_corosync.conf b/asterisk/res_corosync.conf new file mode 100644 index 0000000..9a72c1c --- /dev/null +++ b/asterisk/res_corosync.conf @@ -0,0 +1,31 @@ +; +; Sample configuration file for res_corosync. +; +; This module allows events to be shared amongst a local cluster of +; Asterisk servers. Specifically, the types of events that may be +; shared include: +; +; - Device State (for shared presence information) +; +; - Message Waiting Indication, or MWI (to allow Voicemail to live on +; a server that is different from where the phones are registered) +; +; For more information about Corosync, see: http://www.corosync.org/ +; + +[general] + +; +; Publish Message Waiting Indication (MWI) events from this server to the +; cluster. +;publish_event = mwi +; +; Subscribe to MWI events from the cluster. +;subscribe_event = mwi +; +; Publish Device State (presence) events from this server to the cluster. +;publish_event = device_state +; +; Subscribe to Device State (presence) events from the cluster. +;subscribe_event = device_state +; diff --git a/asterisk/res_curl.conf b/asterisk/res_curl.conf new file mode 100644 index 0000000..cc47298 --- /dev/null +++ b/asterisk/res_curl.conf @@ -0,0 +1,8 @@ +; +; CURLOPT global settings (mostly set for realtime) +; +[globals] +;proxy=myproxy.example.com +proxytype=http +proxyport=8001 +;proxyuserpwd=asterisk:asteriskrocks diff --git a/asterisk/res_fax.conf b/asterisk/res_fax.conf new file mode 100644 index 0000000..022a23a --- /dev/null +++ b/asterisk/res_fax.conf @@ -0,0 +1,32 @@ +; Generic Fax Application configuration + +[general] +; Maximum Transmission Rate +; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 } +; Set this value to the maximum desired transfer rate. Default: 14400 +;maxrate=14400 + +; Minimum Transmission Rate +; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 } +; Set this value to the minimum desired transfer rate. Default: 4800 +;minrate=4800 + +; Send Progress/Status events to manager session +; Manager events with 'call' class permissions will receive events indicating the +; steps to initiate a fax session. Fax completion events are always sent to manager +; sessions with 'call' class permissions, regardless of the value of this option. +; Default: no +statusevents=yes + +; modem capabilities +; Possible values are { v17 | v27 | v29 } +; Set this value to modify the default modem options. Default: v17,v27,v29 +;modems=v17,v27,v29 + +; Enable/disable T.30 ECM (error correction mode) by default. +; Default: Enabled +;ecm=yes + +; T.38 Negotiation Timeout in milliseconds +; Default: 5000 +t38timeout=5000 diff --git a/asterisk/res_ldap.conf b/asterisk/res_ldap.conf new file mode 100644 index 0000000..9a2accb --- /dev/null +++ b/asterisk/res_ldap.conf @@ -0,0 +1,198 @@ +; +; Configuration file for res_config_ldap +; + +; Realtime configuration +; ---------------------- +; In order to use this module, you start +; in extconfig.conf with a configuration like this: +; +; sippeers = ldap,"dc=myDomain,dc=myDomainExt",sip +; extensions = ldap,"dc=myDomain,dc=myDomainExt",extensions +; sip.conf = ldap,"dc=myDomain,dc=myDomainExt",config +; +; In the case of LDAP the last keyword in each line above specifies +; a section in this file. +; +; LDAP schema and ldif files can be located in contrib/scripts. + +; TLS support +; ----------- +; Note that you can configure an ldaps: url here to get TLS support. +; Detailed configuration of certificates and supported CAs is done in your +; ldap.conf file for OpenLDAP clients on your system. +; This requires that you have OpenLDAP libraries compiled with TLS support + +; ********************************************************************************* +; NOTE: res_ldap.conf should be chmod 600 because it contains the plain-text LDAP +; password to an account with WRITE access to the asterisk configuration. +; ********************************************************************************* + +[_general] +; +; Specify one of either host and port OR url. URL is preferred, as you can +; use more options. +;host=192.168.1.1 ; LDAP host +;port=389 +;url=ldap://ldap3.mydomain.com:3890 +;protocol=3 ; Version of the LDAP protocol to use; default is 3. +;basedn=dc=example,dc=tld ; Base DN +;user=cn=asterisk,dc=example,dc=tld ; Bind DN +;pass=MyPassword ; Bind password + +; Configuration Table +[config] +; +; additionalFilter - This specifies an additional set of criteria to be used +; when querying the LDAP server. +; +additionalFilter=(objectClass=AstConfig) +; +; Attributes mapping (asterisk variable name = ldap attribute name) +; When Asterisk requests the variable by the name of the value on the left, +; this module will look up the attribute listed on the right. +; +filename = AstConfigFilename +category = AstConfigCategory +variable_name = AstConfigVariableName +variable_value = AstConfigVariableValue +cat_metric = AstConfigCategoryMetric +commented = AstConfigCommented + +; +; Extensions Table +; +[extensions] +context = AstExtensionContext +exten = AstExtensionExten +priority = AstExtensionPriority +app = AstExtensionApplication +appdata = AstExtensionApplicationData +additionalFilter=(objectClass=AstExtension) + +; +; Sip Users Table +; +[sip] +name = cn ; We use the "cn" as the default value for name on the line above + ; because objectClass=AsteriskSIPUser does not include a uid as an allowed field + ; If your entry combines other objectClasses and uid is available, you may + ; prefer to change the line to be name = uid, especially if your LDAP entries + ; contain spaces in the cn field. + ; You may also find it appropriate to use something completely different. + ; This is possible by changing the line above to name = AstAccountName (or whatever you + ; prefer). + ; +amaflags = AstAccountAMAFlags +callgroup = AstAccountCallGroup +callerid = AstAccountCallerID +directmedia = AstAccountDirectMedia +context = AstAccountContext +dtmfmode = AstAccountDTMFMode +fromuser = AstAccountFromUser +fromdomain = AstAccountFromDomain +fullcontact = AstAccountFullContact +fullcontact = gecos +host = AstAccountHost +insecure = AstAccountInsecure +mailbox = AstAccountMailbox +md5secret = AstAccountRealmedPassword ; Must be an MD5 hash. Field value can start with + ; {md5} but it is not required. + ; Generate the password via the md5sum command, e.g. + ; echo "my_password" | md5sum +nat = AstAccountNAT +deny = AstAccountDeny +permit = AstAccountPermit +pickupgroup = AstAccountPickupGroup +port = AstAccountPort +qualify = AstAccountQualify +restrictcid = AstAccountRestrictCID +rtptimeout = AstAccountRTPTimeout +rtpholdtimeout = AstAccountRTPHoldTimeout +type = AstAccountType +disallow = AstAccountDisallowedCodec +allow = AstAccountAllowedCodec +MusicOnHold = AstAccountMusicOnHold +regseconds = AstAccountExpirationTimestamp +regcontext = AstAccountRegistrationContext +regexten = AstAccountRegistrationExten +CanCallForward = AstAccountCanCallForward +ipaddr = AstAccountIPAddress +defaultuser = AstAccountDefaultUser +regserver = AstAccountRegistrationServer +lastms = AstAccountLastQualifyMilliseconds +additionalFilter=(objectClass=AsteriskSIPUser) + +; +; IAX Users Table +; +[iax] +amaflags = AstAccountAMAFlags +callerid = AstAccountCallerID +context = AstAccountContext +fullcontact = AstAccountFullContact +fullcontact = gecos +host = AstAccountHost +mailbox = AstAccountMailbox +md5secret = AstAccountRealmedPassword ; Must be an MD5 hash. Field value can start with + ; {md5} but it is not required. + ; Generate the password via the md5sum command, e.g. + ; echo "my_password" | md5sum +deny = AstAccountDeny +permit = AstAccountPermit +port = AstAccountPort +qualify = AstAccountQualify +type = AstAccountType +disallow = AstAccountDisallowedCodec +allow = AstAccountAllowedCodec +regseconds = AstAccountExpirationTimestamp +regcontext = AstAccountRegistrationContext +regexten = AstAccountRegistrationExten +notransfer = AstAccountNoTransfer +lastms = AstAccountLastQualifyMilliseconds +additionalFilter=(objectClass=AstAccountIAX) + +; +; A Test Family +; +[testfamily] +MyUSERID = uid +additionalFilter=(objectClass=*) + +[accounts] +amaflags = AstAccountAMAFlags +callgroup = AstAccountCallGroup +callerid = AstAccountCallerID +directmedia = AstAccountDirectMedia +context = AstAccountContext +dtmfmode = AstAccountDTMFMode +fromuser = AstAccountFromUser +fromdomain = AstAccountFromDomain +fullcontact = AstAccountFullContact +fullcontact = gecos +host = AstAccountHost +insecure = AstAccountInsecure +mailbox = AstAccountMailbox +md5secret = AstAccountRealmedPassword ; Must be an MD5 hash. Field value can start with + ; {md5} but it is not required. + ; Generate the password via the md5sum command, e.g. + ; echo "my_password" | md5sum +nat = AstAccountNAT +deny = AstAccountDeny +permit = AstAccountPermit +pickupgroup = AstAccountPickupGroup +port = AstAccountPort +qualify = AstAccountQualify +restrictcid = AstAccountRestrictCID +rtptimeout = AstAccountRTPTimeout +rtpholdtimeout = AstAccountRTPHoldTimeout +type = AstAccountType +disallow = AstAccountDisallowedCodec +allow = AstAccountAllowedCodec +MusicOnHold = AstAccountMusicOnHold +regseconds = AstAccountExpirationTimestamp +regcontext = AstAccountRegistrationContext +regexten = AstAccountRegistrationExten +CanCallForward = AstAccountCanCallForward +additionalFilter=(objectClass=AstAccount) + diff --git a/asterisk/res_odbc.conf b/asterisk/res_odbc.conf new file mode 100644 index 0000000..035f38c --- /dev/null +++ b/asterisk/res_odbc.conf @@ -0,0 +1,131 @@ +;;; odbc setup file + +; ENV is a global set of environmental variables that will get set. +; Note that all environmental variables can be seen by all connections, +; so you can't have different values for different connections. +[ENV] +;INFORMIXSERVER => my_special_database +;INFORMIXDIR => /opt/informix +;ORACLE_HOME => /home/oracle + +; All other sections are arbitrary names for database connections. + +; +; The context name is what will be used in other configuration files, such +; as extconfig.conf and func_odbc.conf, to reference this connection. +[asterisk] +; +; Permit disabling sections without needing to comment them out. +; If not specified, it is assumed the section is enabled. +enabled => no +; +; This value should match an entry in /etc/odbc.ini +; (or /usr/local/etc/odbc.ini, on FreeBSD and similar systems). +dsn => asterisk +; +; Username for connecting to the database. The user defaults to the context +; name if unspecified. +;username => myuser +; +; Password for authenticating the user to the database. The default +; password is blank. +;password => mypass +; +; Build a connection at startup? +pre-connect => yes +; +; What should we execute to ensure that our connection is still alive? The +; statement should return a non-zero value in the first field of its first +; record. The default is "select 1". +;sanitysql => select 1 +; +; On some databases, the connection times out and a reconnection will be +; necessary. This setting configures the amount of time a connection +; may sit idle (in seconds) before a reconnection will be attempted. +;idlecheck => 3600 +; +; Should we use a single connection for all queries? Most databases will +; allow sharing the connection, though Sybase and MS SQL Server will not. +;share_connections => yes +; +; If we aren't sharing connections, what is the maximum number of connections +; that we should attempt? +;limit => 5 +; +; When the channel is destroyed, should any uncommitted open transactions +; automatically be committed? +;forcecommit => no +; +; How should we perceive data in other transactions within the database? +; Possible values are read_uncommitted, read_committed, repeatable_read, +; and serializable. The default is read_committed. +;isolation => repeatable_read +; +; Is the backslash a native escape character? The default is yes, but for +; MS SQL Server, the answer is no. +;backslash_is_escape => yes +; +; When enabled (default behavior), empty column values are stored as empty strings +; during realtime updates. Disabling this option causes empty column values to be +; stored as NULLs for non-text columns. +; Disable it for PostgreSQL backend in order to avoid errors caused by updating +; integer columns with an empty string instead of NULL (sippeers, sipregs, ..). +; NOTE: This option will be removed in asterisk 13. At that point, it will always +; behave as if it was set to 'no'. +;allow_empty_string_in_nontext => yes +; +; How long (in seconds) should we attempt to connect before considering the +; connection dead? The default is 10 seconds, but you may wish to reduce it, +; to increase responsiveness. +;connect_timeout => 10 +; +; When a connection fails, how long (in seconds) should we cache that +; information before we attempt another connection? This increases +; responsiveness, when a database resource is not working. +;negative_connection_cache => 300 + +[mysql2] +enabled => no +dsn => MySQL-asterisk +username => myuser +password => mypass +pre-connect => yes + +; Certain servers, such as MS SQL Server and Sybase use the TDS protocol, which +; limits the number of active queries per connection to 1. By telling res_odbc +; not to share connections, Asterisk can be made to work with these servers. +[sqlserver] +enabled => no +dsn => mickeysoft +share_connections => no +limit => 5 +username => oscar +password => thegrouch +pre-connect => yes +sanitysql => select count(*) from systables +; forcecommit => no ; Default to committing uncommitted transactions? + ; Note: this is NOT the autocommit flag; this + ; determines the end result of transactions which + ; are not explicitly committed or rolled back. By + ; default, such transactions are rolled back if the + ; call ends without an explicit commit. +; isolation => read_committed ; Isolation level; supported levels are: + ; read_uncommitted, read_committed, repeatable_read, + ; serializable. Note that not all databases support + ; all isolation levels (e.g. Postgres only supports + ; repeatable_read and serializable). See database + ; documentation for further information. +; +; Many databases have a default of '\' to escape special characters. MS SQL +; Server does not. +backslash_is_escape => no + +; +; If you are having problems with concurrency, please read this note from the +; mailing lists, regarding UnixODBC: +; +; http://lists.digium.com/pipermail/asterisk-dev/2009-February/036539.html +; +; In summary, try setting "Threading=2" in the relevant section within your +; odbcinst.ini. +; diff --git a/asterisk/res_pgsql.conf b/asterisk/res_pgsql.conf new file mode 100644 index 0000000..b889244 --- /dev/null +++ b/asterisk/res_pgsql.conf @@ -0,0 +1,29 @@ +; +; Sample configuration for res_config_pgsql +; +; The value of dbhost may be either a hostname or an IP address. +; If dbhost is commented out or the string "localhost", a connection +; to the local host is assumed and dbsock is used instead of TCP/IP +; to connect to the server. +; +[general] +dbhost=127.0.0.1 +dbport=5432 +dbname=asterisk +dbuser=asterisk +dbpass=password +; +; dbsock is specified as the directory where the socket file may be found. The +; actual socket is constructed as a combination of dbsock and dbport. For +; example, the values of '/tmp' and '5432', respectively, will specify a socket +; file of '/tmp/.s.PGSQL.5432'. +; +;dbsock=/tmp +; +; requirements - At startup, each realtime family will make requirements +; on the backend. There are several strategies for handling requirements: +; warn - Warn if the required column does not exist. +; createclose - Create columns as close to the requirements as possible. +; createchar - Create char columns only +; +requirements=warn diff --git a/asterisk/res_pktccops.conf b/asterisk/res_pktccops.conf new file mode 100644 index 0000000..769508d --- /dev/null +++ b/asterisk/res_pktccops.conf @@ -0,0 +1,32 @@ +;; Sample res_pktccops.conf +; +;[general] +;gateinfoperiod => 60 ; default 60s +;gatetimeout = 150 ; default 150 +;t1 => 250 ; default 250s +;t7 => 200 ; default 200s +;t8 => 300 ; default 300s +;keepalive => 60 ; default 60s +; +;[teszt] +;host => 192.168.0.24 +;pool => 10.0.1.0 10.0.1.255 +;pool => 10.0.3.0 10.0.3.255 +;pool => 10.0.7.0 10.0.8.255 +;pool => 10.0.10.0 10.0.11.255 +; +;[general] +;gateinfoperiod => 60 ; default 60s +;gatetimeout = 150 ; default 150 +;t1 => 250 ; default 250s +;t7 => 200 ; default 200s +;t8 => 300 ; default 300s +;keepalive => 60 ; default 60s +; +;[test] +;host => 192.168.0.24 +;pool => 10.0.1.0 10.0.1.255 +;pool => 10.0.3.0 10.0.3.255 +;pool => 10.0.7.0 10.0.8.255 +;pool => 10.0.10.0 10.0.11.255 +; diff --git a/asterisk/res_snmp.conf b/asterisk/res_snmp.conf new file mode 100644 index 0000000..a6e40c8 --- /dev/null +++ b/asterisk/res_snmp.conf @@ -0,0 +1,22 @@ +; +; Configuration file for res_snmp +;--------------------------------- +; +; Res_snmp can run as a subagent or standalone SNMP agent. The standalone snmp +; agent is based on net-snmp and will read a configuration file called +; asterisk.conf in the net-snmp configuration file path, starting with +; /etc/snmp on many systems. +; +; If you use the subagent model, you need to enable agentx in snmpd.conf +; Note that you can only run one Asterisk on the system in this case. +; +; See https://wiki.asterisk.org/wiki/display/AST/Simple+Network+Management+Protocol+(SNMP)+Support +; to get more information about +; snmp support in Asterisk + +[general] +; We run as a subagent per default -- to run as a full agent +; we must run as root (to be able to bind to port 161) +;subagent = yes +; SNMP must be explicitly enabled to be active +;enabled = yes diff --git a/asterisk/res_stun_monitor.conf b/asterisk/res_stun_monitor.conf new file mode 100644 index 0000000..12d32a4 --- /dev/null +++ b/asterisk/res_stun_monitor.conf @@ -0,0 +1,27 @@ +; +; Configuration file for the res_stun_monitor module +; +; The res_stun_monitor module sends STUN requests to a configured STUN server +; periodically. If the monitor detects a change in the external IP address or port +; provided by the STUN server an event is sent out internally within Asterisk +; to alert all listeners to that event of the change. + +; The current default listeners for the network change event include chan_sip +; and chan_iax. Both of these channel drivers by default react to this event +; by renewing all outbound registrations. This allows the endpoints Asterisk +; is registering with to become aware of the address change and know the new +; location. +; +[general] +; +; ---- STUN Server configuration --- +; Setting the 'stunaddr' option to a valid address enables the STUN monitor. +; +;stunaddr = mystunserver.com ; Address of the STUN server to query. + ; Valid form: + ; [(hostname | IP-address) [':' port]] + ; The port defaults to the standard STUN port (3478). + ; Set to an empty value to disable STUN monitoring. + ; Default is disabled. +;stunrefresh = 30 ; Number of seconds between STUN refreshes. + ; Default is 30. diff --git a/asterisk/rtp.conf b/asterisk/rtp.conf new file mode 100644 index 0000000..c22acaa --- /dev/null +++ b/asterisk/rtp.conf @@ -0,0 +1,60 @@ +; +; RTP Configuration +; +[general] +; +; RTP start and RTP end configure start and end addresses +; +; Defaults are rtpstart=5000 and rtpend=31000 +; +rtpstart=10000 +rtpend=20000 +; +; Whether to enable or disable UDP checksums on RTP traffic +; +;rtpchecksums=no +; +; The amount of time a DTMF digit with no 'end' marker should be +; allowed to continue (in 'samples', 1/8000 of a second) +; +;dtmftimeout=3000 +; rtcpinterval = 5000 ; Milliseconds between rtcp reports + ;(min 500, max 60000, default 5000) +; +; Enable strict RTP protection. This will drop RTP packets that +; do not come from the source of the RTP stream. This option is +; enabled by default. +; strictrtp=yes +; +; Number of packets containing consecutive sequence values needed +; to change the RTP source socket address. This option only comes +; into play while using strictrtp=yes. Consider changing this value +; if rtp packets are dropped from one or both ends after a call is +; connected. This option is set to 4 by default. +; probation=8 +; +; Whether to enable or disable ICE support. This option is disabled by default. +; icesupport=true +; +; Hostname or address for the STUN server used when determining the external +; IP address and port an RTP session can be reached at. The port number is +; optional. If omitted the default value of 3478 will be used. This option is +; disabled by default. +; +; e.g. stundaddr=mystun.server.com:3478 +; +; stunaddr= +; +; Hostname or address for the TURN server to be used as a relay. The port +; number is optional. If omitted the default value of 3478 will be used. +; This option is disabled by default. +; +; e.g. turnaddr=myturn.server.com:34780 +; +; turnaddr= +; +; Username used to authenticate with TURN relay server. +; turnusername= +; +; Password used to authenticate with TURN relay server. +; turnpassword= diff --git a/asterisk/say.conf b/asterisk/say.conf new file mode 100644 index 0000000..6285dbe --- /dev/null +++ b/asterisk/say.conf @@ -0,0 +1,383 @@ +; +; language configuration +; + +[general] +mode=old ; method for playing numbers and dates + ; old - using asterisk core function + ; new - using this configuration file + +; The new language routines produce strings of the form +; prefix:[format:]data +; that are matched against the rules in this file to produce +; an output. +; +; The data is generally the string to be spelled (either a number, +; an ascii string or a date/time in the format specified below). +; It is available, in the right hand side of a rule, as variable ${SAY}. +; +; The format is optional and normally used only for date/time. +; The prefix is used to select the pronunciation - standard +; prefixes are +; num used for numbers +; enum used for enumerations +; date for dates +; time for times +; datetime for dates and times +; char for character strings +; phonetic for phonetic strings +; digit for digit strings +; +; but others can be used at will. +; +; Processing occurs as follows: +; If the format is empty, or there is no format, the entire +; string is matched against one of the pattern on the left hand side. +; On the first match, the various comma-separated components on the right +; hand side are pronounced, as follows: +; + a component starting with a prefix: (i.e. with a ':' in it) +; is re-processed according to these rules; +; + a component without a ':' in it is considered a filename and +; the corresponding file is played. +; +; If the format is non-empty, the format is split into its components +; (individual characters, or filenames in single quotes), and then +; filenames are played, whereas single characters are used to +; generate a new string format:pat:data to be processed. +; +; DATES/AND TIMES assume that the date info is available in +; the form YYYYMMDDHHmm.ss-dow-doy +; with 4 digits for the year, 2 for month, day, hour, minutes, seconds, +; one digit for the day-of-week, and 3 digits for the day-of-year. +; +; Example: +; datetime::200604172030.00-4-102 +; (typical format for a date) is first matched against the line +; datetime::. => date:AdBY 'digits/at' IMp:${SAY} +; which is normally present with the default format for dates. +; In turn, the format string "AdBY 'digits/at' IMp" results in +; the sequence +; date:A:200604172030.00-4-102 +; date:d:200604172030.00-4-102 +; date:B:200604172030.00-4-102 +; date:Y:200604172030.00-4-102 +; digits/at +; date:I:200604172030.00-4-102 +; date:M:200604172030.00-4-102 +; date:p:200604172030.00-4-102 +; +; +; Remember, normally X Z N are special, and the search is +; case insensitive, so you must use [X] [N] [Z] .. if you +; want exact match. + +; We start with the basic rules that might be more-or-less +; language-independent + +[digit-base](!) ; base rule for digit strings + ; XXX incomplete yet + _digit:[0-9] => digits/${SAY} + _digit:[-] => letters/dash + _digit:[*] => letters/star + _digit:[@] => letters/at + _digit:[0-9]. => digit:${SAY:0:1}, digit:${SAY:1} + +[date-base](!) ; base rules for dates and times + ; the 'SAY' variable contains YYYYMMDDHHmm.ss-dow-doy + ; these rule map the strftime attributes. + _date:Y:. => num:${SAY:0:4} ; year, 19xx + _date:[Bbh]:. => digits/mon-$[${SAY:4:2}-1] ; month name, 0..11 + _date:[Aa]:. => digits/day-${SAY:16:1} ; day of week + _date:[de]:. => num:${SAY:6:2} ; day of month + _date:[H]:. => digits/oh, num:${SAY:8:2} ; hour (oh one, oh two, ..., oh nine, ten, eleven, ..., twenty-three) + _date:[I]:. => num:$[${SAY:8:2} % 12] ; hour 0-12 + _date:[M]:. => num:${SAY:10:2} ; minute + ; XXX too bad the '?' function does not remove the quotes + ; _date:[pP]:. => digits/$[ ${SAY:10:2} > 12 ? "p-m" :: "a-m"] ; am pm + _date:[pP]:. => digits/p-m ; am pm + _date:[S]:. => num:${SAY:13:2} ; seconds + _date:[Ii]:. => num:$[${SAY:8:2} % 12] ; hour 0-12 + _date:[k]:. => num:${SAY:8:2} ; hour (one, two. three, ...,twenty three + _date:[m]:. => num:${SAY:4:2} ; month number + _date:[Q]:. => date:dby ;incompleat ; "today", "yesterday" or ABdY + _date:[q]:. => date:dby ;incompleat ; "" (for today), "yesterday", weekday, or ABdY + _date:[R]:. => date:HM${SAY} ; 24 hour time, including minute + _date:[T]:. => date:HMS${SAY} ; 24 hour, minure, seconds + +[en-base](!) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} + _[n]um:X00 => num:${SAY:0:1}, digits/hundred + _[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:X000 => num:${SAY:0:1}, digits/thousand + _[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} + + _[n]um:X000000 => num:${SAY:0:1}, digits/million + _[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/million + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/million + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3} + + _[n]um:X000000000 => num:${SAY:0:1}, digits/billion + _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1} + _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion + _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2} + _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion + _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3} + + ; enumeration + _e[n]um:X => digits/h-${SAY} + _e[n]um:1X => digits/h-${SAY} + _e[n]um:[2-9]0 => digits/h-${SAY} + _e[n]um:[2-9][1-9] => num:${SAY:0:1}0, digits/h-${SAY:1} + _e[n]um:[1-9]00 => num:${SAY:0:1}, digits/h-hundred + _e[n]um:[1-9]XX => num:${SAY:0:1}, digits/h-hundred, enum:${SAY:1} + +[en_GB](date-base,digit-base,en-base) + _[n]um:XXX => num:${SAY:0:1}, digits/hundred, vm-and, num:${SAY:1} + +[it](digit-base,date-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} + _[n]um:100 => digits/hundred + _[n]um:1XX => digits/hundred, num:${SAY:1} + _[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred + _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:1000 => digits/thousand + _[n]um:1XXX => digits/thousand, num:${SAY:1} + _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousands + _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousands, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousands + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousands, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousands + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousands, num:${SAY:3} + + _[n]um:1000000 => num:${SAY:0:1}, digits/million + _[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/millions + _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/millions + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} + + _[n]um:X000000000 => num:${SAY:0:1}, digits/billion + _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1} + _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion + _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2} + _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion + _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3} + + _datetime::. => date:AdBY 'digits/at' IMp:${SAY} + _date::. => date:AdBY:${SAY} + _time::. => date:IMp:${SAY} + +[en](en-base,date-base,digit-base) + _datetime::. => date:AdBY 'digits/at' IMp:${SAY} + _date::. => date:AdBY:${SAY} + _time::. => date:IMp:${SAY} + +[de](date-base,digit-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0 + _[n]um:100 => digits/ein, digits/hundred + _[n]um:1XX => digits/ein, digits/hundred, num:${SAY:1} + _[n]um:[2-9]00 => digits/${SAY:0:1}, digits/hundred + _[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:1000 => digits/ein, digits/thousand + _[n]um:1XXX => digits/ein, digits/thousand, num:${SAY:1} + _[n]um:[2-9]000 => digits/${SAY:0:1}, digits/thousand + _[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:1} + + _[n]um:1000000 => digits/eine, digits/million + _[n]um:1XXXXXX => digits/eine, digits/million, num:${SAY:1} + _[n]um:[2-9]000000 => digits/${SAY:0:1}, digits/millions + _[n]um:[2-9]XXXXXX => digits/${SAY:0:1}, digits/millions, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/millions + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} + + _datetime::. => date:AdBY 'digits/at' IMp:${SAY} + _date::. => date:AdBY:${SAY} + _time::. => date:IMp:${SAY} + +[hu](digit-base,date-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1[1-9] => digits/10en, digits/${SAY:1} + _[n]um:2[1-9] => digits/20on, digits/${SAY:1} + _[n]um:[1-9]0 => digits/${SAY} + _[n]um:[3-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} + _[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:X000 => num:${SAY:0:1}, digits/thousand + _[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} + + _[n]um:X000000 => num:${SAY:0:1}, digits/million + _[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/million + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/million + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3} + + _[n]um:X000000000 => num:${SAY:0:1}, digits/billion + _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1} + _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion + _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2} + _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion + _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3} + + _datetime::. => date:YBdA k 'ora' M 'perc':${SAY} + _date::. => date:YBdA:${SAY} + _time::. => date:k 'ora' M 'perc':${SAY} + +[fr](date-base,digit-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:[2-6]1 => digits/${SAY:0:1}0, vm-and, digits/${SAY:1} + _[n]um:71 => digits/60, vm-and, num:1${SAY:1} + _[n]um:7X => digits/60, num:1${SAY:1} + _[n]um:9X => digits/80, num:1${SAY:1} + _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} + _[n]um:100 => digits/hundred + _[n]um:1XX => digits/hundred, num:${SAY:1} + _[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred + _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:1000 => digits/thousand + _[n]um:1XXX => digits/thousand, num:${SAY:1} + _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousand + _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} + + _[n]um:1000000 => num:${SAY:0:1}, digits/million + _[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/million + _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/million + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/million + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3} + + _datetime::. => date:AdBY 'digits/at' H 'hours' M 'perc':${SAY} + _date::. => date:AdBY:${SAY} + _time::. => date:H 'hours' M 'perc':${SAY} + + _pho[n]e:XXXX => num:${SAY:0:2}, num:${SAY:2:2} + _pho[n]e:0[1-9]XXXXXXXX => num:${SAY:0:1}, num:${SAY:1:1}, num:${SAY:2:2}, num:${SAY:4:2}, num:${SAY:6:2}, num:${SAY:8:2} + _pho[n]e:. => digit:${SAY} + +[es](date-base,digit-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:2[1-9] => digits/20-and, digits/${SAY:1} + _[n]um:[3-9][1-9] => digits/${SAY:0:1}0, vm-and, digits/${SAY:1} + _[n]um:100 => digits/hundred + _[n]um:1XX => digits/100-and, num:${SAY:1} + _[n]um:[2-9]00 => digits/${SAY} + _[n]um:[2-9]XX => digits/${SAY:0:1}00, num:${SAY:1} + + _[n]um:1000 => digits/thousand + _[n]um:1XXX => digits/thousand, num:${SAY:1} + _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousand + _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} + + _[n]um:1000000 => digits/1M, digits/million + _[n]um:1XXXXXX => digits/1M, digits/million, num:${SAY:1} + _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/millions + _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/millions + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} + _[n]um:XXXX000000 => num:${SAY:0:4}, digits/millions + _[n]um:XXXXXXXXXX => num:${SAY:0:4}, digits/millions, num:${SAY:4} + + _datetime::. => date:Ad 'letters/d' B 'letters/d' Y 'digits/at' HMp:${SAY} + _date::. => date:Ad 'letters/d' B 'letters/d' Y:${SAY} + _time::. => date:HMp:${SAY} + +[da](date-base,digit-base) + _[n]um:0. => num:${SAY:1} + _[n]um:X => digits/${SAY} + _[n]um:1X => digits/${SAY} + _[n]um:[2-9]0 => digits/${SAY} + _[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0 + _[n]um:100 => digits/1N, digits/hundred + _[n]um:1XX => digits/1N, digits/hundred, num:${SAY:1} + _[n]um:[2-9]00 => digits/${SAY:0:1}, digits/hundred + _[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1} + + _[n]um:1000 => digits/1N, digits/thousand + _[n]um:1XXX => digits/1N, digits/thousand, num:${SAY:1} + _[n]um:[2-9]000 => digits/${SAY:0:1}, digits/thousand + _[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1} + _[n]um:XX000 => num:${SAY:0:2}, digits/thousand + _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} + _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand + _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} + + _[n]um:X000000 => digits/${SAY:0:1}, digits/million + _[n]um:XXXXXXX => digits/${SAY:0:1}, digits/million, num:${SAY:1} + _[n]um:XX000000 => num:${SAY:0:2}, digits/millions + _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} + _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions + _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} + + _[n]um:X000000000 => num:${SAY:0:1}, digits/billion + _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1} + _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion + _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2} + _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion + _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3} + + _datetime::. => date:AdBY 'digits/at' kM:${SAY} + _date::. => date:AdBY:${SAY} + _time::. => date:HM:${SAY} + + ; enumeration + _e[n]um:X => digits/h-${SAY} + _e[n]um:1X => digits/h-${SAY} + _e[n]um:[2-9]0 => digits/h-${SAY} + _e[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/h-${SAY:0:1}0 + _e[n]um:100 => digits/1N, digits/h-hundred + _e[n]um:1XX => digits/1N, digits/h-hundred, enum:${SAY:1} + _e[n]um:[2-9]00 => num:${SAY:0:1}, digits/h-hundred + _e[n]um:[2-9]XX => num:${SAY:0:1}, digits/h-hundred, enum:${SAY:1} diff --git a/asterisk/sip.conf b/asterisk/sip.conf new file mode 100644 index 0000000..b2489dc --- /dev/null +++ b/asterisk/sip.conf @@ -0,0 +1,1555 @@ +; +; SIP Configuration example for Asterisk +; +; Note: Please read the security documentation for Asterisk in order to +; understand the risks of installing Asterisk with the sample +; configuration. If your Asterisk is installed on a public +; IP address connected to the Internet, you will want to learn +; about the various security settings BEFORE you start +; Asterisk. +; +; Especially note the following settings: +; - allowguest (default enabled) +; - permit/deny/acl - IP address filters +; - contactpermit/contactdeny/contactacl - IP address filters for registrations +; - context - Which set of services you offer various users +; +; SIP dial strings +;----------------------------------------------------------- +; In the dialplan (extensions.conf) you can use several +; syntaxes for dialing SIP devices. +; SIP/devicename +; SIP/username@domain (SIP uri) +; SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port] +; SIP/devicename/extension +; SIP/devicename/extension/IPorHost +; SIP/username@domain//IPorHost +; +; +; Devicename +; devicename is defined as a peer in a section below. +; +; username@domain +; Call any SIP user on the Internet +; (Don't forget to enable DNS SRV records if you want to use this) +; +; devicename/extension +; If you define a SIP proxy as a peer below, you may call +; SIP/proxyhostname/user or SIP/user@proxyhostname +; where the proxyhostname is defined in a section below +; This syntax also works with ATA's with FXO ports +; +; SIP/username[:password[:md5secret[:authname]]]@host[:port] +; This form allows you to specify password or md5secret and authname +; without altering any authentication data in config. +; Examples: +; +; SIP/*98@mysipproxy +; SIP/sales:topsecret::account02@domain.com:5062 +; SIP/12345678::bc53f0ba8ceb1ded2b70e05c3f91de4f:myname@192.168.0.1 +; +; IPorHost +; The next server for this call regardless of domain/peer +; +; All of these dial strings specify the SIP request URI. +; In addition, you can specify a specific To: header by adding an +; exclamation mark after the dial string, like +; +; SIP/sales@mysipproxy!sales@edvina.net +; +; A new feature for 1.8 allows one to specify a host or IP address to use +; when routing the call. This is typically used in tandem with func_srv if +; multiple methods of reaching the same domain exist. The host or IP address +; is specified after the third slash in the dialstring. Examples: +; +; SIP/devicename/extension/IPorHost +; SIP/username@domain//IPorHost +; +; CLI Commands +; ------------------------------------------------------------- +; Useful CLI commands to check peers/users: +; sip show peers Show all SIP peers (including friends) +; sip show registry Show status of hosts we register with +; +; sip set debug on Show all SIP messages +; +; sip reload Reload configuration file +; sip show settings Show the current channel configuration +; +;------- Naming devices ------------------------------------------------------ +; +; When naming devices, make sure you understand how Asterisk matches calls +; that come in. +; 1. Asterisk checks the SIP From: address username and matches against +; names of devices with type=user +; The name is the text between square brackets [name] +; 2. Asterisk checks the From: addres and matches the list of devices +; with a type=peer +; 3. Asterisk checks the IP address (and port number) that the INVITE +; was sent from and matches against any devices with type=peer +; +; Don't mix extensions with the names of the devices. Devices need a unique +; name. The device name is *not* used as phone numbers. Phone numbers are +; anything you declare as an extension in the dialplan (extensions.conf). +; +; When setting up trunks, make sure there's no risk that any From: username +; (caller ID) will match any of your device names, because then Asterisk +; might match the wrong device. +; +; Note: The parameter "username" is not the username and in most cases is +; not needed at all. Check below. In later releases, it's renamed +; to "defaultuser" which is a better name, since it is used in +; combination with the "defaultip" setting. +;----------------------------------------------------------------------------- + +; ** Old configuration options ** +; The "call-limit" configuation option is considered old is replaced +; by new functionality. To enable callcounters, you use the new +; "callcounter" setting (for extension states in queue and subscriptions) +; You are encouraged to use the dialplan groupcount functionality +; to enforce call limits instead of using this channel-specific method. +; You can still set limits per device in sip.conf or in a database by using +; "setvar" to set variables that can be used in the dialplan for various limits. + +[general] +context=public ; Default context for incoming calls. Defaults to 'default' +;allowguest=no ; 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) +;allowoverlap=yes ; Enable RFC3578 overlap dialing support. + ; Can use the Incomplete application to collect the + ; needed digits from an ambiguous dialplan match. +;allowoverlap=dtmf ; Enable overlap dialing support using DTMF delivery + ; methods (inband, RFC2833, SIP INFO) in the early + ; media phase. Uses the Incomplete application to + ; collect the needed digits. +;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 domains 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. +;recordonfeature=automixmon ; Default feature to use when receiving 'Record: on' header + ; from an INFO message. Defaults to 'automon'. Works with + ; dynamic features. Feature must be usable on requesting + ; channel for it to work. Setting this value to a blank + ; will disable it. +;recordofffeature=automixmon ; Default feature to use when receiving 'Record: off' header + ; from an INFO message. Defaults to 'automon'. Works with + ; dynamic features. Feature must be usable on requesting + ; channel for it to work. Setting this value to a blank + ; will disable it. + +; With the current situation, you can do one of four things: +; a) Listen on a specific IPv4 address. Example: bindaddr=192.0.2.1 +; b) Listen on a specific IPv6 address. Example: bindaddr=2001:db8::1 +; c) Listen on the IPv4 wildcard. Example: bindaddr=0.0.0.0 +; d) Listen on the IPv4 and IPv6 wildcards. Example: bindaddr=:: +; (You can choose independently for UDP, TCP, and TLS, by specifying different values for +; "udpbindaddr", "tcpbindaddr", and "tlsbindaddr".) +; (Note that using bindaddr=:: will show only a single IPv6 socket in netstat. +; IPv4 is supported at the same time using IPv4-mapped IPv6 addresses.) +; +; You may optionally add a port number. (The default is port 5060 for UDP and TCP, 5061 +; for TLS). +; IPv4 example: bindaddr=0.0.0.0:5062 +; IPv6 example: bindaddr=[::]:5062 +; +; The address family of the bound UDP address is used to determine how Asterisk performs +; DNS lookups. In cases a) and c) above, only A records are considered. In case b), only +; AAAA records are considered. In case d), both A and AAAA records are considered. Note, +; however, that Asterisk ignores all records except the first one. In case d), when both A +; and AAAA records are available, either an A or AAAA record will be first, and which one +; depends on the operating system. On systems using glibc, AAAA records are given +; priority. + +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) + +; When a dialog is started with another SIP endpoint, the other endpoint +; should include an Allow header telling us what SIP methods the endpoint +; implements. However, some endpoints either do not include an Allow header +; or lie about what methods they implement. In the former case, Asterisk +; makes the assumption that the endpoint supports all known SIP methods. +; If you know that your SIP endpoint does not provide support for a specific +; method, then you may provide a comma-separated list of methods that your +; endpoint does not implement in the disallowed_methods option. Note that +; if your endpoint is truthful with its Allow header, then there is no need +; to set this option. This option may be set in the general section or may +; be set per endpoint. If this option is set both in the general section and +; in a peer section, then the peer setting completely overrides the general +; setting (i.e. the result is *not* the union of the two options). +; +; Note also that while Asterisk currently will parse an Allow header to learn +; what methods an endpoint supports, the only actual use for this currently +; is for determining if Asterisk may send connected line UPDATE requests and +; MESSAGE requests. Its use may be expanded in the future. +; +; disallowed_methods = UPDATE + +; +; Note that the TCP and TLS support for chan_sip is currently considered +; experimental. Since it is new, all of the related configuration options are +; subject to change in any release. If they are changed, the changes will +; be reflected in this sample configuration file, as well as in the UPGRADE.txt file. +; +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 + +;tcpauthtimeout = 30 ; tcpauthtimeout specifies the maximum number + ; of seconds a client has to authenticate. If + ; the client does not authenticate beofre this + ; timeout expires, the client will be + ; disconnected. (default: 30 seconds) + +;tcpauthlimit = 100 ; tcpauthlimit specifies the maximum number of + ; unauthenticated sessions that will be allowed + ; to connect at any given time. (default: 100) + +;websocket_write_timeout = 100 ; Default write timeout to set on websocket transports. + ; This value may need to be adjusted for connections where + ; Asterisk must write a substantial amount of data and the + ; receiving clients are slow to process the received information. + ; Value is in milliseconds; default is 100 ms. + +transport=udp ; Set the default transports. The order determines the primary default transport. + ; If tcpenable=no and the transport set is tcp, we will fallback to UDP. + +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") + +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters. +;tos_sip=cs3 ; 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. + +;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 time of incoming subscriptions (seconds), 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) + ; Default value is 70 +;qualifyfreq=60 ; Qualification: How often to check for the host to be up in seconds + ; and reported in milliseconds with sip show settings. + ; Set to low value if you use low timeout for NAT of UDP sessions + ; Default: 60 +;qualifygap=100 ; Number of milliseconds between each group of peers being qualified + ; Default: 100 +;qualifypeers=1 ; Number of peers in a group to be qualified at the same time + ; Default: 1 +;keepalive=60 ; Interval at which keepalive packets should be sent to a peer + ; Valid options are yes (60 seconds), no, or the number of seconds. + ; Default: 0 +;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY +;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC + ; fully. Enable this option to not get error messages + ; when sending MWI to phones with this bug. +;mwi_from=asterisk ; When sending MWI NOTIFY requests, use this setting in + ; the From: header as the "name" portion. Also fill the + ; "user" portion of the URI in the From: header with this + ; value if no fromuser is set + ; Default: empty +;vmexten=voicemail ; dialplan extension to reach mailbox sets the + ; Message-Account in the MWI notify message + ; defaults to "asterisk" + +; Codec negotiation +; +; When Asterisk is receiving a call, the codec will initially be set to the +; first codec in the allowed codecs defined for the user receiving the call +; that the caller also indicates that it supports. But, after the caller +; starts sending RTP, Asterisk will switch to using whatever codec the caller +; is sending. +; +; When Asterisk is placing a call, the codec used will be the first codec in +; the allowed codecs that the callee indicates that it supports. Asterisk will +; *not* switch to whatever codec the callee is sending. +; +;preferred_codec_only=yes ; Respond to a SIP invite with the single most preferred codec + ; rather than advertising all joint codec capabilities. This + ; limits the other side's codec choice to exactly what we prefer. + +;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 + ; for framing options +;autoframing=yes ; Set packetization based on the remote endpoint's (ptime) + ; preferences. Defaults to no. +; +; 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. +; +; This option may be specified globally, or on a per-user or per-peer basis. +; +;mohinterpret=default +; +; This 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 +; +;parkinglot=plaza ; Sets the default parking lot for call parking + ; This may also be set for individual users/peers + ; Parkinglots are configured in features.conf +;language=en ; Default language setting for all users/peers + ; This may also be set for individual users/peers +;tonezone=se ; Default tonezone for all users/peers + ; This may also be set for individual 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 + ; to send the identity of the remote party + ; This is identical to sendrpid=yes +;sendrpid = pai ; Use the "P-Asserted-Identity" header + ; to send the identity of the remote party +;rpid_update = no ; In certain cases, the only method by which a connected line + ; change may be immediately transmitted is with a SIP UPDATE request. + ; If communicating with another Asterisk server, and you wish to be able + ; transmit such UPDATE messages to it, then you must enable this option. + ; Otherwise, we will have to wait until we can send a reinvite to + ; transmit the information. +;trust_id_outbound = no ; Controls whether or not we trust this peer with private identity + ; information (when the remote party has callingpres=prohib or equivalent). + ; no - RPID/PAI headers will not be included for private peer information + ; yes - RPID/PAI headers will include the private peer information. Privacy + ; requirements will be indicated in a Privacy header for sendrpid=pai + ; legacy - RPID/PAI will be included for private peer information. In the + ; case of sendrpid=pai, private data that would be included in them + ; will be anonymized. For sendrpid=rpid, private data may be included + ; but the remote party's domain will be anonymized. The way legacy + ; behaves may violate RFC-3325, but it follows historic behavior. + ; This option is set to 'legacy' by default +;prematuremedia=no ; Some ISDN links send empty media frames before + ; the call is in ringing or progress state. The SIP + ; channel will then send 183 indicating early media + ; which will be empty - thus users get no ring signal. + ; Setting this to "yes" will stop any media before we have + ; call progress (meaning the SIP channel will not send 183 Session + ; Progress for early media). Default is "yes". Also make sure that + ; the SIP peer is configured with progressinband=never. + ; + ; In order for "noanswer" applications to work, you need to run + ; the progress() application in the priority before the app. + +;progressinband=never ; If we should generate in-band ringing always + ; use 'never' to never use in-band signalling, even in cases + ; where some buggy devices might not render it + ; Valid values: yes, no, never Default: never +;useragent=Asterisk PBX ; Allows you to change the user agent string + ; The default user agent string also contains the Asterisk + ; version. If you don't want to expose this, change the + ; useragent string. +;promiscredir = no ; 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 Asterisk is incapable + ; of performing a "hairpin" call. +;usereqphone = no ; If yes, ";user=phone" is added to uri that contains + ; a valid phone number +;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833 + ; Other options: + ; info : SIP INFO messages (application/dtmf-relay) + ; shortinfo : SIP INFO messages (application/dtmf) + ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw) + ; auto : Use rfc2833 if offered, inband otherwise + +;compactheaders = yes ; send compact sip headers. +; +;videosupport=yes ; Turn on support for SIP video. You need to turn this + ; on in this section to get any video support at all. + ; You can turn it off on a per peer basis if the general + ; video support is enabled, but you can't enable it for + ; one peer only without enabling in the general section. + ; If you set videosupport to "always", then RTP ports will + ; always be set up for video, even on clients that don't + ; support it. This assists callfile-derived calls and + ; certain transferred calls to use always use video when + ; available. [yes|NO|always] + +;textsupport=no ; Support for ITU-T T.140 realtime text. + ; The default value is "no". + +;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s) + ; Videosupport and maxcallbitrate is settable + ; for peers and users as well +;callevents=no ; generate manager events when sip ua + ; performs events (e.g. hold) +;authfailureevents=no ; generate manager "peerstatus" events when peer can't + ; authenticate with Asterisk. Peerstatus will be "rejected". +;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected, + ; for any reason, always reject with an identical response + ; equivalent to valid username and invalid password/hash + ; instead of letting the requester know whether there was + ; a matching user or peer for their request. This reduces + ; the ability of an attacker to scan for valid SIP usernames. + ; This option is set to "yes" by default. + +;auth_options_requests = yes ; Enabling this option will authenticate OPTIONS requests just like + ; INVITE requests are. By default this option is disabled. + +;accept_outofcall_message = no ; Disable this option to reject all MESSAGE requests outside of a + ; call. By default, this option is enabled. When enabled, MESSAGE + ; requests are passed in to the dialplan. + +;outofcall_message_context = messages ; Context all out of dialog msgs are sent to. When this + ; option is not set, the context used during peer matching + ; is used. This option can be defined at both the peer and + ; global level. + +;auth_message_requests = yes ; Enabling this option will authenticate MESSAGE requests. + ; By default this option is enabled. However, it can be disabled + ; should an application desire to not load the Asterisk server with + ; doing authentication and implement end to end security in the + ; message body. + +;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing + ; order instead of RFC3551 packing order (this is required + ; for Sipura and Grandstream ATAs, among others). This is + ; contrary to the RFC3551 specification, the peer _should_ + ; be negotiating AAL2-G726-32 instead :-( +;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the devices +;outboundproxy=proxy.provider.domain:8080 ; send outbound signaling to this proxy, not directly to the devices +;outboundproxy=proxy.provider.domain,force ; Send ALL outbound signalling to proxy, ignoring route: headers +;outboundproxy=tls://proxy.provider.domain ; same as '=proxy.provider.domain' except we try to connect 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 +; ; (could also be tcp,udp) - defining transports on the proxy line only +; ; applies for the global proxy, otherwise use the transport= option +;matchexternaddrlocally = yes ; Only substitute the externaddr or externhost setting if it matches + ; your localnet setting. Unless you have some sort of strange network + ; setup you will not need to enable this. + +;dynamic_exclude_static = yes ; Disallow all dynamic hosts from registering + ; as any IP address used for staticly defined + ; hosts. This helps avoid the configuration + ; error of allowing your users to register at + ; the same address as a SIP provider. + +;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 + ; register their phones. +;contactacl=named_acl_example ; Use named ACLs defined in acl.conf + +;rtp_engine=asterisk ; RTP engine to use when communicating with the device + +; +; 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 and have a "regexten=" configuration item. +; Multiple contexts may be specified by separating them with '&'. The +; actual extension is the 'regexten' parameter of the registering peer or its +; name if 'regexten' is not provided. If more than one context is provided, +; the context must be specified within regexten by appending the desired +; context after '@'. More than one regexten may be supplied if they are +; separated by '&'. Patterns may be used in regexten. +; +;regcontext=sipregistrations +;regextenonqualify=yes ; Default "no" + ; If you have qualify on and the peer becomes unreachable + ; this setting will enforce inactivation of the regexten + ; extension for the peer +;legacy_useroption_parsing=yes ; Default "no" ; If you have this option enabled and there are semicolons + ; in the user field of a sip URI, the field be truncated + ; at the first semicolon seen. This effectively makes + ; semicolon a non-usable character for peer names, extensions, + ; and maybe other, less tested things. This can be useful + ; for improving compatability with devices that like to use + ; user options for whatever reason. The behavior is similar to + ; how SIP URI's were typically handled in 1.6.2, hence the name. + +;send_diversion=no ; Default "yes" ; Asterisk normally sends Diversion headers with certain SIP + ; invites to relay data about forwarded calls. If this option + ; is disabled, Asterisk won't send Diversion headers unless + ; they are added manually. + +; 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 + + +;use_q850_reason = no ; Default "no" + ; Set to yes add Reason header and use Reason header if it is available. + +; When the Transfer() application sends a REFER SIP message, extra headers specified in +; the dialplan by way of SIPAddHeader are sent out with that message. 1.8 and earlier did not +; add the extra headers. To revert to 1.8- behavior, call SIPRemoveHeader with no arguments +; before calling Transfer() to remove all additional headers from the channel. The setting +; below is for transitional compatibility only. +; +;refer_addheaders=yes ; on by default + +;autocreatepeer=no ; Allow any UAC not explicitly defined to register + ; WITHOUT AUTHENTICATION. Enabling this options poses a high + ; potential security risk and should be avoided unless the + ; server is behind a trusted firewall. + ; If set to "yes", then peers created in this fashion + ; are purged during SIP reloads. + ; When set to "persist", the peers created in this fashion + ; are not purged during SIP reloads. + +; +;------------------------ TLS settings ------------------------------------------------------------ +;tlscertfile= ; Certificate chain (*.pem format only) to use for TLS connections + ; The certificates must be sorted starting with the subject's certificate + ; and followed by intermediate CA certificates if applicable. + ; Default is to look for "asterisk.pem" in current directory + +;tlsprivatekey= ; Private key file (*.pem format only) for TLS connections. + ; If no tlsprivatekey is specified, tlscertfile is searched for + ; for both public and private key. + +;tlscafile= +; If the server your connecting to uses a self signed certificate +; you should have their certificate installed here so the code can +; verify the authenticity of their certificate. + +;tlscapath= +; A directory full of CA certificates. The files must be named with +; the CA subject name hash value. +; (see man SSL_CTX_load_verify_locations for more info) + +;tlsdontverifyserver=[yes|no] +; If set to yes, don't verify the servers certificate when acting as +; a client. If you don't have the server's CA certificate you can +; set this and it will connect without requiring tlscafile to be set. +; Default is no. + +;tlscipher= +; A string specifying which SSL ciphers to use or not use +; A list of valid SSL cipher strings can be found at: +; http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS +; +;tlsclientmethod=tlsv1 ; values include tlsv1, sslv3, sslv2. + ; Specify protocol for outbound client connections. + ; If left unspecified, the default is sslv2. +; +;--------------------------- SIP timers ---------------------------------------------------- +; These timers are used primarily in INVITE transactions. +; The default for Timer T1 is 500 ms or the measured run-trip time between +; Asterisk and the device if you have qualify=yes for the device. +; +;t1min=100 ; Minimum roundtrip time for messages to monitored hosts + ; Defaults to 100 ms +;timert1=500 ; Default T1 timer + ; Defaults to 500 ms or the measured round-trip + ; time to a peer (qualify=yes). +;timerb=32000 ; Call setup timer. If a provisional response is not received + ; in this amount of time, the call will autocongest + ; Defaults to 64*timert1 + +;--------------------------- RTP timers ---------------------------------------------------- +; These timers are currently used for both audio and video streams. The RTP timeouts +; are only applied to the audio channel. +; The settings are settable in the global section as well as per device +; +;rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity + ; on the audio channel + ; when we're not on hold. This is to be able to hangup + ; a call in the case of a phone disappearing from the net, + ; like a powerloss or grandma tripping over a cable. +;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity + ; on the audio channel + ; when we're on hold (must be > rtptimeout) +;rtpkeepalive= ; Send keepalives in the RTP stream to keep NAT open + ; (default is off - zero) + +;--------------------------- SIP Session-Timers (RFC 4028)------------------------------------ +; SIP Session-Timers provide an end-to-end keep-alive mechanism for active SIP sessions. +; This mechanism can detect and reclaim SIP channels that do not terminate through normal +; signaling procedures. Session-Timers can be configured globally or at a user/peer level. +; The operation of Session-Timers is driven by the following configuration parameters: +; +; * session-timers - Session-Timers feature operates in the following three modes: +; originate : Request and run session-timers always +; accept : Run session-timers only when requested by other UA +; refuse : Do not run session timers in any case +; The default mode of operation is 'accept'. +; * session-expires - Maximum session refresh interval in seconds. Defaults to 1800 secs. +; * session-minse - Minimum session refresh interval in seconds. Defualts to 90 secs. +; * session-refresher - The session refresher (uac|uas). Defaults to 'uas'. +; uac - Default to the caller initially refreshing when possible +; uas - Default to the callee initially refreshing when possible +; +; Note that, due to recommendations in RFC 4028, Asterisk will always honor the other +; endpoint's preference for who will handle refreshes. Asterisk will never override the +; preferences of the other endpoint. Doing so could result in Asterisk and the endpoint +; fighting over who sends the refreshes. This holds true for the initiation of session +; timers and subsequent re-INVITE requests whether Asterisk is the caller or callee, or +; whether Asterisk is currently the refresher or not. +; +;session-timers=originate +;session-expires=600 +;session-minse=90 +;session-refresher=uac +; +;--------------------------- SIP DEBUGGING --------------------------------------------------- +;sipdebug = yes ; Turn on SIP debugging by default, from + ; the moment the channel loads this configuration. + ; NOTE: You cannot use the CLI to turn it off. You'll + ; need to edit this and reload the config. +;recordhistory=yes ; Record SIP history by default + ; (see sip history / sip no history) +;dumphistory=yes ; Dump SIP history at end of SIP dialogue + ; SIP history is output to the DEBUG logging channel + + +;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ---------------------------- +; You can subscribe to the status of extensions with a "hint" priority +; (See extensions.conf.sample for examples) +; chan_sip support two major formats for notifications: dialog-info and SIMPLE +; +; You will get more detailed reports (busy etc) if you have a call counter enabled +; for a device. +; +; If you set the busylevel, we will indicate busy when we have a number of calls that +; matches the busylevel treshold. +; +; For queues, you will need this level of detail in status reporting, regardless +; if you use SIP subscriptions. Queues and manager use the same internal interface +; for reading status information. +; +; Note: Subscriptions does not work if you have a realtime dialplan and use the +; realtime switch. +; +;allowsubscribe=no ; Disable support for subscriptions. (Default is yes) +;subscribecontext = default ; Set a specific context for SUBSCRIBE requests + ; Useful to limit subscriptions to local extensions + ; Settable per peer/user also +;notifyringing = no ; Control whether subscriptions already INUSE get sent + ; RINGING when another call is sent (default: yes) +;notifyhold = yes ; Notify subscriptions on HOLD state (default: no) + ; Turning on notifyringing and notifyhold will add a lot + ; more database transactions if you are using realtime. +;notifycid = yes ; Control whether caller ID information is sent along with + ; dialog-info+xml notifications (supported by snom phones). + ; Note that this feature will only work properly when the + ; incoming call is using the same extension and context that + ; is being used as the hint for the called extension. This means + ; that it won't work when using subscribecontext for your sip + ; user or peer (if subscribecontext is different than context). + ; This is also limited to a single caller, meaning that if an + ; extension is ringing because multiple calls are incoming, + ; only one will be used as the source of caller ID. Specify + ; 'ignore-context' to ignore the called context when looking + ; for the caller's channel. The default value is 'no.' Setting + ; notifycid to 'ignore-context' also causes call-pickups attempted + ; via SNOM's NOTIFY mechanism to set the context for the call pickup + ; to PICKUPMARK. +;callcounter = yes ; Enable call counters on devices. This can be set per + ; device too. + +;----------------------------------------- T.38 FAX SUPPORT ---------------------------------- +; +; This setting is available in the [general] section as well as in device configurations. +; Setting this to yes enables T.38 FAX (UDPTL) on SIP calls; it defaults to off. +; +; 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. +; +; In some cases, T.38 endpoints will provide a T38FaxMaxDatagram value (during T.38 setup) that +; is based on an incorrect interpretation of the T.38 recommendation, and results in failures +; because Asterisk does not believe it can send T.38 packets of a reasonable size to that +; endpoint (Cisco media gateways are one example of this situation). In these cases, during a +; T.38 call you will see warning messages on the console/in the logs from the Asterisk UDPTL +; stack complaining about lack of buffer space to send T.38 FAX packets. If this occurs, you +; can set an override (globally, or on a per-device basis) to make Asterisk ignore the +; T38FaxMaxDatagram value specified by the other endpoint, and use a configured value instead. +; This can be done by appending 'maxdatagram=' to the t38pt_udptl configuration option, +; like this: +; +; t38pt_udptl = yes,fec,maxdatagram=400 ; Enables T.38 with FEC error correction and overrides +; ; the other endpoint's provided value to assume we can +; ; 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) +; based one or more events being detected. The events that can be detected are an incoming +; CNG tone or an incoming T.38 re-INVITE request. +; +; faxdetect = yes ; Default 'no', 'yes' enables both CNG and T.38 detection +; faxdetect = cng ; Enables only CNG detection +; faxdetect = t38 ; Enables only T.38 detection +; +;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------ +; Asterisk can register as a SIP user agent to a SIP proxy (provider) +; Format for the register statement is: +; register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry] +; +; +; +; domain is either +; - domain in DNS +; - host name in DNS +; - the name of a peer defined below or in realtime +; The domain is where you register your username, so your SIP uri you are registering to +; is username@domain +; +; If no extension is given, the 's' extension is used. The extension needs to +; be defined in extensions.conf to be able to accept calls from this SIP proxy +; (provider). +; +; A similar effect can be achieved by adding a "callbackextension" option in a peer section. +; this is equivalent to having the following line in the general section: +; +; register => username:secret@host/callbackextension +; +; and more readable because you don't have to write the parameters in two places +; (note that the "port" is ignored - this is a bug that should be fixed). +; +; Note that a register= line doesn't mean that we will match the incoming call in any +; other way than described above. If you want to control where the call enters your +; dialplan, which context, you want to define a peer with the hostname of the provider's +; server. If the provider has multiple servers to place calls to your system, you need +; a peer for each server. +; +; Beginning with Asterisk version 1.6.2, the "user" portion of the register line may +; contain a port number. Since the logical separator between a host and port number is a +; ':' character, and this character is already used to separate between the optional "secret" +; and "authuser" portions of the line, there is a bit of a hoop to jump through if you wish +; to use a port here. That is, you must explicitly provide a "secret" and "authuser" even if +; they are blank. See the third example below for an illustration. +; +; +; Examples: +; +;register => 1234:password@mysipprovider.com +; +; This will pass incoming calls to the 's' extension +; +; +;register => 2345:password@sip_proxy/1234 +; +; Register 2345 at sip provider 'sip_proxy'. Calls from this provider +; connect to local extension 1234 in extensions.conf, default context, +; unless you configure a [sip_proxy] section below, and configure a +; context. +; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com] +; Tip 2: Use separate inbound and outbound sections for SIP providers +; (instead of type=friend) if you have calls in both directions +; +;register => 3456@mydomain:5082::@mysipprovider.com +; +; Note that in this example, the optional authuser and secret portions have +; been left blank because we have specified a port in the user section +; +;register => tls://username:xxxxxx@sip-tls-proxy.example.org +; +; The 'transport' part defaults to 'udp' but may also be 'tcp', 'tls', 'ws', or 'wss'. +; Using 'udp://' explicitly is also useful in case the username part +; contains a '/' ('user/name'). + +;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 +;register_retry_403=yes ; Treat 403 responses to registrations as if they were + ; 401 responses and continue retrying according to normal + ; retry rules. + +;----------------------------------------- OUTBOUND MWI SUBSCRIPTIONS ------------------------- +; Asterisk can subscribe to receive the MWI from another SIP server and store it locally for retrieval +; by other phones. At this time, you can only subscribe using UDP as the transport. +; Format for the mwi register statement is: +; mwi => user[:secret[:authuser]]@host[:port]/mailbox +; +; Examples: +;mwi => 1234:password@mysipprovider.com/1234 +;mwi => 1234:password@myportprovider.com:6969/1234 +;mwi => 1234:password:authuser@myauthprovider.com/1234 +;mwi => 1234:password:authuser@myauthportprovider.com:6969/1234 +; +; MWI received will be stored in the 1234 mailbox of the SIP_Remote context. It can be used by other phones by following the below: +; mailbox=1234@SIP_Remote +;----------------------------------------- NAT SUPPORT ------------------------ +; +; WARNING: SIP operation behind a NAT is tricky and you really need +; to read and understand well the following section. +; +; When Asterisk is behind a NAT device, the "local" address (and port) that +; a socket is bound to has different values when seen from the inside or +; from the outside of the NATted network. Unfortunately this address must +; be communicated to the outside (e.g. in SIP and SDP messages), and in +; order to determine the correct value Asterisk needs to know: +; +; + whether it is talking to someone "inside" or "outside" of the NATted network. +; This is configured by assigning the "localnet" parameter with a list +; of network addresses that are considered "inside" of the NATted network. +; 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 when talking +; to a host outside the NAT. This information is derived by one of the +; following (mutually exclusive) config file parameters: +; +; a. "externaddr = hostname[:port]" specifies a static address[:port] to +; be used in SIP and SDP messages. +; The hostname is looked up only once, when [re]loading sip.conf . +; If a port number is not present, use the port specified in the "udpbindaddr" +; (which is not guaranteed to work correctly, because a NAT box might remap the +; port number as well as the address). +; This approach can be useful if you have a NAT device where you can +; configure the mapping statically. Examples: +; +; externaddr = 12.34.56.78 ; use this address. +; externaddr = 12.34.56.78:9900 ; use this address and port. +; externaddr = mynat.my.org:12600 ; Public address of my nat box. +; externtcpport = 9900 ; The externally mapped tcp port, when Asterisk is behind a static NAT or PAT. +; ; externtcpport will default to the externaddr or externhost port if either one is set. +; externtlsport = 12600 ; The externally mapped tls port, when Asterisk is behind a static NAT or PAT. +; ; externtlsport port will default to the RFC designated port of 5061. +; +; b. "externhost = hostname[:port]" is similar to "externaddr" except +; that the hostname is looked up every "externrefresh" seconds +; (default 10s). This can be useful when your NAT device lets you choose +; the port mapping, but the IP address is dynamic. +; Beware, you might suffer from service disruption when the name server +; resolution fails. Examples: +; +; externhost=foo.dyndns.net ; refreshed periodically +; externrefresh=180 ; change the refresh interval +; +; Note that at the moment all these mechanism work only for the SIP socket. +; The IP address discovered with externaddr/externhost is reused for +; media sessions as well, but the port numbers are not remapped so you +; may still experience problems. +; +; NOTE 1: in some cases, NAT boxes will use different port numbers in +; the internal<->external mapping. In these cases, the "externaddr" and +; "externhost" might not help you configure addresses properly. +; +; NOTE 2: when using "externaddr" or "externhost", the address part is +; also used as the external address for media sessions. Thus, the port +; information in the SDP may be wrong! +; +; In addition to the above, Asterisk has an additional "nat" parameter to +; address NAT-related issues in incoming SIP or media sessions. +; In particular, depending on the 'nat= ' settings described below, Asterisk +; may override the address/port information specified in the SIP/SDP messages, +; and use the information (sender address) supplied by the network stack instead. +; However, this is only useful if the external traffic can reach us. +; The following settings are allowed (both globally and in individual sections): +; +; 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 regardless +; ; of where the SDP says to send it. +; 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 +; +; The nat settings can be combined. For example, to set both force_rport and comedia +; one would set nat=force_rport,comedia. If any of the comma-separated options is 'no', +; Asterisk will ignore any other settings and set nat=no. If one of the "auto" settings +; is used in conjunction with its non-auto counterpart (nat=comedia,auto_comedia), then +; the non-auto option will be ignored. +; +; The RFC 3581-defined 'rport' parameter allows a client to request that Asterisk send +; SIP responses to it via the source IP and port from which the request originated +; instead of the address/port listed in the top-most Via header. This is useful if a +; client knows that it is behind a NAT and therefore cannot guess from what address/port +; its request will be sent. Asterisk will always honor the 'rport' parameter if it is +; sent. The force_rport setting causes Asterisk to always send responses back to the +; address/port from which it received requests; even if the other side doesn't support +; adding the 'rport' parameter. +; +; 'comedia RTP handling' refers to the technique of sending RTP to the port that the +; the other endpoint's RTP arrived from, and means 'connection-oriented media'. This is +; only partially related to RFC 4145 which was referred to as COMEDIA while it was in +; draft form. This method is used to accomodate endpoints that may be located behind +; NAT devices, and as such the address/port they tell Asterisk to send RTP packets to +; for their media streams is not the actual address/port that will be used on the nearer +; side of the NAT. +; +; IT IS IMPORTANT TO NOTE that if the nat setting in the general section differs from +; the nat setting in a peer definition, then the peer username will be discoverable +; by outside parties as Asterisk will respond to different ports for defined and +; undefined peers. For this reason it is recommended to ONLY DEFINE NAT SETTINGS IN THE +; GENERAL SECTION. Specifically, if nat=force_rport in one section and nat=no in the +; other, then valid peers with settings differing from those in the general section will +; be discoverable. +; +; In addition to these settings, Asterisk *always* uses 'symmetric RTP' mode as defined by +; RFC 4961; Asterisk will always send RTP packets from the same port number it expects +; to receive them on. +; +; The IP address used for media (audio, video, and text) in the SDP can also be overridden by using +; the media_address configuration option. This is only applicable to the general section and +; can not be set per-user or per-peer. +; +; media_address = 172.16.42.1 +; +; 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_sip 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 +; +; ICE/STUN/TURN usage can be enabled globally or on a per-peer basis using the icesupport +; configuration option. When set to yes ICE support is enabled. When set to no it is disabled. +; It is disabled by default. +; +; icesupport = yes + +;----------------------------------- MEDIA HANDLING -------------------------------- +; By default, Asterisk tries to re-invite media streams to an optimal path. If there's +; no reason for Asterisk to stay in the media path, the media will be redirected. +; 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. +; +;directmedia=yes ; Asterisk by default tries to redirect the + ; RTP media stream to go directly from + ; the caller to the callee. Some devices do not + ; support this (especially if one of them is behind a NAT). + ; The default setting is YES. If you have all clients + ; behind a NAT, or for some other reason want Asterisk to + ; stay in the audio path, you may want to turn this off. + + ; This setting also affect direct RTP + ; at call setup (a new feature in 1.4 - setting up the + ; call directly between the endpoints instead of sending + ; a re-INVITE). + + ; Additionally this option does not disable all reINVITE operations. + ; It only controls Asterisk generating reINVITEs for the specific + ; purpose of setting up a direct media path. If a reINVITE is + ; needed to switch a media stream to inactive (when placed on + ; hold) or to T.38, it will still be done, regardless of this + ; setting. Note that direct T.38 is not supported. + +;directmedia=nonat ; An additional option is to allow media path redirection + ; (reinvite) but only when the peer where the media is being + ; sent is known to not be behind a NAT (as the RTP core can + ; determine it based on the apparent IP address the media + ; arrives from). + +;directmedia=update ; Yet a third option... use UPDATE for media path redirection, + ; instead of INVITE. This can be combined with 'nonat', as + ; 'directmedia=update,nonat'. It implies 'yes'. + +;directmedia=outgoing ; When sending directmedia reinvites, do not send an immediate + ; reinvite on an incoming call leg. This option is useful when + ; peered with another SIP user agent that is known to send + ; immediate direct media reinvites upon call establishment. Setting + ; the option in this situation helps to prevent potential glares. + ; Setting this option implies 'yes'. + +;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up + ; the call directly with media peer-2-peer without re-invites. + ; 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 + ; callers INVITE. This will also fail if directmedia is enabled when + ; the device is actually behind NAT. + +;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 + ; (There is no default setting, this is just an example) + ; Use this if some of your phones are on IP addresses that + ; can not reach each other directly. This way you can force + ; RTP to always flow through asterisk in such cases. +;directmediaacl=acl_example ; Use named ACLs defined in acl.conf + +;ignoresdpversion=yes ; By default, Asterisk will honor the session version + ; number in SDP packets and will only modify the SDP + ; session if the version number changes. This option will + ; force asterisk to ignore the SDP session version number + ; and treat all SDP data as new data. This is required + ; for devices that send us non standard SDP packets + ; (observed with Microsoft OCS). By default this option is + ; off. + +;sdpsession=Asterisk PBX ; Allows you to change the SDP session name string, (s=) + ; Like the useragent parameter, the default user agent string + ; also contains the Asterisk version. +;sdpowner=root ; Allows you to change the username field in the SDP owner string, (o=) + ; This field MUST NOT contain spaces +;encryption=no ; Whether to offer SRTP encrypted media (and only SRTP encrypted media) + ; on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if + ; the peer does not support SRTP. Defaults to no. +;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. + ; This will cause all offers and answers to use AVPF (or SAVPF). This + ; option may be specified at the global or peer scope. +;force_avp=yes ; Force 'RTP/AVP', 'RTP/AVPF', 'RTP/SAVP', and 'RTP/SAVPF' to be used for + ; media streams when appropriate, even if a DTLS stream is present. +;----------------------------------------- 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 + ; 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 SIP UA registers successfully, the ip address, + ; the origination port, the registration period, and the username of + ; the UA will be set to database via realtime. + ; If not present, defaults to 'yes'. Note: realtime peers will + ; probably not function across reloads in the way that you expect, if + ; you turn this option off. +;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule + ; as if it had just registered? (yes|no|) + ; 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. + +;ignoreregexpire=yes ; Enabling this setting has two functions: + ; + ; For non-realtime peers, when their registration expires, the + ; information will _not_ be removed from memory or the Asterisk database + ; if you attempt to place a call to the peer, the existing information + ; will be used in spite of it having expired + ; + ; For realtime peers, when the peer is retrieved from realtime storage, + ; the registration information will be used regardless of whether + ; it has expired or not; if it expires while the realtime peer + ; is still in memory (due to caching or other reasons), the + ; information will not be removed from realtime storage + +;----------------------------------------- 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=[,] +; 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". + +;----------------------------------------------------------------------------------- + +[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 = :@ +; auth = #@ +; 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 +; +; SIP entities have a 'type' which determines their roles within Asterisk. +; * For entities with 'type=peer': +; Peers handle both inbound and outbound calls and are matched by ip/port, so for +; The case of incoming calls from the peer, the IP address must match in order for +; The invitation to work. This means calls made from either direction won't work if +; The peer is unregistered while host=dynamic or if the host is otherise not set to +; the correct IP of the sender. +; * For entities with 'type=user': +; Asterisk users handle inbound calls only (meaning they call Asterisk, Asterisk can't +; call them) and are matched by their authorization information (authname and secret). +; Asterisk doesn't rely on their IP and will accept calls regardless of the host setting +; as long as the incoming SIP invite authorizes successfully. +; * For entities with 'type=friend': +; Asterisk will create the entity as both a friend and a peer. Asterisk will accept +; calls from friends like it would for users, requiring only that the authorization +; matches rather than the IP address. Since it is also a peer, a friend entity can +; be called as long as its IP is known to Asterisk. In the case of host=dynamic, +; this means it is necessary for the entity to register before Asterisk can call it. +; +; 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 +; autoframing +; insecure +; trustrpid +; trust_id_outbound +; 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 +; keepalive +; defaultip +; defaultuser +; rtptimeout +; rtpholdtimeout +; sendrpid +; outboundproxy +; rfc2833compensate +; callbackextension +; 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, +; contactacl ; then call oneself, and get redirected to that +; ; same location). +; directmediapermit +; directmediadeny +; directmediaacl +; unsolicited_mailbox +; use_q850_reason +; maxforwards +; encryption +; description ; Used to provide a description of the peer in console output +; dtlsenable +; dtlsverify +; dtlsrekey +; dtlscertfile +; dtlsprivatekey +; dtlscipher +; dtlscafile +; dtlscapath +; dtlssetup +; dtlsfingerprint +; + +;------------------------------------------------------------------------------ +; 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 provided peer certificate and fingerprint are valid +; ; A value of 'yes' will perform both certificate and fingerprint verification +; ; A value of 'no' will perform no certificate or fingerprint verification +; ; A value of 'fingerprint' will perform ONLY fingerprint verification +; ; A value of 'certificate' will perform ONLY certficiate verification +; 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 = ; 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 +; dtlsfingerprint = sha-1 ; The hash to use for the fingerprint in SDP (valid options are sha-1 and sha-256) + +;[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 @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 + directmedia=no + host=dynamic + +[public-phone](!,basic-options) ; another template inheriting basic-options + directmedia=yes + +[my-codecs](!) ; a template for my preferred codecs + disallow=all + allow=ilbc + allow=g729 + allow=gsm + allow=g723 + allow=ulaw + ; Or, more simply: + ;allow=!all,ilbc,g729,gsm,g723,ulaw + +[ulaw-phone](!) ; and another one for ulaw-only + disallow=all + allow=ulaw + ; Again, more simply: + ;allow=!all,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 +;recordonfeature=dynamicfeature1 ; Feature to use when INFO with Record: on is received. +;recordofffeature=dynamicfeature2 ; Feature to use when INFO with Record: off is received. +;callerid=John Doe <1234> ; Full caller ID, to override the phones config + ; on incoming calls to Asterisk +;description=Courtesy Phone ; Description of the peer. Shown when doing 'sip show peers'. +;host=192.168.0.23 ; we have a static but private IP address + ; No registration allowed +;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 function CALLERPRES documentation for possible + ; values. + +;[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 +;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 +;namedcallgroup=engineering,sales,netgroup,protgroup ; We are in named call groups engineering,sales,netgroup,protgroup +;namedpickupgroup=sales ; We can do call pick-p for named call group sales +;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. +;acl=named_acl_example ; Use named ACLs defined in acl.conf + +;[cisco1] +;type=friend +;secret=blah +;qualify=200 ; Qualify peer is no more than 200ms away +;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. diff --git a/asterisk/sip_notify.conf b/asterisk/sip_notify.conf new file mode 100644 index 0000000..8224ee1 --- /dev/null +++ b/asterisk/sip_notify.conf @@ -0,0 +1,57 @@ +; rfc3842 +; put empty "Content=>" at the end to have CRLF after last body line + +[clear-mwi] +Event=>message-summary +Content-type=>application/simple-message-summary +Content=>Messages-Waiting: no +Content=>Message-Account: sip:asterisk@127.0.0.1 +Content=>Voice-Message: 0/0 (0/0) +Content=> + +; Aastra + +[aastra-check-cfg] +Event=>check-sync + +[aastra-xml] +Event=>aastra-xml + +; Digium + +[digium-check-cfg] +Event=>check-sync + +; Linksys + +[linksys-cold-restart] +Event=>reboot_now + +[linksys-warm-restart] +Event=>restart_now + +; Polycom + +[polycom-check-cfg] +Event=>check-sync + +; Sipura + +[sipura-check-cfg] +Event=>resync + +[sipura-get-report] +Event=>report + +; snom + +[snom-check-cfg] +Event=>check-sync\;reboot=false + +[snom-reboot] +Event=>check-sync\;reboot=true + +; Cisco + +[cisco-check-cfg] +Event=>check-sync diff --git a/asterisk/skinny.conf b/asterisk/skinny.conf new file mode 100644 index 0000000..d40823e --- /dev/null +++ b/asterisk/skinny.conf @@ -0,0 +1,191 @@ +; +; Skinny Configuration for Asterisk +; +[general] +bindaddr=0.0.0.0 ; Address to bind to +bindport=2000 ; Port to bind to, default tcp/2000 +dateformat=M-D-Y ; M,D,Y in any order (6 chars max) + ; "A" may also be used, but it must be at the end. + ; Use M for month, D for day, Y for year, A for 12-hour time. +keepalive=120 + +;authtimeout = 30 ; authtimeout specifies the maximum number of seconds a + ; client has to authenticate. If the client does not + ; authenticate beofre this timeout expires, the client + ; will be disconnected. (default: 30 seconds) + +;authlimit = 50 ; authlimit specifies the maximum number of + ; unauthenticated sessions that will be allowed to + ; connect at any given time. (default: 50) + +;vmexten=8500 ; Systemwide voicemailmain pilot number + ; It must be in the same context as the calling + ; device/line + +; If regcontext is specified, Asterisk will dynamically create and destroy a +; NoOp priority 1 extension for a given line which registers or unregisters with +; us and have a "regexten=" configuration item. +; Multiple contexts may be specified by separating them with '&'. The +; actual extension is the 'regexten' parameter of the registering line or its +; name if 'regexten' is not provided. If more than one context is provided, +; the context must be specified within regexten by appending the desired +; context after '@'. More than one regexten may be supplied if they are +; separated by '&'. Patterns may be used in regexten. +; +;regcontext=skinnyregistrations + +;allow=all ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization + ; for framing options +;disallow= + +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters. +;tos=cs3 ; Sets TOS for signaling packets. +;tos_audio=ef ; Sets TOS for RTP audio packets. +;tos_video=af41 ; Sets TOS for RTP video packets. +;cos=3 ; Sets 802.1p priority for signaling packets. +;cos_audio=5 ; Sets 802.1p priority for RTP audio packets. +;cos_video=4 ; Sets 802.1p priority for RTP video packets. + +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +;jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a + ; skinny 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 skinny channel can accept + ; jitter, thus a jitterbuffer on the receive skinny 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 skinny + ; 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 + ; skinny channel. Two implementations are currently available + ; - "fixed" (with size always equals to jbmaxsize) + ; - "adaptive" (with variable size, actually the new jb of IAX2). + ; Defaults to fixed. + +;jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +;----------------------------------------------------------------------------------- + +[lines] +;----------------------------------- LINES SECTION -------------------------------- +; Options set under [lines] apply to all lines unless explicitly set for a particular +; device. The options that can be set under lines are specified in GENERAL LINE OPTIONS. +; These options can also be set for each individual device as well as those under SPECIFIC +; LINE OPTIONS. +; +; Each label below [lines] in [] is a new line with the specific options specified below +; it. Config stops reading new lines when one of the following is found: [general], [devices] +; or the end of skinny.conf. +; +; Where options are common to both lines and devices, the results typically take that of +; the least permission. ie if a no is set for either line or device, the call will not be +; able to use that permission +;-------------------------------- GENERAL LINE OPTIONS ----------------------------- +;earlyrtp=1 ; whether audio signalling should be provided by asterisk +; ; (earlyrtp=1) or device generated (earlyrtp=0). default=yes +;transfer=1 ; whether the device is allowed to transfer. default=yes +;context=default ; context to use for this line. +;------------------------------- SPECIFIC LINE OPTIONS ----------------------------- +;setvar= ; allows for the setting of chanvars. +;----------------------------------------------------------------------------------- + +;[100] +;nat=yes +;callerid="Customer Support" <810-234-1212> +;mailbox=100 +;vmexten=8500 ; Device level voicemailmain pilot number +;regexten=100 +;context=inbound +;linelabel="Support Line" ; Displays next to the line + ; button on 7940's and 7960s +;[110] +;callerid="John Chambers" <408-526-4000> +;context=did +;regexten=110 +;linelabel="John" +;mailbox=110 + +;[120] +;Nothing set, so all the defaults are used + +;[500] +;nat=yes +;callerid="George W. Bush" <202-456-1414> +;setvar=CUSTID=5678 ; Channel variable to be set for all calls from 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. +;mailbox=500 +;callwaiting=yes +;transfer=yes +;threewaycalling=yes +;context=default +;mohinterpret=default ; This option specifies a default music on hold class to + ; use when put on hold if the channel's moh class was not + ; explicitly set with Set(CHANNEL(musicclass)=whatever) and + ; the peer channel did not suggest a class to use. +;mohsuggest=default ; This 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. + + +[devices] +;---------------------------------- DEVICES SECTION ------------------------------- +; Options set under [devices] apply to all devices unless explicitly set for a particular +; device. The options that can be set under devices are specified in GENERAL DEVICE OPTIONS. +; These options can also be set for each individual device as well as those under SPECIFIC +; DEVICE OPTIONS. +; +; Each label below [devices] in [] is a new device with the specific options specified below +; it. Config stop reading new devices when one of the following is found: [general], [lines] +; or the end of skinny.conf. +; +; Where options are common to both lines and devices, the results typically take that of +; the least permission. ie if a no is set for either line or device, the call will not be +; able to use that permission +;------------------------------- GENERAL DEVICE OPTIONS ---------------------------- +;earlyrtp=1 ; whether audio signalling should be provided by asterisk +; ; (earlyrtp=1) or device generated (earlyrtp=0). default=yes +;transfer=1 ; whether the device is allowed to transfer. default=yes +;------------------------------ SPECIFIC DEVICE OPTIONS ---------------------------- +;device="SEPxxxxxxxxxxxx ; id of the device. Must be set. +;version=P002G204 ; firmware version to be loaded. If this version is different +; ; to the one on the device, the device will try to load this +; ; version from the tftp server. Set to device firmware version. +;----------------------------------------------------------------------------------- + +; Typical config for 12SP+ +;[florian] +;device=SEP00D0BA847E6B +;version=P002G204 ; Thanks critch +;context=did +;directmedia=yes ; Allow media to go directly between two RTP endpoints. +;line=120 ; Dial(Skinny/120@florian) + +; Typical config for a 7910 +;[duba] ; Device name +;device=SEP0007EB463101 ; Official identifier +;version=P002F202 ; Firmware version identifier +;host=192.168.1.144 +;permit=192.168.0/24 ; Optional, used for authentication +;line=500 + + +; Typical config for a 7940 with dual 7914s +;[support] +;device=SEP0007EB463121 +;line=100 +;line=110 +;speeddial => 111,Jack Smith ; Adds a speeddial button to a device. +;speeddial => 112@hints,Bob Peterson ; When a context is specified, the speeddial watches a dialplan hint. +;addon => 7914 +;addon => 7914 + diff --git a/asterisk/sla.conf b/asterisk/sla.conf new file mode 100644 index 0000000..b5e1ef6 --- /dev/null +++ b/asterisk/sla.conf @@ -0,0 +1,151 @@ +; +; Configuration for Shared Line Appearances (SLA). +; +; See http://wiki.asterisk.org or doc/AST.pdf for more information. +; + +; ---- General Options ---------------- +[general] + +;attemptcallerid=no ; Attempt CallerID handling. The default value for this + ; is "no" because CallerID handling with an SLA setup is + ; known to not work properly in some situations. However, + ; feel free to enable it if you would like. If you do, and + ; you find problems, please do not report them. +; ------------------------------------- + + +; ******************************** +; **** Configuration Ordering **** +; ******************************** + +; Note that SLA configuration processing assumes that *all* trunk declarations are +; listed in the configuration file before any stations. + +; ******************************** +; ******************************** + + +; ---- Trunk Declarations ------------- +; +;[line1] ; Provide a name for this trunk. + +;type=trunk ; This line is what marks this entry as a trunk. + +;device=DAHDI/3 ; Map this trunk declaration to a specific device. + ; NOTE: You can not just put any type of channel here. + ; DAHDI channels can be directly used. IP trunks + ; require some indirect configuration which is + ; described in + ; https://wiki.asterisk.org/wiki/display/AST/SLA+Trunk+Configuration + +;autocontext=line1 ; This supports automatic generation of the dialplan entries + ; if the autocontext option is used. Each trunk should have + ; a unique context name. Then, in chan_dahdi.conf, this device + ; should be configured to have incoming calls go to this context. + +;ringtimeout=30 ; Set how long to allow this trunk to ring on an inbound call before hanging + ; it up as an unanswered call. The value is in seconds. + +;barge=no ; If this option is set to "no", then no station will be + ; allowed to join a call that is in progress. The default + ; value is "yes". + +;hold=private ; This option configure hold permissions for this trunk. + ; "open" - This means that any station can put this trunk + ; on hold, and any station can retrieve it from + ; hold. This is the default. + ; "private" - This means that once a station puts the + ; trunk on hold, no other station will be + ; allowed to retrieve the call from hold. + +;[line2] +;type=trunk +;device=DAHDI/4 +;autocontext=line2 + +;[line3] +;type=trunk +;device=DAHDI/3 +;autocontext=line3 + +;[line4] +;type=trunk +;device=Local/disa@line4_outbound ; A Local channel in combination with the Disa + ; application can be used to support IP trunks. + ; See https://wiki.asterisk.org/wiki/display/AST/SLA+Trunk+Configuration +;autocontext=line4 +; -------------------------------------- + + +; ---- Station Declarations ------------ + +;[station1] ; Define a name for this station. + +;type=station ; This line indicates that this entry is a station. + +;device=SIP/station1 ; Each station must be mapped to a device. + +;autocontext=sla_stations ; This supports automatic generation of the dialplan entries if + ; the autocontext option is used. All stations can use the same + ; context without conflict. The device for this station should + ; have its context configured to the same one listed here. + +;ringtimeout=10 ; Set a timeout for how long to allow the station to ring for an + ; incoming call, in seconds. + +;ringdelay=10 ; Set a time for how long to wait before beginning to ring this station + ; once there is an incoming call, in seconds. + +;hold=private ; This option configure hold permissions for this station. Note + ; that if private hold is set in the trunk entry, that will override + ; anything here. However, if a trunk has open hold access, but this + ; station is set to private hold, then the private hold will be in + ; effect. + ; "open" - This means that once this station puts a call + ; on hold, any other station is allowed to retrieve + ; it. This is the default. + ; "private" - This means that once this station puts a + ; call on hold, no other station will be + ; allowed to retrieve the call from hold. + + +;trunk=line1 ; Individually list all of the trunks that will appear on this station. This + ; order is significant. It should be the same order as they appear on the + ; phone. The order here defines the order of preference that the trunks will + ; be used. +;trunk=line2 +;trunk=line3,ringdelay=5 ; A ring delay for the station can also be specified for a specific trunk. + ; If a ring delay is specified both for the whole station and for a specific + ; trunk on a station, the setting for the specific trunk will take priority. + ; This value is in seconds. + +;trunk=line4,ringtimeout=5 ; A ring timeout for the station can also be specified for a specific trunk. + ; If a ring timeout is specified both for the whole station and for a specific + ; trunk on a station, the setting for the specific trunk will take priority. + ; This value is in seconds. + + +;[station](!) ; When there are a lot of stations that are configured the same way, + ; it is convenient to use a configuration template like this so that + ; the common settings stay in one place. +;type=station +;autocontext=sla_stations +;trunk=line1 +;trunk=line2 +;trunk=line3 +;trunk=line4 + +;[station2](station) ; Define a station that uses the configuration from the template "station". +;device=SIP/station2 +; +;[station3](station) +;device=SIP/station3 +; +;[station4](station) +;device=SIP/station4 +; +;[station5](station) +;device=SIP/station5 +; -------------------------------------- + diff --git a/asterisk/smdi.conf b/asterisk/smdi.conf new file mode 100644 index 0000000..cca0a5c --- /dev/null +++ b/asterisk/smdi.conf @@ -0,0 +1,75 @@ +; Asterisk SMDI configuration + +[interfaces] +; Specify serial ports to listen for SMDI messages on below. These will be +; referenced later in chan_dahdi.conf. If you do not specify any interfaces +; then SMDI will be disabled. Interfaces can have several different attributes +; associated with them. + +; Set the number of stop bits to use per character here. The default is no, +; in which case one stop bit will be used. + +;twostopbits = no + +; Character size or bit length is the size of each character sent across the +; link. Character size can be 7 or 8. The default is 7. + +;charsize = 7 + +; If you need parity checking enabled you can turn it on here. Acceptable +; values are even, odd, and none. The default is even. + +;paritybit = even + +; The baudrate to use for this port. Acceptable values are 1200, 2400, 4800, +; and 9600. The default is 9600. + +;baudrate = 1200 + +; Often the numbering scheme for a set of mailboxes or extensions will not be 7 +; or 10 digits (as SMDI requires). Use the msdstrip option to strip unused +; digits from the start of numbers. + +;msdstrip = 0 + +; Occasionally Asterisk and the SMDI switch may become out of sync. If this +; happens, Asterisk will appear one or several calls behind as it processes +; voicemail requests. To prevent this from happening, adjust the msgexpirytime. +; This will make Asterisk discard old SMDI messages that have not yet been +; processed. The default expiry time is 30000 milliseconds. + +;msgexpirytime = 30000 + +;smdiport => /dev/ttyS0 + + +[mailboxes] +; This section configures parameters related to MWI handling for the SMDI link. + +; This option configures the polling interval used to check to see if the +; mailboxes have any new messages. This option is specified in seconds. +; The default value is 10 seconds. +; +;pollinginterval=10 + +; Every other entry in this section of the configuration file is interpreted as +; a mapping between the mailbox ID on the SMDI link, and the local Asterisk +; mailbox name. In many cases, they are the same thing, but they still must be +; listed here so that this module knows which mailboxes it needs to pay +; attention to. +; +; Syntax: +; =[@Asterisk Voicemail Context] +; +; If no Asterisk voicemail context is specified, "default" will be assumed. +; +; Before specifying mailboxes, you must specify an SMDI interface. All mailbox +; definitions that follow will correspond to that SMDI interface. If you specify +; another interface, then all definitions following that will correspond to the +; new interface. +; +;smdiport=/dev/ttyS0 +;2565551234=1234@vmcontext1 +;2565555678=5678@vmcontext2 +;smdiport=/dev/ttyS1 +;2565559999=9999 diff --git a/asterisk/telcordia-1.adsi b/asterisk/telcordia-1.adsi new file mode 100644 index 0000000..1486aa9 --- /dev/null +++ b/asterisk/telcordia-1.adsi @@ -0,0 +1,83 @@ +; +; Asterisk default ADSI script +; +; +; Begin with the preamble requirements +; +DESCRIPTION "Telcordia Demo" ; Name of vendor +VERSION 0x02 ; Version of stuff +;SECURITY "_AST" ; Security code +SECURITY 0x0000 ; Security code +FDN 0x0000000f ; Descriptor number + +; +; Predefined strings +; +DISPLAY "talkingto" IS "Talking To" "$Call1p" WRAP +DISPLAY "titles" IS "20th Century IQ Svc" +DISPLAY "newcall" IS "New Call From" "$Call1p" WRAP +DISPLAY "ringing" IS "Ringing" + +; +; Begin state definitions +; +STATE "callup" ; Call is currently up +STATE "inactive" ; No active call + +; +; Begin soft key definitions +; +KEY "CB_OH" IS "Block" OR "Call Block" + OFFHOOK + VOICEMODE + WAITDIALTONE + SENDDTMF "*60" + SUBSCRIPT "offHook" +ENDKEY + +KEY "CB" IS "Block" OR "Call Block" + SENDDTMF "*60" +ENDKEY + +; +; Begin main subroutine +; + +SUB "main" IS + IFEVENT NEARANSWER THEN + CLEAR + SHOWDISPLAY "talkingto" AT 1 + GOTO "stableCall" + ENDIF + IFEVENT OFFHOOK THEN + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "CB" + GOTO "offHook" + ENDIF + IFEVENT IDLE THEN + CLEAR + SHOWDISPLAY "titles" AT 1 + SHOWKEYS "CB_OH" + ENDIF + IFEVENT CALLERID THEN + CLEAR + SHOWDISPLAY "newcall" AT 1 + ENDIF +ENDSUB + +SUB "offHook" IS + IFEVENT FARRING THEN + CLEAR + SHOWDISPLAY "ringing" AT 1 + ENDIF + IFEVENT FARANSWER THEN + CLEAR + SHOWDISPLAY "talkingto" AT 1 + GOTO "stableCall" + ENDIF +ENDSUB + +SUB "stableCall" IS + +ENDSUB diff --git a/asterisk/udptl.conf b/asterisk/udptl.conf new file mode 100644 index 0000000..1d635da --- /dev/null +++ b/asterisk/udptl.conf @@ -0,0 +1,26 @@ +; +; UDPTL Configuration (UDPTL is one of the transports for T.38) +; +[general] +; +; UDPTL start and UDPTL end configure start and end addresses +; +udptlstart=4000 +udptlend=4999 +; +; Whether to enable or disable UDP checksums on UDPTL traffic +; +;udptlchecksums=no +; +; The number of error correction entries in a UDPTL packet +; +udptlfecentries = 3 +; +; The span over which parity is calculated for FEC in a UDPTL packet +; +udptlfecspan = 3 +; +; Some VoIP providers will only accept an offer with an even-numbered +; UDPTL port. Set this option so that Asterisk will only attempt to use +; even-numbered ports when negotiating T.38. Default is no. +use_even_ports = no diff --git a/asterisk/unistim.conf b/asterisk/unistim.conf new file mode 100644 index 0000000..44d6e3e --- /dev/null +++ b/asterisk/unistim.conf @@ -0,0 +1,86 @@ +; +; chan_unistim configuration file. +; + +[general] +port=5000 ; UDP port +; +; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters. +;tos=cs3 ; Sets TOS for signaling packets. +;tos_audio=ef ; Sets TOS for RTP audio packets. +;cos=3 ; Sets 802.1p priority for signaling packets. +;cos_audio=5 ; Sets 802.1p priority for RTP audio packets. +; +;debug=yes ; Enable debug (default no) +;keepalive=120 ; in seconds, default = 120 +;public_ip= ; if asterisk is behind a nat, specify your public IP +;autoprovisioning=no ; Allow undeclared phones to register an extension. See README for important + ; informations. no (default), yes, tn. +;mohsuggest=default +;------------------------------ 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. + +; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +;----------------------------------------------------------------------------------- + + +;[black] ; name of the device +;device=000ae4012345 ; mac address of the phone +;rtp_port=10000 ; RTP port used by the phone, default = 10000. RTCP = rtp_port+1 +;rtp_method=0 ; If you don't have sound, you can try 1, 2 or 3, default = 0 + ; value 3 works on newer i2004, 1120E and 1140E +;status_method=0 ; If you don't see status text, try 1, default = 0 + ; value 1 works on 1120E and 1140E +;titledefault=Asterisk ; default = "TimeZone (your time zone)". 12 characters max +;height=3 ; default = 3, the number of display lines the device can show + ; For example on a Nortel I2001 or I2002, set this to 1 +;maintext0="you can insert" ; default = "Welcome", 24 characters max +;maintext1="a custom text" ; default = the name of the device, 24 characters max +;maintext2="(main page)" ; default = the public IP of the phone, 24 characters max +;dateformat=1 ; 0 = month/day, 1 (default) = day/month +;timeformat=1 ; 0 = 0:00am ; 1 (default) = 0h00, 2 = 0:00 +;contrast=8 ; define the contrast of the LCD. From 0 to 15. Default = 8 +;country=us ; country (ccTLD) for dial tone frequency. See README, default = us +;ringvolume=2 ; ring volume : 0,1,2,3, can be overrided by Dial(), default = 2 +;ringstyle=3 ; ring style : 0 to 7, can be overrided by Dial(), default = 3 +;cwvolume=2 ; ring volume : 0,1,2,3, default = 0 +;cwstyle=3 ; ring style : 0 to 7, default = 2 +;sharpdial=1 ; dial number by pressing #, default = 0 +;interdigit_timer=4000 ; timer for automatic dial after several digits of number entered (in ms, 0 is off) +;callhistory=1 ; 0 = disable, 1 = enable call history, default = 1 +;callerid="Customer Support" <555-234-5678> +;context=default ; context, default="default" +;mailbox=1234 ; Specify the mailbox number. Used by Message Waiting Indication +;linelabel="Support" ; Softkey label for the next line=> entry, 9 char max. +;extension=none ; Add an extension into the dialplan. Only valid in context specified previously. + ; none=don't add (default), ask=prompt user, line=use the line number +;line => 100 ; Any number of lines can be defined in any order with bookmarks +;line => 200 ; After line defined it placed in next available slot +;bookmark=Hans C.@123 ; Use a softkey to dial 123. Name : 9 char max +;bookmark=Mailbox@011@54 ; 54 shows a mailbox icon. See #define FAV_ICON_ for other values (32 to 63) +;bookmark=Test@*@USTM/violet ; Display an icon if violet is connected (dynamic), only for unistim device +;bookmark=4@Pager@54321@51 ; Display a pager icon and dial 54321 when softkey 4 is pressed + +;[violet] +;device=006038abcdef +;line => 102 diff --git a/asterisk/users.conf b/asterisk/users.conf new file mode 100644 index 0000000..50b80a1 --- /dev/null +++ b/asterisk/users.conf @@ -0,0 +1,114 @@ +; +; User configuration +; +; Creating entries in users.conf is a "shorthand" for creating individual +; entries in each configuration file. Using users.conf is not intended to +; provide you with as much flexibility as using the separate configuration +; files (e.g. sip.conf, iax.conf, etc) but is intended to accelerate the +; simple task of adding users. Note that creating individual items (e.g. +; custom SIP peers, IAX friends, etc.) will allow you to override specific +; parameters within this file. Parameter names here are the same as they +; appear in the other configuration files. There is no way to change the +; value of a parameter here for just one subsystem. +; + +[general] +; +; Full name of a user +; +fullname = New User +; +; Starting point of allocation of extensions +; +userbase = 6000 +; +; Create voicemail mailbox and use use macro-stdexten +; +hasvoicemail = yes +; +; Set voicemail mailbox 6000 password to 1234 +; +vmsecret = 1234 +; +; Create SIP Peer +; +hassip = yes +; +; Create IAX friend +; +hasiax = yes +; +; Create H.323 friend +; +;hash323 = yes +; +; Create manager entry +; +hasmanager = no +; +; Set permissions for manager entry (see manager.conf.sample for documentation) +; (defaults to *all* permissions) +;managerread = system,call,log,verbose,command,agent,user,config +;managerwrite = system,call,log,verbose,command,agent,user,config +; +; +; MAC Address for res_phoneprov +; +;macaddress = 112233445566 +; +; Auto provision the phone with res_phoneprov +; +;autoprov = yes +; +; Line Keys for hardphone +; +;LINEKEYS = 1 +; +; Line number for hardphone +; +;linenumber = 1 +; +; Local Caller ID number used with res_phoneprov and Asterisk GUI +; +;cid_number = 6000 +; +; Remaining options are not specific to users.conf entries but are general. +; +callwaiting = yes +threewaycalling = yes +callwaitingcallerid = yes +transfer = yes +canpark = yes +cancallforward = yes +callreturn = yes +callgroup = 1 +pickupgroup = 1 +;nat = no + +;[6000] +;fullname = Joe User +;description = Courtesy Phone In Lobby ; Used to provide a description of the + ; peer in console output +;email = joe@foo.bar +;secret = 1234 +;dahdichan = 1 +;hasvoicemail = yes +;vmsecret = 1234 +;hassip = yes +;hasiax = no +;hash323 = no +;hasmanager = no +;callwaiting = no +;context = international +; +; Some administrators choose alphanumeric extensions, but still want their +; users to be reachable by traditional numeric extensions, specified by the +; alternateexts entry. +; +;alternateexts = 7057,3249 +;macaddress = 112233445566 +;autoprov = yes +;LINEKEYS = 1 +;linenumber = 1 +;cid_number = 6000 + diff --git a/asterisk/voicemail.conf b/asterisk/voicemail.conf new file mode 100644 index 0000000..e63553b --- /dev/null +++ b/asterisk/voicemail.conf @@ -0,0 +1,456 @@ +; +; Voicemail Configuration +; + +; +; NOTE: Asterisk has to edit this file to change a user's password. This does +; not currently work with the "#include " directive for Asterisk +; configuration files, nor when using realtime static configuration. +; Do not use them with this configuration file. +; + +[general] +; Formats for writing Voicemail. Note that when using IMAP storage for +; voicemail, only the first format specified will be used. +;format=g723sf|wav49|wav +format=wav49|gsm|wav +; +; WARNING: +; If you change the list of formats that you record voicemail in +; when you have mailboxes that contain messages, you _MUST_ absolutely +; manually go through those mailboxes and convert/delete/add the +; the message files so that they appear to have been stored using +; your new format list. If you don't do this, very unpleasant +; things may happen to your users while they are retrieving and +; manipulating their voicemail. +; +; In other words: don't change the format list on a production system +; unless you are _VERY_ sure that you know what you are doing and are +; prepared for the consequences. +; +; Who the e-mail notification should appear to come from +serveremail=asterisk +;serveremail=asterisk@linux-support.net +; Should the email contain the voicemail as an attachment +attach=yes +; Maximum number of messages per folder. If not specified, a default value +; (100) is used. Maximum value for this option is 9999. If set to 0, a +; mailbox will be greetings-only. +;maxmsg=100 +; Maximum length of a voicemail message in seconds +;maxsecs=180 +; Minimum length of a voicemail message in seconds for the message to be kept +; The default is no minimum. +;minsecs=3 +; Maximum length of greetings in seconds +;maxgreet=60 +; How many milliseconds to skip forward/back when rew/ff in message playback +skipms=3000 +; How many seconds of silence before we end the recording +maxsilence=10 +; Silence threshold (what we consider silence: the lower, the more sensitive) +silencethreshold=128 +; Max number of failed login attempts +maxlogins=3 +; +; Move heard messages to the 'Old' folder automagically. Defaults to on. +;moveheard=yes +; +; Forward an urgent message as an urgent message. Defaults to no so +; sender can set the urgency on the envelope of the forwarded message. +;forward_urgent_auto=no +; +; User context is where entries from users.conf are registered. The +; default value is 'default' +; +;userscontext=default +; +; If you need to have an external program, i.e. /usr/bin/myapp +; called when a voicemail is left, delivered, or your voicemailbox +; is checked, uncomment this. +;externnotify=/usr/bin/myapp + +; If you would also like to enable SMDI notification then set smdienable to yes. +; You will also need to make sure smdiport is set to a valid port as specified in +; smdi.conf. +;smdienable=yes +;smdiport=/dev/ttyS0 + +; If you need to have an external program, i.e. /usr/bin/myapp +; called when a voicemail password is changed, uncomment this. The +; arguments passed to the application are: +; Note: If this is set, the password will NOT be changed in voicemail.conf +; If you would like to also change the password in voicemail.conf, use +; the externpassnotify option below instead. +;externpass=/usr/bin/myapp +;externpassnotify=/usr/bin/myapp + +; If you would like to have an external program called when a user changes the +; voicemail password for the purpose of doing validation on the new password, +; then use this option. The script can decide whether or not the new password +; meets minimum password strength requirements before the Voicemail application +; accepts the password. If the script decides that the password is not acceptable, +; the user will be informed that the new password does not meet minimum password +; requirements, and they will be asked to enter another password. +; +; The arguments passed to this script are . +; +; The script should print "VALID" to stdout to indicate that the new password +; is acceptable. If the password is considered too weak, the script should print +; "INVALID" to stdout. +; +; There is an example script in the contrib/scripts/ directory, voicemailpwcheck.py, +; which implements some basic password checking, and can be used as a starting point +; for use with this option. +; +;externpasscheck=/usr/local/bin/voicemailpwcheck.py + +; For the directory, you can override the intro file if you want +;directoryintro=dir-intro +; The character set for voicemail messages can be specified here +; default: ISO-8859-1 +;charset=UTF-8 +; The ADSI feature descriptor number to download to +;adsifdn=0000000F +; The ADSI security lock code +;adsisec=9BDBF7AC +; The ADSI voicemail application version number. +;adsiver=1 +; Skip the "[PBX]:" string from the message title +;pbxskip=yes +; Change the From: string +;fromstring=The Asterisk PBX +; Permit finding entries for forward/compose from the directory +;usedirectory=yes +; Voicemail can be stored in a database using the ODBC driver. +; The value of odbcstorage is the database connection configured +; in res_odbc.conf. +;odbcstorage=asterisk +; The default table for ODBC voicemail storage is voicemessages. +;odbctable=voicemessages +; +; Change the from, body and/or subject, variables: +; VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM, +; VM_CIDNAME, VM_DATE +; Additionally, on forwarded messages, you have the variables: +; ORIG_VM_CALLERID, ORIG_VM_CIDNUM, ORIG_VM_CIDNAME, ORIG_VM_DATE +; You can select between two variables by using dialplan functions, e.g. +; ${IF(${ISNULL(${ORIG_VM_DATE})}?${VM_DATE}:${ORIG_VM_DATE})} +; +; Note: The emailbody config row can only be up to 512 characters due to a +; limitation in the Asterisk configuration subsystem. +;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX} +; The following definition is very close to the default, but the default shows +; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown +; caller", if they are both null. +;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n +; +; Note: ${IF()} strips spacing at the beginning and end of its true and false +; values, so a newline cannot be placed at either location. The word 'so' is +; therefore duplicated, in order for the newline to be interpreted correctly. +;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just ${IF($["${VM_CIDNUM}" = "${ORIG_VM_CIDNUM}"]?left:forwarded)} a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE},\n${IF($["${VM_CIDNUM}" = "${ORIG_VM_CIDNUM}"]?so:(originally sent by ${ORIG_VM_CALLERID} on ${ORIG_VM_DATE})\nso)} you might want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n +; +; You can also change the Pager From: string, the pager body and/or subject. +; The above defined variables also can be used here +;pagerfromstring=The Asterisk PBX +;pagersubject=New VM +;pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE} +; +; Set the date format on outgoing mails. Valid arguments can be found on the +; strftime(3) man page +; +; Default +emaildateformat=%A, %B %d, %Y at %r +; 24h date format +;emaildateformat=%A, %d %B %Y at %H:%M:%S +; +; Default for pager use +pagerdateformat=%A, %B %d, %Y at %r +; Short 24h date format for pager use +;pagerdateformat=%T %D +; +; Using the mailcmd option, you can specify what command is called for +; outbound E-mail. The default is shown below. +; +;mailcmd=/usr/sbin/sendmail -t +; +;pollmailboxes=no ; If mailboxes are changed anywhere outside of app_voicemail, +; ; then this option must be enabled for MWI to work. This +; ; enables polling mailboxes for changes. Normally, it will +; ; expect that changes are only made when someone called in +; ; to one of the voicemail applications. +; ; Examples of situations that would require this option are +; ; web interfaces to voicemail or an email client in the case +; ; of using IMAP storage. +; ; Default: no +;pollfreq=30 ; If the "pollmailboxes" option is enabled, this option +; ; sets the polling frequency. The default is once every +; ; 30 seconds. +; + +; ----------------------------------------------------------------------------- +; IMAP configuration settings only +; These settings are only applicable when Asterisk is compiled with IMAP support. +; +;imapgreetings=no ; If using IMAP storage, specify whether voicemail greetings + ; should be stored via IMAP. If no, then greetings are stored + ; as if IMAP storage were not enabled. +;greetingsfolder=INBOX ; If imapgreetings=yes, then specify which folder to store + ; your greetings in. If you do not specify a folder, then INBOX + ; will be used +;imapparentfolder=INBOX ; Some IMAP server implementations store folders under INBOX + ; instead of using a top level folder (ex. INBOX/Friends). In + ; this case, user imapparentfolder to set the parent folder. For + ; example, Cyrus IMAP does NOT use INBOX as the parent. Default + ; is to have no parent folder set. +;imapserver=localhost ; The address of the IMAP server +;imapport=143 ; The port of the IMAP server +;imapflags=ssl ; Optional flags to pass to the IMAP server in the IMAP mailbox + ; name. For example, setting this to 'ssl' will enable OpenSSL + ; encryption, assuming the IMAP libraries were compiled with + ; OpenSSL support. +;imapfolder=INBOX ; The folder in which to store voicemail messages on the IMAP + ; server. By default, they are stored in INBOX. +;authuser=user ; The master user to use for connecting to the IMAP server, if + ; the server is configured with a single user that has access to + ; all mailboxes +;authpassword=password ; The password for the authuser, if used +;imapopentimeout=60 ; The TCP open timeout (in seconds) +;imapclosetimeout=60 ; The TCP close timeout (in seconds) +;imapreadtimeout=60 ; The TCP read timeout (in seconds) +;imapwritetimeout=60 ; The TCP write timeout (in seconds) + +; ----------------------------------------------------------------------------- +; + +; Each mailbox is listed in the form =,,,, +; if the e-mail is specified, a message will be sent when a message is +; received, to the given mailbox. If pager is specified, a message will be +; sent there as well. If the password is prefixed by '-', then it is +; considered to be unchangeable. +; +; Advanced options example is extension 4069 +; NOTE: All options can be expressed globally in the general section, and +; overridden in the per-mailbox settings, unless listed otherwise. +; +; tz=central ; Timezone from zonemessages below. Irrelevant if envelope=no. +; locale=de_DE.UTF-8 ; set the locale for generation of the date/time strings (make + ; sure the locales are installed in your operating system; e.g + ; on Debian Linux you can use "dpkg-reconfigure locales"). + ; If you use UTF-8 locales, make sure to set the "charset" option + ; to UTF-8 too. If you mix different locales for different users + ; you should avoid words in the emaildateformat specification, e.g.: + ; emaildateformat=%A, %d %B %Y, %H:%M:%S +; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email +; attachfmt=wav49 ; Which format to attach to the email. Normally this is the + ; first format specified in the format parameter above, but this + ; option lets you customize the format sent to particular mailboxes. + ; Useful if Windows users want wav49, but Linux users want gsm. + ; [per-mailbox only] +; saycid=yes ; Say the caller id information before the message. If not described, + ; or set to no, it will be in the envelope. When enabled, if a recorded file + ; with the same name as the caller id exists in + ; /recordings/callerids, then that file will be played as a name + ; rather than saying each digit as a phone number. +; cidinternalcontexts=intern ; Internal Context for Name Playback instead of + ; extension digits when saying caller id. +; sayduration=no ; Turn on/off the duration information before the message. [ON by default] +; saydurationm=2 ; Specify the minimum duration to say. Default is 2 minutes +; dialout=fromvm ; Context to dial out from [option 4 from mailbox's advanced menu]. + ; If not specified, option 4 will not be listed and dialing out + ; from within VoiceMailMain() will not be permitted. +sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside + ; VoiceMailMain() [option 5 from mailbox's advanced menu]. + ; If set to 'no', option 5 will not be listed. +; searchcontexts=yes ; Current default behavior is to search only the default context + ; if one is not specified. The older behavior was to search all contexts. + ; This option restores the old behavior [DEFAULT=no] + ; Note: If you have this option enabled, then you will be required to have + ; unique mailbox names across all contexts. Otherwise, an ambiguity is created + ; since it is impossible to know which mailbox to retrieve when one is requested. +; callback=fromvm ; Context to call back from + ; if not listed, calling the sender back will not be permitted +; exitcontext=fromvm ; Context to go to on user exit such as * or 0 + ; The default is the current context. +; review=yes ; Allow sender to review/rerecord their message before saving it [OFF by default +; operator=yes ; Allow sender to hit 0 before/after/during leaving a voicemail to + ; reach an operator. This option REQUIRES an 'o' extension in the + ; same context (or in exitcontext, if set), as that is where the + ; 0 key will send you. [OFF by default] +; envelope=no ; Turn on/off envelope playback before message playback. [ON by default] + ; This does NOT affect option 3,3 from the advanced options menu +; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only] + ; This is intended for use with users who wish to receive their + ; voicemail ONLY by email. Note: "deletevoicemail" is provided as an + ; equivalent option for Realtime configuration. +; volgain=0.0 ; Emails bearing the voicemail may arrive in a volume too + ; quiet to be heard. This parameter allows you to specify how + ; much gain to add to the message when sending a voicemail. + ; NOTE: sox must be installed for this option to work. +; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message. +; forcename=yes ; Forces a new user to record their name. A new user is + ; determined by the password being the same as + ; the mailbox number. The default is "no". +; forcegreetings=no ; This is the same as forcename, except for recording + ; greetings. The default is "no". +; hidefromdir=yes ; Hide this mailbox from the directory produced by app_directory + ; The default is "no". +; tempgreetwarn=yes ; Remind the user that their temporary greeting is set + +; passwordlocation=spooldir + ; Usually the voicemail password (vmsecret) is stored in + ; this configuration file. By setting this option you can + ; specify where Asterisk should read/write the vmsecret. + ; Supported options: + ; voicemail.conf: + ; This is the default option. The secret is read from + ; and written to voicemail.conf (or users.conf). + ; spooldir: + ; The secret is stored in a separate file in the user's + ; voicemail spool directory in a file named secret.conf. + ; Please ensure that normal Linux users are not + ; permitted to access Asterisk's spool directory as the + ; secret is stored in plain text. If a secret is not + ; found in this directory, the password in + ; voicemail.conf (or users.conf) will be used. + ; Note that this option does not affect password storage for + ; realtime users, which are still stored in the realtime + ; backend. +; messagewrap=no ; Enable next/last message to wrap around to + ; first (from last) and last (from first) message + ; The default is "no". +; minpassword=0 ; Enforce minimum password length + +; vm-password=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: "password" +; vm-newpassword=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: "Please enter your new password followed by + ; the pound key." +; vm-passchanged=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: "Your password has been changed." +; vm-reenterpassword=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: "Please re-enter your password followed by + ; the pound key" +; vm-mismatch=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: "The passwords you entered and re-entered + ; did not match." +; vm-invalid-password=custom_sound + ; Customize which sound file is used instead of the default + ; prompt that says: ... +; vm-pls-try-again=custom_sound + ; Customize which sound file is used instead of the + ; default prompt that says "Please try again." +; vm-prepend-timeout=custom_sound + ; Customize which sound file is used when the user + ; times out while recording a prepend message instead + ; of the default prompt that says "then press pound" + ; note that this will currently follow vm-pls-try-again. + ; this behavior is subject to change in the near future. +; listen-control-forward-key=# ; Customize the key that fast-forwards message playback +; listen-control-reverse-key=* ; Customize the key that rewinds message playback +; listen-control-pause-key=0 ; Customize the key that pauses/unpauses message playback +; listen-control-restart-key=2 ; Customize the key that restarts message playback +; listen-control-stop-key=13456789 ; Customize the keys that interrupt message playback, probably all keys not set above + +; Maximum number of messages allowed in the 'Deleted' folder. If set to 0 +; or no then no deleted messages will be moved. If non-zero (max 9999) then up +; to this number of messages will be automagically saved when they are +; 'deleted' on a FIFO basis. +; defaults to being off +; backupdeleted=100 + + +[zonemessages] +; Users may be located in different timezones, or may have different +; message announcements for their introductory message when they enter +; the voicemail system. Set the message and the timezone each user +; hears here. Set the user into one of these zones with the tz= attribute +; in the options field of the mailbox. Of course, language substitution +; still applies here so you may have several directory trees that have +; alternate language choices. +; +; Look in /usr/share/zoneinfo/ for names of timezones. +; Look at the manual page for strftime for a quick tutorial on how the +; variable substitution is done on the values below. +; +; Supported values: +; 'filename' filename of a soundfile (single ticks around the filename +; required) +; ${VAR} variable substitution +; A or a Day of week (Saturday, Sunday, ...) +; B or b or h Month name (January, February, ...) +; d or e numeric day of month (first, second, ..., thirty-first) +; Y Year +; I or l Hour, 12 hour clock +; H Hour, 24 hour clock (single digit hours preceded by "oh") +; k Hour, 24 hour clock (single digit hours NOT preceded by "oh") +; M Minute, with 00 pronounced as "o'clock" +; N Minute, with 00 pronounced as "hundred" (US military time) +; P or p AM or PM +; Q "today", "yesterday" or ABdY +; (*note: not standard strftime value) +; q "" (for today), "yesterday", weekday, or ABdY +; (*note: not standard strftime value) +; R 24 hour time, including minute +; +eastern=America/New_York|'vm-received' Q 'digits/at' IMp +central=America/Chicago|'vm-received' Q 'digits/at' IMp +central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' +military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' +european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM + + + +[default] + +1234 => 4242,Example Mailbox,root@localhost +;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 +;4300 => 3456,Ben Rigas,ben@american-computer.net +;4310 => -5432,Sales,sales@marko.net +;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes|moveheard=yes|sayduration=yes|saydurationm=1 +;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1|emailsubject=You have a new voicemail.|emailbody=Click on the attachment to listen.|rip=2010-06-04 +;4110 => 3443,Rob Flynn,rflynn@blueridge.net +;4235 => 1234,Jim Holmes,jim@astricon.ips,,Tz=european + + +; +; Mailboxes may be organized into multiple contexts for +; voicemail virtualhosting +; + +[other] +;The intro can be customized on a per-context basis +;directoryintro=dir-company2 +1234 => 5678,Company2 User,root@localhost + +; example for our acme compartmentalized company +; +; Pete telecommutes from Chicago, so we'll customize timestamps for him. +; +;[acme] +;111 => 7383,Pete,pete@acme-widgets.com,,tz=central +;112 => 6262,Nancy,nancy@acme-widgets.com +; + +; --------------------------------------------------------------------------- +; IMAP user settings and overrides. These are only applicable when Asterisk is +; compiled with IMAP support. +; +; imapuser=username ; The IMAP username of the mailbox to access +; imappassword=password ; The IMAP password of the user +; imapvmshareid=xxxx ; A shared mailbox ID to use for the IMAP mailbox + ; login, as opposed to the mailbox dialed +; imapfolder ; Overrides the global imapfolder setting +; imapserver ; Overrides the global imapserver setting +; imapport ; Overrides the global imapport setting +; imapflags ; Overrides the global imapflags setting + +; +;[imapvm] +;4324 => 7764,Ellis Redding,red@buxton.us,,imapuser=eredding|imappassword=g3tbusy|imapfolder=notinbox +;4325 => 2392,Andrew Dufresne,andy@dufresne.info,,imapuser=adufresne|imappassword=rockh@mmer diff --git a/asterisk/vpb.conf b/asterisk/vpb.conf new file mode 100644 index 0000000..fecb3ec --- /dev/null +++ b/asterisk/vpb.conf @@ -0,0 +1,248 @@ +; +; Voicetronix Voice Processing Board (VPB) telephony interface +; +; Configuration file +; + +[general] +; +; Total number of Voicetronix cards in this machine +; +cards=0 + +; +; Which indication functions to use +; 1 = use Asterisk functions +; 0 = use VPB functions +; +indication=1 + +; +; Echo Canceller suppression threshold +; 0 = no suppression threshold +; 2048 = -18dB +; 4096 = -24dB +; +;ecsuppthres=0 + +; +; Inter-digit delay timeout, used when collecting DTMF tones for dialling +; from a station port. Measured in milliseconds. +; +dtmfidd=3000 + +; +; How to play DTMF tones +; any value = use Asterisk functions +; commented out = use VPB functions +; +;ast-dtmf=1 + +; +; How to detect DTMF tones +; any value = use Asterisk functions +; commented out = use VPB functions +; +; NOTE: this setting is currently broken, and uncommenting it will +; stop dialling from working. Any volunteers to fix it? +;ast-dtmf-det=1 + +; +; Use relaxed DTMF detection (ignored unless ast-dtmf-det is set) +; +relaxdtmf=1 + +; +; When we do a native bridge between two VPB channels: +; yes = only break the connection for '#' and '*' +; no = break the connection for any DTMF +; +; NOTE: this is currently broken, and setting to no will segfault +; Asterisk while dialling. Any volunteers to fix it? +; +break-for-dtmf=yes + +; +; The maximum period between received rings. Measures in milliseconds. +; +timer_period_ring=4000 + + +[interfaces] +; +; Default language +; +language=en + +; +; Default context +; +context=public + +; +; Echo cancellation +; off = no not use echo cancellation +; on = use echo cancellation +; +echocancel=off + +; +; Caller ID routines/signalling +; For FXO ports, select one of: +; on = collect caller ID between 1st/2nd rings using VPB routines +; off = do not use caller ID +; bell = bell202 as used in US, using Asterisk's caller ID routines +; v23 = v23 as used in the UK, using Asterisk's caller ID routines +; For FXS ports, set the channel's CID in '"name" ' format +; +; NOTE that other caller ID standards are supported in Asterisk, but are +; not yet active in chan_vpb. It should be reasonably trivial to add +; support for the other standards (see the default chan_dahdi.conf for a +; list of them) that Asterisk already handles. +; +callerid=bell + +; +; Use a polarity reversal as the trigger for the start of caller ID, +; rather than triggering after the first ring. +; +usepolaritycid=0 + +; +; Use loop drop to detect the end of a call. On by default, but if you +; experience unexpected hangups, try turning it off. +; +useloopdrop=1 + +; +; Use in-kernel bridging. This will generally give lower delay audio if +; bridging between two VPB channels. It will not affect bridging +; between VPB channels and other technologies. +; +usenativebridge=1 + +; +; Software transmit and receive gain. Adjusting these will change the +; volume of audio files that are played (tx) and recorded (rx). It will +; _not_ affect audio between channels in a native bridge. It will, +; however, affect the volume of audio between VPB channels and channels +; using other technologies (such as VoIP channels). Usually it's best to +; leave these as they are. If you're looking to get rid of echo, the +; first thing to do is match your line impedance with the bal1/bal2/bal3 +; settings. +; +;txgain=0.0 +;rxgain=0.0 + +; +; Hardware transmit and receive gain. Adjusting these will change the +; volume of all audio on a channel. The allowed range of settings is +; -12.0 to 12.0 (measured in dB). +; +;txhwgain=0.0 +;rxhwgain=0.0 + +; +; Balance register settings, for matching the impedance of the card to +; that of the connected equipment. Only relevant for OpenLine and +; OpenSwitch series cards. Values should be in the range 0 - 255. +; +; We (Voicetronix) have determined the best codec balance values for +; standard interfaces based on their US, Australian and European +; specifications, shown below. +; +; US (600 ohm) +;bal1=0xf8 +;bal2=0x1a +;bal3=0x0c +; +; Australia (complex impedance) +;bal1=0xf0 +;bal2=0x5d +;bal3=0x79 +; +; Europe (CTR-21) +;bal1=0xf0 +;bal2=0x6e +;bal3=0x75 + +; +; Logical groups can be assigned to allow outgoing rollover. Groups range +; from 0 to 63, and multiple groups can be specified. +; +group=1 + +; +; Ring groups (a.k.a. call groups) and pickup groups. If a phone is +; ringing and it is a member of a group which is one of your pickup +; groups, then you can answer it by picking up and dialling *8#. For +; simple offices, just make these both the same. Groups range from 0 to +; 63. +; +callgroup=1 +pickupgroup=1 + +; +; If we haven't had a "grunt" (voice activity detection) for this many +; seconds, then we hang up the line due to inactivity. Default is one +; hour. +; +grunttimeout=3600 + +; +; Type of line and line handling. This setting will usually be overridden +; on a per channel basis. Valid settings are: +; fxo = this is an FXO port +; immediate = this is an FXS port, with no dialtone or dialling +; required (ie it is a "hotline") +; dialtone = this is an FXS port, providing dialtone and dialling +; +mode=immediate + +;------------------------------------------------------------------------- +; Channel definitions +; +; Each channel inherits the settings specified above, unless the are +; overridden. As a minimum, the board number and channel number must be +; set, starting from 0 for the first board, and for the channels on each +; board. For example, board 0, channels 0 to 11, then board 1, channels +; 0 to 11 for two OpenSwitch12 cards. +; + +; +; First board is an OpenSwitch12 card (jumpers at factory defaults) +; +;board=0 +; +;mode=dialtone +;context=from-handset +;group=1 +;channel=0 +;channel=1 +;channel=2 +;channel=3 +;channel=4 +;channel=5 +;channel=6 +;channel=7 +; +;mode=fxo +;context=from-pstn +;group=2 +;channel=8 +;channel=9 +;channel=10 +;channel=11 + +; +; Second board is an OpenLine4 +; +;board=1 +; +;mode=fxo +;group=2 +;context=from-pstn +;channel=0 +;channel=1 +;channel=2 +;channel=3 diff --git a/asterisk/xmpp.conf b/asterisk/xmpp.conf new file mode 100644 index 0000000..a838568 --- /dev/null +++ b/asterisk/xmpp.conf @@ -0,0 +1,39 @@ +[general] +;debug=yes ; Enable debugging (disabled by default). +;autoprune=yes ; Auto remove users from buddy list. Depending on your + ; setup (ie, using your personal Gtalk account for a test) + ; you might lose your contacts list. Default is 'no'. +;autoregister=yes ; Auto register users from buddy list. +;collection_nodes=yes ; Enable support for XEP-0248 for use with + ; distributed device state. Default is 'no'. +;pubsub_autocreate=yes ; Whether or not the PubSub server supports/is using + ; auto-create for nodes. If it is, we have to + ; explicitly pre-create nodes before publishing them. + ; Default is 'no'. +;auth_policy=accept ; Auto accept users' subscription requests (default). + ; Set to deny for auto denial. +;[asterisk] +;type=client ; Client or Component connection +;serverhost=astjab.org ; Route to server for example, talk.google.com +;pubsub_node=pubsub.astjab.org ; Node to use for publishing events via PubSub +;username=asterisk@astjab.org/asterisk ; Username with optional resource. +;secret=blah ; Password +;priority=1 ; Resource priority +;port=5222 ; Port to use defaults to 5222 +;usetls=yes ; Use tls or not +;usesasl=yes ; Use sasl or not +;buddy=mogorman@astjab.org ; Manual addition of buddy to list. + ; For distributed events, these buddies are + ; automatically added in the whitelist as + ; 'owners' of the node(s). +;distribute_events=yes ; Whether or not to distribute events using + ; this connection. Default is 'no'. +;status=available ; One of: chat, available, away, xaway, or dnd +;statusmessage="I am available" ; Have custom status message for Asterisk +;timeout=5 ; Timeout (in seconds) on the message stack, defaults to 5. + ; Messages stored longer than this value will be deleted by Asterisk. + ; This option applies to incoming messages only, which are intended to + ; be processed by the JABBER_RECEIVE dialplan function. +;sendtodialplan=yes ; Send incoming messages into the dialplan. Off by default. +;context=messages ; Dialplan context to send incoming messages to. If not set, + ; "default" will be used. diff --git a/conf.d/asterisk b/conf.d/asterisk new file mode 100644 index 0000000..2ecbb6e --- /dev/null +++ b/conf.d/asterisk @@ -0,0 +1,95 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# +# Additional options for asterisk +# +# see "asterisk -h" for a list of options +# +ASTERISK_OPTS="" + +# +# User and group to run asterisk as +# +# Value: double-colon separated list of user and group, or empty to run as root: +# +# +# "asterisk:asterisk" to run as user "asterisk" and group "asterisk" +# +# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of +# +# ":asterisk" to run as user "root" and group "asterisk" +# +# "" to run as user "root" and group "root" +# +ASTERISK_USER="asterisk" + +# +# Nicelevel +# +# Set the priority of the asterisk process +# +# Value: (highest) -20..19 (lowest) +# +#ASTERISK_NICE="19" + +# Send crash notifications emails to this address +# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp)) +# +# Value: Email address or empty to disable +# +#ASTERISK_NOTIFY_EMAIL="root" + +# +# Send asterisk's output to this terminal +# +# Value: Full path to device node or a number +# +#ASTERISK_TTY="/dev/tty9" + +# +# Start an asterisk console on the terminal specified by ASTERISK_TTY +# +# Warning! Use only for debugging, this is a potential security issue! +# +# Value: yes or no/empty +# +ASTERISK_CONSOLE="no" + +# +# Maximum size of core files. +# +# Value: Size in bytes, unlimited for no limit or empty to disable. +# +ASTERISK_CORE_SIZE="unlimited" + +# +# ASTERISK_CORE_DIR +# +# Value: Directory (will be created if non-existant), default is /tmp +# +ASTERISK_CORE_DIR="/var/lib/asterisk/coredump" + +# +# Max number of filedescriptors +# +# Value: Number of descriptors +# +ASTERISK_MAX_FD="4096" + +# +# Delay time before restarting asterisk after a crash. +# +# Value: Number of seconds to sleep after a crash before restarting. +# +ASTERISK_RESTART_DELAY=5 + +# +# Kill these tasks after asterisk crashed +# +# Warning! This will kill _ALL_ tasks with the specified names! +# +# Value: Space separated list of names in double quotes (e.g. "mpg123 mad") +# +#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad" diff --git a/init.d/asterisk b/init.d/asterisk new file mode 100755 index 0000000..ef7d407 --- /dev/null +++ b/init.d/asterisk @@ -0,0 +1,347 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="forcestop reload" + +depend() { + need net + use nscd dns dahdi mysql postgresql slapd capi +} + +is_running() { + [ -r "${ast_rundir}/asterisk.pid" ] || return 1 + PID="$(cat "${ast_rundir}/asterisk.pid")" + [ -d "/proc/${PID}" ] || return 1 + EXE="$(readlink -f /proc/${PID}/exe)" + EXE="${EXE% (deleted)}" # in case asterisk got upgraded and we're still looking at an old one. + [ "${EXE}" = /usr/sbin/asterisk ] || return 1 # pid got re-used for another process. + + # PID reported in pidfile is active, and is still an asterisk instance. + return 0 +} + +# Sets up a few variables for us for use +# ast_instancename: eg, asterisk when RC_SVCNAME=asterisk, or asterisk(foo) when asterisk.foo. +# ast_rundir: directory to be used as run folder (pid and ctl files). +# ast_spooldir: +setup_svc_variables() +{ + local t + + ast_instancename=asterisk + ast_rundir=/var/run/${RC_SVCNAME} + ast_logdir=/var/log/${RC_SVCNAME} + ast_spooldir=/var/spool/${RC_SVCNAME} + ast_confdir=/etc/${RC_SVCNAME/.//} + + if [ "${RC_SVCNAME}" != "asterisk" ]; then + t="${RC_SVCNAME#asterisk.}" + if [ "${RC_SVCNAME}" = "${t}" ]; then + eerror "Invalid SVCNAME of ${RC_SVCNAME}, must be of the format asterisk.name." + return 1 + fi + ast_instancename+="(${t})" + fi + + [ -n "${ASTERISK_RUNDIR}" ] && ast_rundir="${ASTERISK_RUNDIR}" + [ -n "${ASTERISK_LOGDIR}" ] && ast_logdir="${ASTERISK_LOGDIR}" + [ -n "${ASTERISK_SPOOLDIR}" ] && ast_spooldir="${ASTERISK_SPOOLDIR}" + [ -n "${ASTERISK_CONFDIR}" ] && ast_confdir="${ASTERISK_CONFDIR}" + + return 0 +} + +asterisk_run_loop() { + local result=0 signal=0 + + echo "Initializing ${ast_instancename} wrapper" + OPTS="$*" + + trap "rm -f '${ast_rundir}/wrapper_loop.running'" EXIT + touch "${ast_rundir}/wrapper_loop.running" + + while [ -r "${ast_rundir}/wrapper_loop.running" ]; do + if [ -n "${TTY}" ]; then + /usr/bin/stty -F "${TTY}" sane + ${NICE} /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" ${OPTS} >"${TTY}" 2>&1 <"${TTY}" + result=$? + else + ${NICE} /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" ${OPTS} 2>&1 >/dev/null + result=$? + fi + + if [ "$result" -eq 0 ]; then + echo "Asterisk terminated normally" + break + else + if [ "$result" -gt 128 ]; then + signal="$(expr "$result" - 128)" + MSG="Asterisk terminated with Signal: $signal" + + CORE_TARGET="core-$(date "+%Y%m%d-%H%M%S")" + + local CORE_DUMPED=0 + if [ -f "${ASTERISK_CORE_DIR}/core" ]; then + mv "${ASTERISK_CORE_DIR}/core" \ + "${ASTERISK_CORE_DIR}/${CORE_TARGET}" + CORE_DUMPED=1 + + elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then + mv "${ASTERISK_CORE_DIR}/core.${PID}" \ + "${ASTERISK_CORE_DIR}/${CORE_TARGET}" + CORE_DUMPED=1 + + fi + + [ $CORE_DUMPED -eq 1 ] && \ + MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}" + else + MSG="Asterisk terminated with return code: $result" + fi + + # kill left-over tasks + for X in ${ASTERISK_CLEANUP_ON_CRASH}; do + kill -9 "$(pidof "${X}")"; + done + fi + + [ -n "${TTY}" ] \ + && echo "${MSG}" >"${TTY}" \ + || echo "${MSG}" + + + if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \ + [ -x /usr/sbin/sendmail ]; then + echo -e -n "Subject: Asterisk crashed\r\n${MSG}\r\n" |\ + /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}" + fi + sleep "${ASTERISK_RESTART_DELAY}" + echo "Restarting Asterisk..." + done + + echo "Terminating wrapper loop." + return 0 +} + +start() { + local OPTS USER GROUP PID + local tmp x + + local OPTS ARGS + + setup_svc_variables || return $? + + ebegin "Starting ${ast_instancename} PBX" + + eindent + + # filter (redundant) arguments + OPTS="$(echo "${ASTERISK_OPTS}" | sed -re "s:-[cfF]::g")" + + # default options + OPTS="${OPTS} -f" # don't fork / detach breaks wrapper script... + + # mangle yes/no options + ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')" + ASTERISK_WAITBOOTED="$(echo "${ASTERISK_WAITBOOTED}" | tr '[:lower:]' '[:upper:]')" + + ASTERISK_RESTART_DELAY="$(echo "${ASTERISK_RESTART_DELAY}" | sed -re 's/^([0-9]*).*/\1/')" + [ -z "${ASTERISK_RESTART_DELAY}" ] && ASTERISK_RESTART_DELAY=5 + + if [ -n "${ASTERISK_CORE_SIZE}" ] && + [ "${ASTERISK_CORE_SIZE}" != "0" ]; then + ulimit -c ${ASTERISK_CORE_SIZE} + + if [ -n "${ASTERISK_CORE_DIR}" ] && \ + [ ! -d "${ASTERISK_CORE_DIR}" ] + then + mkdir -m750 -p "${ASTERISK_CORE_DIR}" + + if [ -n "${ASTERISK_USER}" ]; then + chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}" + fi + fi + ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" + + cd "${ASTERISK_CORE_DIR}" + einfo "Core dump size : ${ASTERISK_CORE_SIZE}" + einfo "Core dump location : ${ASTERISK_CORE_DIR}" + + OPTS="${OPTS} -g" + fi + + if [ -n "${ASTERISK_MAX_FD}" ]; then + ulimit -n ${ASTERISK_MAX_FD} + einfo "Max open filedescriptors : ${ASTERISK_MAX_FD}" + fi + + if [ -n "${ASTERISK_NICE}" ]; then + if [ ${ASTERISK_NICE} -ge -20 ] && \ + [ ${ASTERISK_NICE} -le 19 ]; then + einfo "Nice level : ${ASTERISK_NICE}" + NICE="nice -n ${ASTERISK_NICE} --" + else + eerror "Nice value must be between -20 and 19" + return 1 + fi + else + NICE="" + fi + + if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then + if [ -x /usr/sbin/sendmail ]; then + einfo "Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}" + else + ewarn "Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!" + unset ASTERISK_NOTIFY_EMAIL + fi + fi + + if [ -n "${ASTERISK_TTY}" ]; then + for x in ${ASTERISK_TTY} \ + /dev/tty${ASTERISK_TTY} \ + /dev/vc/${ASTERISK_TTY} + do + if [ -c "${x}" ]; then + TTY="${x}" + fi + done + [ -n "${TTY}" ] && \ + einfo "Messages are sent to : ${TTY}" + fi + + if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then + einfo "Starting Asterisk console : ${ASTERISK_CONSOLE}" + OPTS="${OPTS} -c" + fi + + if [ -n "${ASTERISK_USER}" ]; then + USER="$(echo $ASTERISK_USER | sed 's/:.*//')" + GROUP="$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')" + if [ -n "${USER}" ]; then + if ! getent passwd "${USER}" &>/dev/null; then + eerror "Requested to run asterisk as ${USER}, which doesn't exist." + return 1 + fi + OPTS="${OPTS} -U ${USER}" + fi + if [ -n "${GROUP}" ]; then + if ! getent group "${GROUP}" &>/dev/null; then + eerror "Requested to run asterisk with group ${USER}, which doesn't exist." + return 1 + fi + OPTS="${OPTS} -G ${GROUP}" + GROUP=":${GROUP}" # make it look nice... + fi + checkpath -d -m 0755 -o ${USER}${GROUP} "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}" + find "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}" ! -user "${USER}" | while read element; do + ewarn "${USER} is not the owner of $element, or permissions are insufficient, fixing." + chown ${USER} "${element}" + chmod u+rX "${element}" + done; + einfo "Starting asterisk as : ${USER}${GROUP}" + else + checkpath -d -m 0755 -o root:root "${ast_logdir}" "${ast_rundir}" + ewarn "Starting asterisk as root is not recommended." + fi + + asterisk_run_loop ${OPTS} 2>&1 | logger -t "wrapper:${ast_instancename}" & + result=$? + + if [ $result -eq 0 ]; then + # 2 seconds should be enough for asterisk to start + sleep 2 + is_running + result=$? + + [ $result -eq 0 ] || wrapperstop + fi + + eoutdent + eend $result + + if [ $result -eq 0 -a "${ASTERISK_WAITBOOTED}" = "YES" ]; then + ebegin "Waiting for ${ast_instancename} to fully boot" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core waitfullybooted" &>/dev/null + eend $? + fi + + return $result +} + +wrapperstop() { + # Accomodate system upgrades (so a previous version of the wrapper script that still uses a pid file may be running). + if [ -r "${ast_rundir}/wrapper_loop.pid" ]; then + ebegin "Killing wrapper script" + kill "$(cat /var/run/asterisk/wrapper_loop.pid)" + eend $? + fi + + # The new one (due to "hardened" requirements) uses a simpler + # flag to indicate running or shutting down. + if [ -r "${ast_rundir}/wrapper_loop.running" ]; then + ebegin "Signalling wrapper script to terminate" + rm "${ast_rundir}/wrapper_loop.running" + eend $? + fi + + return 0 +} + +forcestop() { + setup_svc_variables || return $? + + # Just to be sure - when we want to forcestop we should make it all tear down. + wrapperstop + + ebegin "Stopping asterisk PBX" + start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid + eend $? +} + +stop() { + setup_svc_variables || return $? + + wrapperstop + + if ! is_running; then + eerror "Asterisk is not running!" + return 0 + fi + + ebegin "Stopping asterisk PBX gracefully" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core stop gracefully" &>/dev/null + # Now we have to wait until asterisk has _really_ stopped. + sleep 1 + if is_running; then + einfon "Waiting for asterisk to shutdown ." + local cnt=0 + while is_running; do + cnt="$(expr $cnt + 1)" + if [ $cnt -gt 60 ] ; then + # Waited 120 seconds now. Fail. + echo + eend 1 "Failed." + return + fi + sleep 2 + echo -n "." + done + echo + fi + eend 0 +} + +reload() { + setup_svc_variables || return $? + + if is_running; then + ebegin "Forcing asterisk to reload configuration" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "module reload" &>/dev/null + eend $? + else + eerror "Asterisk is not running!" + fi +} diff --git a/logrotate.d/asterisk b/logrotate.d/asterisk new file mode 100644 index 0000000..69296c9 --- /dev/null +++ b/logrotate.d/asterisk @@ -0,0 +1,25 @@ +/var/log/asterisk/messages /var/log/asterisk/queue_log { + missingok + notifempty + + postrotate + /usr/sbin/asterisk -rnx "logger reload" || /bin/true + endscript +} + +/var/log/asterisk/debug /var/log/asterisk/full { + missingok + notifempty + daily + + postrotate + /usr/sbin/asterisk -rnx "logger reload" || /bin/true + endscript +} + +/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv { + missingok + notifempty + weekly + rotate 52 +} diff --git a/systemd/system/asterisk.service.d/00gentoo.conf b/systemd/system/asterisk.service.d/00gentoo.conf new file mode 100644 index 0000000..b7f83b7 --- /dev/null +++ b/systemd/system/asterisk.service.d/00gentoo.conf @@ -0,0 +1,11 @@ +# Uncomment the following 7 lines to start asterisk with a console on tty7 +# +# Warning! Use only for debugging, this is a potential security issue! +# +# [Service] +# ExecStart= +# ExecStart=/usr/sbin/asterisk -f -c -C /etc/asterisk/asterisk.conf +# TTYPath=/dev/tty7 +# StandardInput=tty +# StandardOutput=tty +# StandardError=tty