From 8afe654fafb7c2a7f3f55ab93a3c5fab9f2b9a9f Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 19 Feb 2022 17:01:13 +0100 Subject: [PATCH] conf included --- transfer_back/conf/confbridge.conf | 476 +++++ transfer_back/conf/extensions.lua | 370 ++++ transfer_back/conf/features.conf | 127 ++ transfer_back/conf/modules.conf | 77 + transfer_back/conf/pjsip.conf | 1542 +++++++++++++++++ .../transfer_back.py | 0 6 files changed, 2592 insertions(+) create mode 100644 transfer_back/conf/confbridge.conf create mode 100644 transfer_back/conf/extensions.lua create mode 100644 transfer_back/conf/features.conf create mode 100644 transfer_back/conf/modules.conf create mode 100644 transfer_back/conf/pjsip.conf rename transfer_back.py => transfer_back/transfer_back.py (100%) diff --git a/transfer_back/conf/confbridge.conf b/transfer_back/conf/confbridge.conf new file mode 100644 index 0000000..dfb3fda --- /dev/null +++ b/transfer_back/conf/confbridge.conf @@ -0,0 +1,476 @@ +[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. + +;send_events=no ; If events are enabled for this bridge and this option is + ; set, users will receive events like join, leave, talking, + ; etc. via text messages. For users accessing the bridge + ; via chan_pjsip, this means in-dialog MESSAGE messages. + ; This is most useful for WebRTC participants where the + ; browser application can use the messages to alter the user + ; interface. +;echo_events=yes ; If events are enabled for this user and this option is set, + ; the user will receive events they trigger, talking, mute, etc. + ; If not set, they will not receive their own events. + +;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=no ; 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 ; Average magnitude threshold to determine talking. + ; + ; The minimum average magnitude per sample in a frame for the + ; DSP to consider talking/noise present. A value below this + ; level is considered silence. 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 + ; high the user will hear himself 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 low 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 + ; high the user's speech will get discarded as they will + ; be considered silent. + ; + ; Valid values are 1 through 2^15. + ; By default this value is 160. + +;dsp_silence_threshold=2000 ; The number of milliseconds of silence necessary to declare + ; talking stopped. + ; + ; The time in milliseconds of sound falling below the + ; 'dsp_talking_threshold' option when a user is considered to + ; stop 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. 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 milliseconds of silence a user + ; may generate during natural speech. + ; + ; Valid values are 1 through 2^31. + ; By default this value is 2500ms. + +;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. +;announce_join_leave_review=yes ; When enabled, implies announce_join_leave, but the user + ; will be prompted to review their recording before + ; entering the conference. During this phase, the recording + ; may be listened to, re-recorded, or accepted as is. 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. + +;timeout=3600 ; When set non-zero, this specifies the number of seconds that the participant + ; may stay in the conference before being automatically ejected. When the user + ; is ejected from the conference, the user's channel will have the CONFBRIDGE_RESULT + ; variable set to "TIMEOUT". A value of 0 indicates that there is no timeout. + ; Default: 0 +;text_messaging=yes ; When set to yes text messages will be sent to this user. Text messages + ; may occur as a result of events or can be received from other participants. + ; When set to no text messages will not be sent to this user. + +; --- 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=no ; Records the conference call starting when the first user +;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. + +;record_file_append=yes ; Append record file when starting/stopping on same conference recording. +;record_file_timestamp=yes ; Append the start time to the record file name. + +;record_options= ; Pass additional options to MixMonitor. +;record_command= ; Command to execute when recording finishes. + +;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. + +;maximum_sample_rate=none ; Sets the maximum sample rate the conference + ; is mixed at. This is set to no maximum by default. + ; Values can be anything from 8000-192000. + +;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. + ; + ; sfu: Selective Forwarding Unit - Sets multi-stream operation + ; for a multi-party video conference. + +language=it +;language=en ; Set the language used for announcements to the conference. + ; Default is en (English). + +;regcontext=conferences ; The name of the context into which to register conference names as extensions. +;video_update_discard=2000 ; Amount of time (in milliseconds) to discard video update requests after sending a video + ; update request. Default is 2000. A video update request is a request for a full video + ; intra-frame. Clients can request this if they require a full frame in order to decode + ; the video stream. Since a full frame can be large limiting how often they occur can + ; reduce bandwidth usage at the cost of increasing how long it may take a newly joined + ; channel to receive the video stream. +;remb_send_interval=1000 ; Interval (in milliseconds) at which a combined REMB frame will be sent to sources of video. + ; A REMB frame contains receiver estimated maximum bitrate information. By creating a combined + ; frame and sending it to the sources of video the sender can be influenced on what bitrate + ; they choose allowing a better experience for the receivers. This defaults to 0, or disabled. +;remb_behavior=average ; How the combined REMB report for an SFU video bridge is constructed. If set to "average" then + ; the estimated maximum bitrate of each receiver is used to construct an average bitrate. If + ; set to "lowest" the lowest maximum bitrate is forwarded to the sender. If set to "highest" + ; the highest maximum bitrate is forwarded to the sender. If set to "average_all" a single average + ; is generated from every receiver and the same value is sent to every sender. If set to + ; "lowest_all" the lowest maximum bitrate of all receivers is sent to every sender. If set to + ; "highest_all" the highest maximum bitrate of all receivers is sent to every sender. + ; When set to "force", the value set in remb_estimated_bitrate is sent to every sender. + ; This defaults to "average". +;remb_estimated_bitrate=0 ; When remb_behavior is set to 'force', this options sets the estimated bitrate + ; (in bits per second) sent to each participant in REMB reports. + +;enable_events=no ; If enabled, recipients who joined the bridge via a channel driver + ; that supports Enhanced Messaging (currently only chan_pjsip) will + ; receive in-dialog messages containing a JSON body describing the + ; event. The Content-Type header will be + ; "text/x-ast-confbridge-event". + ; This feature must also be enabled in user profiles. + +; 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 is toggled on using DTMF menu. +;sound_unmuted ; The sound played when the mute option is toggled off using DTMF menu. +;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. +;sound_binaural_on ; The sound played when binaural audio is turned on +;sound_binaural_off ; The sound played when binaural audio is turned off + +; --- 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. +; toggle_binaural ; Toggle on or off binaural audio processing. + +; 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. + ; Subsequent non-admins joining a muted conference will + ; start muted. All admin users are unaffected by this + ; option. Note that all users, regardless of their admin + ; status, are notified that the conference is muted when + ; the state is toggled. + +; 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 + +; Questa stanza e' quella di "in onda" +[mixer] +type=bridge +max_members=3 +record_conference=no + +; Queste sono le stanze private di ogni telefono della regia +[regia] +type=bridge +record_conference=no + +[esterno] +type=user +[mixer] +type=user +music_on_hold_when_empty=no +[regia] +type=user +music_on_hold_when_empty=yes +marked=yes +quiet=yes diff --git a/transfer_back/conf/extensions.lua b/transfer_back/conf/extensions.lua new file mode 100644 index 0000000..9c3fba4 --- /dev/null +++ b/transfer_back/conf/extensions.lua @@ -0,0 +1,370 @@ + +SIP = "PJSIP/" + +CONSOLE = "Console/dsp" -- Console interface for demo +--CONSOLE = "DAHDI/1" +--CONSOLE = "Phone/phone0" + +IAXINFO = "guest" -- IAXtel username/password +--IAXINFO = "myuser:mypass" + +TRUNK = "DAHDI/G2" +TRUNKMSD = 1 +-- TRUNK = "IAX2/user:pass@provider" + + +-- +-- Extensions are expected to be defined in a global table named 'extensions'. +-- The 'extensions' table should have a group of tables in it, each +-- representing a context. Extensions are defined in each context. See below +-- for examples. +-- +-- 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. +-- +-- If your extension has special characters in it such as '.' and '!' you must +-- explicitly make it a string in the tabale definition: +-- +-- ["_special."] = function; +-- ["_special!"] = function; +-- +-- There are no priorities. All extensions to asterisk appear to have a single +-- priority as if they consist of a single priority. +-- +-- Each context is defined as a table in the extensions table. The +-- context names should be strings. +-- +-- One context may be included in another context using the 'includes' +-- extension. This extension should be set to a table containing a list +-- of context names. Do not put references to tables in the includes +-- table. +-- +-- include = {"a", "b", "c"}; +-- +-- Channel variables can be accessed thorugh the global 'channel' table. +-- +-- v = channel.var_name +-- v = channel["var_name"] +-- v.value +-- v:get() +-- +-- channel.var_name = "value" +-- channel["var_name"] = "value" +-- v:set("value") +-- +-- channel.func_name(1,2,3):set("value") +-- value = channel.func_name(1,2,3):get() +-- +-- channel["func_name(1,2,3)"]:set("value") +-- channel["func_name(1,2,3)"] = "value" +-- value = channel["func_name(1,2,3)"]:get() +-- +-- Note the use of the ':' operator to access the get() and set() +-- methods. +-- +-- Also notice the absence of the following constructs from the examples above: +-- channel.func_name(1,2,3) = "value" -- this will NOT work +-- value = channel.func_name(1,2,3) -- this will NOT work as expected +-- +-- +-- Dialplan applications can be accessed through the global 'app' table. +-- +-- app.Dial("DAHDI/1") +-- app.dial("DAHDI/1") +-- app["dial"]("DAHDI/1") +-- +-- More examples can be found below. +-- +-- An autoservice is automatically run while lua code is executing. The +-- autoservice can be stopped and restarted using the autoservice_stop() and +-- autoservice_start() functions. The autservice should be running before +-- starting long running operations. The autoservice will automatically be +-- stopped before executing applications and dialplan functions and will be +-- restarted afterwards. The autoservice_status() function can be used to +-- check the current status of the autoservice and will return true if an +-- autoservice is currently running. +-- +-- Note about naming conflicts: +-- Lua allows you to refer to table entries using the '.' notation, +-- I.E. app.goto(something), only if the entry doesn't conflict with an Lua +-- reserved word. In the 'goto' example, with Lua 5.1 or earlier, 'goto' is +-- not a reserved word so you'd be calling the Asterisk dialplan application +-- 'goto'. Lua 5.2 however, introduced the 'goto' control statement which +-- makes 'goto' a reserved word. This casues the interpreter to fail parsing +-- the file and pbx_lua.so will fail to load. The same applies to any use of +-- Lua tables including extensions, channels and any tables you create. +-- +-- There are two ways around this: Since Lua is case-sensitive, you can use +-- capitalized names, I.E. app.Goto(something) to refer to the Asterisk apps, +-- functions, etc. Or you can use the full syntax, I.E. app["goto"](something). +-- Both syntaxes are backwards compatible with earlier Lua versions. To make +-- your Lua dialplans easier to maintain and to reduce the chance of future +-- conflicts you may want to use the app["goto"](something) syntax for all +-- table accesses. +-- + +function outgoing_local(c, e) + app.dial("DAHDI/1/" .. e, "", "") +end + +function demo_instruct() + app.background("demo-instruct") + app.waitexten() +end + +function demo_congrats() + app.background("demo-congrats") + demo_instruct() +end + +-- Answer the chanel and play the demo sound files +function demo_start(context, exten) + app.wait(1) + app.answer() + + channel.TIMEOUT("digit"):set(5) + channel.TIMEOUT("response"):set(10) + -- app.set("TIMEOUT(digit)=5") + -- app.set("TIMEOUT(response)=10") + + demo_congrats(context, exten) +end + +function demo_hangup() + app.playback("demo-thanks") + app.hangup() +end + +extensions = { + demo = { + s = demo_start; + + ["2"] = function() + app.background("demo-moreinfo") + demo_instruct() + end; + ["3"] = function () + channel.LANGUAGE():set("fr") -- set the language to french + demo_congrats() + end; + + ["1000"] = function() +-- See the naming conflict note above. + app['goto']("default", "s", 1) + end; + + ["1234"] = function() + app.playback("transfer", "skip") + -- do a dial here + end; + + ["1235"] = function() + app.voicemail("1234", "u") + end; + + ["1236"] = function() + app.dial("Console/dsp") + app.voicemail(1234, "b") + end; + + ["#"] = demo_hangup; + t = demo_hangup; + i = function() + app.playback("invalid") + demo_instruct() + end; + + ["500"] = function() + app.playback("demo-abouttotry") + app.dial("IAX2/guest@misery.digium.com/s@default") + app.playback("demo-nogo") + demo_instruct() + end; + + ["600"] = function() + app.playback("demo-echotest") + app.echo() + app.playback("demo-echodone") + demo_instruct() + end; + + ["8500"] = function() + app.voicemailmain() + demo_instruct() + end; + + }; + + tointerni = {}; + debug = {}; + testing = {}; + + -- ci sono 4 classi di utenti fondamentali: + -- - mixer (aka il tel invisibile) + -- - regia (2 tel, il mixer non conta come regia) + -- - interni (altri interni) + -- - ext (esterno) + ["from-mixer"] = {}; + ["from-interni"] = { include = {"tointerni", "debug"}; }; + ["from-regia"] = { include= {"from-interni", "testing"}; }; + ["from-ext"] = {}; + -- nessun utente "parte" da private, lo si puo' usare solo quando si fanno megahack + ["private"] = {}; + + default = { + -- by default, do the demo + include = {"demo"}; + }; + + public = { + -- ATTENTION: If your Asterisk is connected to the internet and you do + -- not have allowguest=no in sip.conf, everybody out there may use your + -- public context without authentication. In that case you want to + -- double check which services you offer to the world. + -- + include = {"demo"}; + }; + + ["local"] = { + ["_NXXXXXX"] = outgoing_local; + }; +} + +-- XXX: rimettici il 402, l'ho tolto per fare delle prove; e poi rimettilo come from-regia, non come from-ext +INTERNI = {401,403,404,405,406}; +EXT = {020202, 402}; + +-- gli interni si possono chiamare fra loro +for _, num in ipairs(INTERNI) do + extensions["from-interni"][num] = function() + app.set("__DYNAMIC_FEATURES=mandainondaChiamante") + app.dial(SIP .. num) + end +end +--[[ for _, num in ipairs(EXT) do + extensions["from-interni"][x] = function() + app.set("__DYNAMIC_FEATURES=mandainonda") + app.dial(SIP .. num) + end +end ]]-- + +-- con il prefisso 0, gli interni possono chiamare qualsiasi cosa +extensions["from-regia"]["_0."] = function(c, ext) + app.noop(ext) + trunks = { "fastweb/", "vodafone/" }; + if ext:sub(1,1) == "0" then + num = ext:sub(2) -- butta via lo 0 iniziale + -- XXX: in realta' questo dovra' passare per i trunk, rimuovere prima o poi + trunks = { "" }; + else + num = ext:sub(3) -- butta via l'*1 o *2 + trunks = { trunks[tonumber(ext:sub(2,2))] }; + end + + to_dial = "" + for i, trunk in ipairs(trunks) do + if i > 1 then + to_dial = to_dial .. "&" + end + to_dial = to_dial .. SIP .. trunk .. num + end + + -- qui NON ci va il doppio underscore: solo chi chiama puo' usare questa feature + app.set("DYNAMIC_FEATURES=mandainondaChiamante") + app.dial(to_dial) +end +extensions["from-regia"]["_1[12]."] = extensions["from-regia"]["_0."] + +-- gli esterni possono chiamare, e squilla in tutti i telefoni +extensions["from-ext"]["_."] = function() + to_dial = "" + for _, num in ipairs(INTERNI) do + if #to_dial > 0 then + to_dial = to_dial .. "&" + end + to_dial = to_dial .. SIP .. num + end + app.set("__DYNAMIC_FEATURES=mandainondaRicevente") + app.dial(to_dial) +end + + +extensions["debug"][9000] = function () + app.answer() + -- TODO: fagli spiegare cosa sta leggendo + for num, func in pairs(extensions["debug"]) do + app.saydigits(num) + -- TODO: fagli dire cosa fa + app.wait(2) + end + app.hangup() +end +extensions["debug"][9440] = function() + app.answer() + for i = 1,20 do + app.playtones("440/4000") + app.wait(4) + end + app.hangup() +end +extensions["debug"][9880] = function() + app.answer() + for i = 1,20 do + app.playtones("880/4000") + app.wait(4) + end + app.hangup() +end +extensions["private"][9438] = function() + app.answer() + for i = 1,20 do + app.playtones("438/4000") + app.wait(4) + end + app.hangup() +end +-- questa e' la stanza in cui 401 incontra i suoi interlocutori +extensions["private"][9401] = function() + app.answer() + app.confbridge("401", "regia", "regia") + app.hangup() +end +-- questa e' la stanza in cui 401 sente la musica a loop mentre aspetta +extensions["private"][94011] = function() + app.answer() + app.musiconhold("default") + app.hangup() +end +extensions["from-regia"][94011] = function() + app.answer() + app.musiconhold("default") + app.hangup() +end +-- se inizia con 99, vuol dire che fa dial del numero di debug tramite Local/ +extensions["debug"][99440] = function() + app.set("__DYNAMIC_FEATURES=mandainonda") + app.dial("Local/9440@from-regia/n") +end +extensions["testing"][9009] = function() + app.agi("agi:async") +end + +hints = { + demo = { }; + default = { }; +} diff --git a/transfer_back/conf/features.conf b/transfer_back/conf/features.conf new file mode 100644 index 0000000..f1387d2 --- /dev/null +++ b/transfer_back/conf/features.conf @@ -0,0 +1,127 @@ +; +; Sample Call Features (transfer, monitor/mixmonitor, etc) configuration +; + +; Note: From Asterisk 12 - All parking lot configuration is now done in res_parking.conf + +[general] +;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call + ; (default is 3 seconds) +;xfersound = beep ; to indicate an attended transfer is complete +;xferfailsound = beeperr ; to indicate a failed transfer +;pickupexten = *8 ; Configure the pickup extension. (default is *8) +;pickupsound = beep ; to indicate a successful pickup (default: no sound) +;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound) +;featuredigittimeout = 1000 ; Max time (ms) between digits for + ; feature activation (default is 1000 ms) +;recordingfailsound = beeperr ; indicates that a one-touch monitor or one-touch mixmonitor feature failed + ; to be applied to the call. (default: no sound) +;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds. +;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transfer + ; target answers, then by default, the system will try to call back the + ; person that did the transfer. If this is set to "yes", the ringing + ; transfer target is immediately transferred to the transferee. +;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no) +;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer. + ; By default, this is 2. +;transferdialattempts = 3 ; Number of times that a transferer may attempt to dial an extension before + ; being kicked back to the original call. +;transferretrysound = beep ; Sound to play when a transferer fails to dial a valid extension. +;transferinvalidsound = beeperr ; Sound to play when a transferer fails to dial a valid extension and is out of retries. +;atxferabort = *1 ; cancel the attended transfer +;atxfercomplete = *2 ; complete the attended transfer, dropping out of the call +;atxferthreeway = *3 ; complete the attended transfer, but stay in the call. This will turn the call into a multi-party bridge +;atxferswap = *4 ; swap to the other party. Once an attended transfer has begun, this options may be used multiple times + +; Note that the DTMF features listed below only work when two channels have answered and are bridged together. +; They can not be used while the remote party is ringing or in progress. If you require this feature you can use +; chan_local in combination with Answer to accomplish it. + +[featuremap] +;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! +;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! +;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! +;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! + +[applicationmap] +; Note that the DYNAMIC_FEATURES channel variable must be set to use the features +; defined here. The value of DYNAMIC_FEATURES should be the names of the features +; to allow the channel to use separated by '#'. For example: +; +; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3) +; +; (Note: The two leading underscores allow these feature settings to be set +; on the outbound channels, as well. Otherwise, only the original channel +; will have access to these features.) +; +; The syntax for declaring a dynamic feature is any of the following: +; +; => ,[/],[,[,MOH_Class]] +; => ,[/],[,""[,MOH_Class]] +; => ,[/],([])[,MOH_Class] + +; +; FeatureName -> This is the name of the feature used when setting the +; DYNAMIC_FEATURES variable to enable usage of this feature. +; DTMF_sequence -> This is the key sequence used to activate this feature. +; ActivateOn -> This is the channel of the call that the application will be executed +; on. Valid values are "self" and "peer". "self" means run the +; application on the same channel that activated the feature. "peer" +; means run the application on the opposite channel from the one that +; has activated the feature. +; ActivatedBy -> ActivatedBy is no longer honored. The feature is activated by which +; channel DYNAMIC_FEATURES includes the feature is on. Use a pre-dial +; handler to set different values for DYNAMIC_FEATURES on the channels. +; Historic values are: "caller", "callee", and "both". +; Application -> This is the application to execute. +; AppArguments -> These are the arguments to be passed into the application. If you need +; commas in your arguments, you should use either the second or third +; syntax, above. +; MOH_Class -> This is the music on hold class to play while the idle +; channel waits for the feature to complete. If left blank, +; no music will be played. +; + +; +; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk +; applications. When applications are used in extensions.conf, they are executed +; by the PBX core. In this case, these applications are executed outside of the +; PBX core, so it does *not* make sense to use any application which has any +; concept of dialplan flow. Examples of this would be things like Goto, +; Background, WaitExten, and many more. The exceptions to this are Gosub and +; Macro routines which must complete for the call to continue. +; +; Enabling these features means that the PBX needs to stay in the media flow and +; media will not be re-directed if DTMF is sent in the media stream. +; +; Example Usage: +; +;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play +; ;tt-monkeys to the opposite channel + +; mandainonda => #9,self,AGI(agi:async),tt-monkeys +mandainondaChiamante => #9,self,AGI(agi:async,mandainondaChiamante), +mandainondaRicevente => #9,self,AGI(agi:async,mandainondaRicevente), +; mandainonda => *5,self,Playback(hello-world),default + +; Set arbitrary channel variables, based upon CALLERID number (Note that the application +; argument contains commas) +;retrieveinfo => #8,peer,Set(ARRAY(CDR(mark),CDR(name))=${ODBC_FOO(${CALLERID(num)})}) +; +;pauseMonitor => #1,self/callee,Pausemonitor ;Allow the callee to pause monitoring +; ;on their channel +;unpauseMonitor => #3,self/callee,UnPauseMonitor ;Allow the callee to unpause monitoring +; ;on their channel + +; Dynamic Feature Groups: +; Dynamic feature groups are groupings of features defined in [applicationmap] +; that can have their own custom key mappings. To give a channel access to a dynamic +; feature group, add the group name to the value of the DYNAMIC_FEATURES variable. +; +; example: +; [myGroupName] ; defines the group named myGroupName +; testfeature => #9 ; associates testfeature with the group and the keycode '#9'. +; pauseMonitor => ; associates pauseMonitor with the group and uses the keycode specified +; ; in the [applicationmap]. diff --git a/transfer_back/conf/modules.conf b/transfer_back/conf/modules.conf new file mode 100644 index 0000000..d81ced0 --- /dev/null +++ b/transfer_back/conf/modules.conf @@ -0,0 +1,77 @@ +; +; 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 +; +; If you want, load the GTK console right away. +; Don't load the KDE console since +; it's not as sophisticated right now. +; +noload => chan_sip.so +noload => pbx_gtkconsole.so +;load => pbx_gtkconsole.so +noload => pbx_kdeconsole.so +; +; Intercom application is obsoleted by +; chan_oss. Don't load it. +; +noload => app_intercom.so +; +; The 'modem' channel driver and its subdrivers are +; obsolete, don't load them. +; +noload => chan_modem.so +noload => chan_modem_aopen.so +noload => chan_modem_bestdata.so +noload => chan_modem_i4l.so +; +; Comment this out (after installing CAPI middleware and hardware +; drivers) if you have CAPI-able hardware and wish to use it in +; Asterisk. +; +noload => chan_capi.so +; +load => res_musiconhold.so +; +; Do not load load local channel drivers (using the system speaker) by default, +; they are not used in most installations and might block the sound hardware +; +noload => chan_alsa.so +noload => chan_console.so +noload => chan_oss.so +; +; Disable CDR logging to SQLite by default since it writes unconditionally to +; cdr.db without a way to rotate it. +; +noload => cdr_sqlite.so +; +; These conflict with app_directory.so and each other. +noload => app_directory_odbc.so +; +; Enable these if you want to configure Asterisk in a database +; +noload => res_config_odbc.so +noload => res_config_pgsql.so +noload => res_config_ldap.so + +noload => chan_mgcp.so +; +; Module names listed in "global" section will have symbols globally +; exported to modules loaded after them. +; +[global] diff --git a/transfer_back/conf/pjsip.conf b/transfer_back/conf/pjsip.conf new file mode 100644 index 0000000..7b75e1d --- /dev/null +++ b/transfer_back/conf/pjsip.conf @@ -0,0 +1,1542 @@ +; PJSIP Configuration Samples and Quick Reference +; +; This file has several very basic configuration examples, to serve as a quick +; reference to jog your memory when you need to write up a new configuration. +; It is not intended to teach PJSIP configuration or serve as an exhaustive +; reference of options and potential scenarios. +; +; This file has two main sections. +; First, manually written examples to serve as a handy reference. +; Second, a list of all possible PJSIP config options by section. This is +; pulled from the XML config help. It only shows the synopsis for every item. +; If you want to see more detail please check the documentation sources +; mentioned at the top of this file. + +; ============================================================================ +; NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE +; +; This file does not maintain the complete option documentation. +; ============================================================================ + +; Documentation +; +; The official documentation is at http://wiki.asterisk.org +; You can read the XML configuration help via Asterisk command line with +; "config show help res_pjsip", then you can drill down through the various +; sections and their options. +; + +;========!!!!!!!!!!!!!!!!!!! SECURITY NOTICE !!!!!!!!!!!!!!!!!!!!=========== +; +; At a minimum please read the file "README-SERIOUSLY.bestpractices.txt", +; located in the Asterisk source directory before starting Asterisk. +; Otherwise you risk allowing the security of the Asterisk system to be +; compromised. Beyond that please visit and read the security information on +; the wiki at: https://wiki.asterisk.org/wiki/x/EwFB +; +; A few basics to pay attention to: +; +; Anonymous Calls +; +; By default anonymous inbound calls via PJSIP are not allowed. If you want to +; route anonymous calls you'll need to define an endpoint named "anonymous". +; res_pjsip_endpoint_identifier_anonymous.so handles that functionality so it +; must be loaded. It is not recommended to accept anonymous calls. +; +; Access Control Lists +; +; See the example ACL configuration in this file. Read the configuration help +; for the section and all of its options. Look over the samples in acl.conf +; and documentation at https://wiki.asterisk.org/wiki/x/uA80AQ +; If possible, restrict access to only networks and addresses you trust. +; +; Dialplan Contexts +; +; When defining configuration (such as an endpoint) that links into +; dialplan configuration, be aware of what that dialplan does. It's easy to +; accidentally provide access to internal or outbound dialing extensions which +; could cost you severely. The "context=" line in endpoint configuration +; determines which dialplan context inbound calls will enter into. +; +;============================================================================= + +; Overview of Configuration Section Types Used in the Examples +; +; * Transport "transport" +; * Configures res_pjsip transport layer interaction. +; * Endpoint "endpoint" +; * Configures core SIP functionality related to SIP endpoints. +; * Authentication "auth" +; * Stores inbound or outbound authentication credentials for use by trunks, +; endpoints, registrations. +; * Address of Record "aor" +; * Stores contact information for use by endpoints. +; * Endpoint Identification "identify" +; * Maps a host directly to an endpoint +; * Access Control List "acl" +; * Defines a permission list or references one stored in acl.conf +; * Registration "registration" +; * Contains information about an outbound SIP registration +; * Resource Lists +; * Contains information for configuring resource lists. +; * Phone Provisioning "phoneprov" +; * Contains information needed by res_phoneprov for autoprovisioning + +; The following sections show example configurations for various scenarios. +; Most require a couple or more configuration types configured in concert. + +;============================================================================= + +; Naming of Configuration Sections +; +; Configuration section names are denoted with enclosing brackets, +; e.g. [6001] +; In most cases, you can name a section whatever makes sense to you. For example +; you might name a transport [transport-udp-nat] to help you remember how that +; section is being used. However, in some cases, ("endpoint" and "aor" types) +; the section name has a relationship to its function. +; +; Depending on the modules loaded, Asterisk can match SIP requests to an +; endpoint or aor in a few ways: +; +; 1) Match a section name for endpoint type sections to the username in the +; "From" header of inbound SIP requests. +; 2) Match a section name for aor type sections to the username in the "To" +; header of inbound SIP REGISTER requests. +; 3) With an identify type section configured, match an inbound SIP request of +; any type to an endpoint or aor based on the IP source address of the +; request. +; +; Note that sections can have the same name as long as their "type" options are +; set to different values. In most cases it makes sense to have associated +; configuration sections use the same name, as you'll see in the examples within +; this file. + +;===============EXAMPLE TRANSPORTS============================================ +; +; A few examples for potential transport options. +; +; For the NAT transport example, be aware that the options starting with +; the prefix "external_" will only apply to communication with addresses +; outside the range set with "local_net=". +; +; You can have more than one of any type of transport, as long as it doesn't +; use the same resources (bind address, port, etc) as the others. + +; Basic UDP transport +; +;[transport-udp] +;type=transport +;protocol=udp ;udp,tcp,tls,ws,wss +;bind=0.0.0.0 + +; UDP transport behind NAT +; +;[transport-udp-nat] +;type=transport +;protocol=udp +;bind=0.0.0.0 +;local_net=192.0.2.0/24 +;external_media_address=203.0.113.1 +;external_signaling_address=203.0.113.1 + +; Basic IPv6 UDP transport +; +;[transport-udp-ipv6] +;type=transport +;protocol=udp +;bind=:: + +; Example IPv4 TLS transport +; +;[transport-tls] +;type=transport +;protocol=tls +;bind=0.0.0.0 +;cert_file=/path/mycert.crt +;priv_key_file=/path/mykey.key +;cipher=ADH-AES256-SHA,ADH-AES128-SHA +;method=tlsv1 + + +;===============OUTBOUND REGISTRATION WITH OUTBOUND AUTHENTICATION============ +; +; This is a simple registration that works with some SIP trunking providers. +; You'll need to set up the auth example "mytrunk_auth" below to enable outbound +; authentication. Note that we "outbound_auth=" use for outbound authentication +; instead of "auth=", which is for inbound authentication. +; +; If you are registering to a server from behind NAT, be sure you assign a transport +; that is appropriately configured with NAT related settings. See the NAT transport example. +; +; "contact_user=" sets the SIP contact header's user portion of the SIP URI +; this will affect the extension reached in dialplan when the far end calls you at this +; registration. The default is 's'. +; +; If you would like to enable line support and have incoming calls related to this +; registration go to an endpoint automatically the "line" and "endpoint" options must +; be set. The "endpoint" option specifies what endpoint the incoming call should be +; associated with. + +;[mytrunk] +;type=registration +;transport=transport-udp +;outbound_auth=mytrunk_auth +;server_uri=sip:sip.example.com +;client_uri=sip:1234567890@sip.example.com +;contact_user=1234567890 +;retry_interval=60 +;forbidden_retry_interval=600 +;expiration=3600 +;line=yes +;endpoint=mytrunk + +;[mytrunk_auth] +;type=auth +;auth_type=userpass +;password=1234567890 +;username=1234567890 +;realm=sip.example.com + +;===============ENDPOINT CONFIGURED AS A TRUNK, OUTBOUND AUTHENTICATION======= +; +; This is one way to configure an endpoint as a trunk. It is set up with +; "outbound_auth=" to enable authentication when dialing out through this +; endpoint. There is no inbound authentication set up since a provider will +; not normally authenticate when calling you. +; +; The identify configuration enables IP address matching against this endpoint. +; For calls from a trunking provider, the From user may be different every time, +; so we want to match against IP address instead of From user. +; +; If you want the provider of your trunk to know where to send your calls +; you'll need to use an outbound registration as in the example above this +; section. +; +; NAT +; +; At a basic level configure the endpoint with a transport that is set up +; with the appropriate NAT settings. There may be some additional settings you +; need here based on your NAT/Firewall scenario. Look to the CLI config help +; "config show help res_pjsip endpoint" or on the wiki for other NAT related +; options and configuration. We've included a few below. +; +; AOR +; +; Endpoints use one or more AOR sections to store their contact details. +; You can define multiple contact addresses in SIP URI format in multiple +; "contact=" entries. +; + +;[mytrunk] +;type=endpoint +;transport=transport-udp +;context=from-external +;disallow=all +;allow=ulaw +;outbound_auth=mytrunk_auth +;aors=mytrunk +; ;A few NAT relevant options that may come in handy. +;force_rport=yes ;It's a good idea to read the configuration help for each +;direct_media=no ;of these options. +;ice_support=yes + +;[mytrunk] +;type=aor +;contact=sip:198.51.100.1:5060 +;contact=sip:198.51.100.2:5060 + +;[mytrunk] +;type=identify +;endpoint=mytrunk +;match=198.51.100.1 +;match=198.51.100.2 +;match=192.168.10.0:5061/24 + + +;=============ENDPOINT CONFIGURED AS A TRUNK, INBOUND AUTH AND REGISTRATION=== +; +; Here we are allowing a remote device to register to Asterisk and requiring +; that they authenticate for registration and calls. +; You'll note that this configuration is essentially the same as configuring +; an endpoint for use with a SIP phone. + + +;[7000] +;type=endpoint +;context=from-external +;disallow=all +;allow=ulaw +;transport=transport-udp +;auth=7000 +;aors=7000 + +;[7000] +;type=auth +;auth_type=userpass +;password=7000 +;username=7000 + +;[7000] +;type=aor +;max_contacts=1 + + +;===============ENDPOINT CONFIGURED FOR USE WITH A SIP PHONE================== +; +; This example includes the endpoint, auth and aor configurations. It +; requires inbound authentication and allows registration, as well as references +; a transport that you'll need to uncomment from the previous examples. +; +; Uncomment one of the transport lines to choose which transport you want. If +; not specified then the default transport chosen is the first compatible transport +; in the configuration file for the contact URL. +; +; Modify the "max_contacts=" line to change how many unique registrations to allow. +; +; Use the "contact=" line instead of max_contacts= if you want to statically +; define the location of the device. +; +; If using the TLS enabled transport, you may want the "media_encryption=sdes" +; option to additionally enable SRTP, though they are not mutually inclusive. +; +; If this endpoint were remote, and it was using a transport configured for NAT +; then you likely want to use "direct_media=no" to prevent audio issues. + + +;[6001] +;type=endpoint +;transport=transport-udp +;context=from-internal +;disallow=all +;allow=ulaw +;allow=gsm +;auth=6001 +;aors=6001 +; +; A few more transports to pick from, and some related options below them. +; +;transport=transport-tls +;media_encryption=sdes +;transport=transport-udp-ipv6 +;transport=transport-udp-nat +;direct_media=no +; +; MWI related options + +;aggregate_mwi=yes +;mailboxes=6001@default,7001@default +;mwi_from_user=6001 +; +; Extension and Device state options +; +;device_state_busy_at=1 +;allow_subscribe=yes +;sub_min_expiry=30 +; +; STIR/SHAKEN support. +; +;stir_shaken=no + +;[6001] +;type=auth +;auth_type=userpass +;password=6001 +;username=6001 + +;[6001] +;type=aor +;max_contacts=1 +;contact=sip:6001@192.0.2.1:5060 + +;===============ENDPOINT BEHIND NAT OR FIREWALL=============================== +; +; This example assumes your transport is configured with a public IP and the +; endpoint itself is behind NAT and maybe a firewall, rather than having +; Asterisk behind NAT. For the sake of simplicity, we'll assume a typical +; VOIP phone. The most important settings to configure are: +; +; * direct_media, to ensure Asterisk stays in the media path +; * rtp_symmetric and force_rport options to help the far-end NAT/firewall +; +; Depending on the settings of your remote SIP device or NAT/firewall device +; you may have to experiment with a combination of these settings. +; +; If both Asterisk and the remote phones are a behind NAT/firewall then you'll +; have to make sure to use a transport with appropriate settings (as in the +; transport-udp-nat example). +; +;[6002] +;type=endpoint +;transport=transport-udp +;context=from-internal +;disallow=all +;allow=ulaw +;auth=6002 +;aors=6002 +;direct_media=no +;rtp_symmetric=yes +;force_rport=yes +;rewrite_contact=yes ; necessary if endpoint does not know/register public ip:port +;ice_support=yes ;This is specific to clients that support NAT traversal + ;for media via ICE,STUN,TURN. See the wiki at: + ;https://wiki.asterisk.org/wiki/x/D4FHAQ + ;for a deeper explanation of this topic. + +;[6002] +;type=auth +;auth_type=userpass +;password=6002 +;username=6002 + +;[6002] +;type=aor +;max_contacts=2 + + +;============EXAMPLE ACL CONFIGURATION========================================== +; +; The ACL or Access Control List section defines a set of permissions to permit +; or deny access to various address or addresses. Alternatively it references an +; ACL configuration already set in acl.conf. +; +; The ACL configuration is independent of individual endpoint configuration and +; operates on all inbound SIP communication using res_pjsip. + +; Reference an ACL defined in acl.conf. +; +;[acl] +;type=acl +;acl=example_named_acl1 + +; Reference a contactacl specifically. +; +;[acl] +;type=acl +;contact_acl=example_contact_acl1 + +; Define your own ACL here in pjsip.conf and +; permit or deny by IP address or range. +; +;[acl] +;type=acl +;deny=0.0.0.0/0.0.0.0 +;permit=209.16.236.0/24 +;deny=209.16.236.1 + +; Restrict based on Contact Headers rather than IP. +; Define options multiple times for various addresses or use a comma-delimited string. +; +;[acl] +;type=acl +;contact_deny=0.0.0.0/0.0.0.0 +;contact_permit=209.16.236.0/24 +;contact_permit=209.16.236.1 +;contact_permit=209.16.236.2,209.16.236.3 + +; Restrict based on Contact Headers rather than IP and use +; advanced syntax. Note the bang symbol used for "NOT", so we can deny +; 209.16.236.12/32 within the permit= statement. +; +;[acl] +;type=acl +;contact_deny=0.0.0.0/0.0.0.0 +;contact_permit=209.16.236.0 +;permit=209.16.236.0/24, !209.16.236.12/32 + + +;============EXAMPLE RLS CONFIGURATION========================================== +; +;Asterisk provides support for RFC 4662 Resource List Subscriptions. This allows +;for an endpoint to, through a single subscription, subscribe to the states of +;multiple resources. Resource lists are configured in pjsip.conf using the +;resource_list configuration object. Below is an example of a resource list that +;allows an endpoint to subscribe to the presence of alice, bob, and carol. + +;[my_list] +;type=resource_list +;list_item=alice +;list_item=bob +;list_item=carol +;event=presence + +;The "event" option in the resource list corresponds to the SIP event-package +;that the subscribed resources belong to. A resource list can only provide states +;for resources that belong to the same event-package. This means that you cannot +;create a list that is a combination of presence and message-summary resources, +;for instance. Any event-package that Asterisk supports can be used in a resource +;list (presence, dialog, and message-summary). Whenever support for a new event- +;package is added to Asterisk, support for that event-package in resource lists +;will automatically be supported. + +;The "list_item" options indicate the names of resources to subscribe to. The +;way these are interpreted is event-package specific. For instance, with presence +;list_items, hints in the dialplan are looked up. With message-summary list_items, +;mailboxes are looked up using your installed voicemail provider (app_voicemail +;by default). Note that in the above example, the list_item options were given +;one per line. However, it is also permissible to provide multiple list_item +;options on a single line (e.g. list_item = alice,bob,carol). + +;In addition to the options presented in the above configuration, there are two +;more configuration options that can be set. +; * full_state: dictates whether Asterisk should always send the states of +; all resources in the list at once. Defaults to "no". You should only set +; this to "yes" if you are interoperating with an endpoint that does not +; behave correctly when partial state notifications are sent to it. +; * notification_batch_interval: By default, Asterisk will send a NOTIFY request +; immediately when a resource changes state. This option causes Asterisk to +; start batching resource state changes for the specified number of milliseconds +; after a resource changes states. This way, if multiple resources change state +; within a brief interval, Asterisk can send a single NOTIFY request with all +; of the state changes reflected in it. + +;There is a limitation to the size of resource lists in Asterisk. If a constructed +;notification from Asterisk will exceed 64000 bytes, then the message is deemed +;too large to send. If you find that you are seeing error messages about SIP +;NOTIFY requests being too large to send, consider breaking your lists into +;sub-lists. + +;============EXAMPLE PHONEPROV CONFIGURATION================================ + +; Before configuring provisioning here, see the documentation for res_phoneprov +; and configure phoneprov.conf appropriately. + +; For each user to be autoprovisioned, a [phoneprov] configuration section +; must be created. At a minimum, the 'type', 'PROFILE' and 'MAC' variables must +; be set. All other variables are optional. +; Example: + +;[1000] +;type=phoneprov ; must be specified as 'phoneprov' +;endpoint=1000 ; Required only if automatic setting of + ; USERNAME, SECRET, DISPLAY_NAME and CALLERID + ; are needed. +;PROFILE=digium ; required +;MAC=deadbeef4dad ; required +;SERVER=myserver.example.com ; A standard variable +;TIMEZONE=America/Denver ; A standard variable +;MYVAR=somevalue ; A user confdigured variable + +; If the phoneprov sections have common variables, it is best to create a +; phoneprov template. The example below will produce the same configuration +; as the one specified above except that MYVAR will be overridden for +; the specific user. +; Example: + +;[phoneprov_defaults](!) +;type=phoneprov ; must be specified as 'phoneprov' +;PROFILE=digium ; required +;SERVER=myserver.example.com ; A standard variable +;TIMEZONE=America/Denver ; A standard variable +;MYVAR=somevalue ; A user configured variable + +;[1000](phoneprov_defaults) +;endpoint=1000 ; Required only if automatic setting of + ; USERNAME, SECRET, DISPLAY_NAME and CALLERID + ; are needed. +;MAC=deadbeef4dad ; required +;MYVAR=someOTHERvalue ; A user confdigured variable + +; To have USERNAME and SECRET automatically set, the endpoint +; specified here must in turn have an outbound_auth section defined. + +; Fuller example: + +;[1000] +;type=endpoint +;outbound_auth=1000-auth +;callerid=My Name <8005551212> +;transport=transport-udp-nat + +;[1000-auth] +;type=auth +;auth_type=userpass +;username=myname +;password=mysecret + +;[phoneprov_defaults](!) +;type=phoneprov ; must be specified as 'phoneprov' +;PROFILE=someprofile ; required +;SERVER=myserver.example.com ; A standard variable +;TIMEZONE=America/Denver ; A standard variable +;MYVAR=somevalue ; A user configured variable + +;[1000](phoneprov_defaults) +;endpoint=1000 ; Required only if automatic setting of + ; USERNAME, SECRET, DISPLAY_NAME and CALLERID + ; are needed. +;MAC=deadbeef4dad ; required +;MYVAR=someUSERvalue ; A user confdigured variable +;LABEL=1000 ; A standard variable + +; The previous sections would produce a template substitution map as follows: + +;MAC=deadbeef4dad ;added by pp1000 +;USERNAME=myname ;automatically added by 1000-auth username +;SECRET=mysecret ;automatically added by 1000-auth password +;PROFILE=someprofile ;added by defaults +;SERVER=myserver.example.com ;added by defaults +;SERVER_PORT=5060 ;added by defaults +;MYVAR=someUSERvalue ;added by defaults but overdidden by user +;CALLERID=8005551212 ;automatically added by 1000 callerid +;DISPLAY_NAME=My Name ;automatically added by 1000 callerid +;TIMEZONE=America/Denver ;added by defaults +;TZOFFSET=252100 ;automatically calculated by res_phoneprov +;DST_ENABLE=1 ;automatically calculated by res_phoneprov +;DST_START_MONTH=3 ;automatically calculated by res_phoneprov +;DST_START_MDAY=9 ;automatically calculated by res_phoneprov +;DST_START_HOUR=3 ;automatically calculated by res_phoneprov +;DST_END_MONTH=11 ;automatically calculated by res_phoneprov +;DST_END_MDAY=2 ;automatically calculated by res_phoneprov +;DST_END_HOUR=1 ;automatically calculated by res_phoneprov +;ENDPOINT_ID=1000 ;automatically added by this module +;AUTH_ID=1000-auth ;automatically added by this module +;TRANSPORT_ID=transport-udp-nat ;automatically added by this module +;LABEL=1000 ;added by user + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip +;==========================ENDPOINT SECTION OPTIONS========================= +;[endpoint] +; SYNOPSIS: Endpoint +;100rel=yes ; Allow support for RFC3262 provisional ACK tags (default: + ; "yes") +;aggregate_mwi=yes ; (default: "yes") +;allow= ; Media Codec s to allow (default: "") +;allow_overlap=yes ; Enable RFC3578 overlap dialing support. (default: "yes") +;aors= ; AoR s to be used with the endpoint (default: "") +;auth= ; Authentication Object s associated with the endpoint (default: "") +;callerid= ; CallerID information for the endpoint (default: "") +;callerid_privacy=allowed_not_screened ; Default privacy level (default: "allowed_not_screened") +;callerid_tag= ; Internal id_tag for the endpoint (default: "") +;context=default ; Dialplan context for inbound sessions (default: + ; "default") +;direct_media_glare_mitigation=none ; Mitigation of direct media re INVITE + ; glare (default: "none") +;direct_media_method=invite ; Direct Media method type (default: "invite") +;trust_connected_line=yes ; Accept Connected Line updates from this endpoint + ; (default: "yes") +;send_connected_line=yes ; Send Connected Line updates to this endpoint + ; (default: "yes") +;connected_line_method=invite ; Connected line method type. + ; When set to "invite", check the remote's + ; Allow header and if UPDATE is allowed, send + ; UPDATE instead of INVITE to avoid SDP + ; renegotiation. If UPDATE is not Allowed, + ; send INVITE. + ; If set to "update", send UPDATE regardless + ; of what the remote Allows. + ; (default: "invite") +;direct_media=yes ; Determines whether media may flow directly between + ; endpoints (default: "yes") +;disable_direct_media_on_nat=no ; Disable direct media session refreshes when + ; NAT obstructs the media session (default: + ; "no") +;disallow= ; Media Codec s to disallow (default: "") +;dtmf_mode=rfc4733 ; DTMF mode (default: "rfc4733") +;media_address= ; IP address used in SDP for media handling (default: "") +;bind_rtp_to_media_address= ; Bind the RTP session to the media_address. + ; This causes all RTP packets to be sent from + ; the specified address. (default: "no") +;force_rport=yes ; Force use of return port (default: "yes") +;ice_support=no ; Enable the ICE mechanism to help traverse NAT (default: "no") +;identify_by=username ; A comma-separated list of ways the Endpoint or AoR can be + ; identified. + ; "username": Identify by the From or To username and domain + ; "auth_username": Identify by the Authorization username and realm + ; "ip": Identify by the source IP address + ; "header": Identify by a configured SIP header value. + ; In the username and auth_username cases, if an exact match + ; on both username and domain/realm fails, the match is + ; retried with just the username. + ; (default: "username,ip") +;redirect_method=user ; How redirects received from an endpoint are handled + ; (default: "user") +;mailboxes= ; NOTIFY the endpoint when state changes for any of the specified mailboxes. + ; Asterisk will send unsolicited MWI NOTIFY messages to the endpoint when state + ; changes happen for any of the specified mailboxes. (default: "") +;voicemail_extension= ; The voicemail extension to send in the NOTIFY Message-Account header + ; (default: global/default_voicemail_extension) +;mwi_subscribe_replaces_unsolicited=no + ; An MWI subscribe will replace unsoliticed NOTIFYs + ; (default: "no") +;moh_suggest=default ; Default Music On Hold class (default: "default") +;moh_passthrough=yes ; Pass Music On Hold through using SIP re-invites with sendonly + ; when placing on hold and sendrecv when taking off hold +;outbound_auth= ; Authentication object used for outbound requests (default: + ; "") +;outbound_proxy= ; Proxy through which to send requests, a full SIP URI + ; must be provided (default: "") +;rewrite_contact=no ; Allow Contact header to be rewritten with the source + ; IP address port (default: "no") +;rtp_symmetric=no ; Enforce that RTP must be symmetric (default: "no") +;send_diversion=yes ; Send the Diversion header conveying the diversion + ; information to the called user agent (default: "yes") +;send_pai=no ; Send the P Asserted Identity header (default: "no") +;send_rpid=no ; Send the Remote Party ID header (default: "no") +;rpid_immediate=no ; Send connected line updates on unanswered incoming calls immediately. (default: "no") +;timers_min_se=90 ; Minimum session timers expiration period (default: + ; "90") +;timers=yes ; Session timers for SIP packets (default: "yes") +;timers_sess_expires=1800 ; Maximum session timer expiration period + ; (default: "1800") +;transport= ; Explicit transport configuration to use (default: "") + ; This will force the endpoint to use the specified transport + ; configuration to send SIP messages. You need to already know + ; what kind of transport (UDP/TCP/IPv4/etc) the endpoint device + ; will use. + +;trust_id_inbound=no ; Accept identification information received from this + ; endpoint (default: "no") +;trust_id_outbound=no ; Send private identification details to the endpoint + ; (default: "no") +;type= ; Must be of type endpoint (default: "") +;use_ptime=no ; Use Endpoint s requested packetisation interval (default: + ; "no") +;use_avpf=no ; Determines whether res_pjsip will use and enforce usage of + ; AVPF for this endpoint (default: "no") +;media_encryption=no ; Determines whether res_pjsip will use and enforce + ; usage of media encryption for this endpoint (default: + ; "no") +;media_encryption_optimistic=no ; Use encryption if possible but don't fail the call + ; if not possible. +;g726_non_standard=no ; When set to "yes" and an endpoint negotiates g.726 + ; audio then g.726 for AAL2 packing order is used contrary + ; to what is recommended in RFC3551. Note, 'g726aal2' also + ; needs to be specified in the codec allow list + ; (default: "no") +;inband_progress=no ; Determines whether chan_pjsip will indicate ringing + ; using inband progress (default: "no") +;call_group= ; The numeric pickup groups for a channel (default: "") +;pickup_group= ; The numeric pickup groups that a channel can pickup (default: + ; "") +;named_call_group= ; The named pickup groups for a channel (default: "") +;named_pickup_group= ; The named pickup groups that a channel can pickup + ; (default: "") +;device_state_busy_at=0 ; The number of in use channels which will cause busy + ; to be returned as device state (default: "0") +;t38_udptl=no ; Whether T 38 UDPTL support is enabled or not (default: "no") +;t38_udptl_ec=none ; T 38 UDPTL error correction method (default: "none") +;t38_udptl_maxdatagram=0 ; T 38 UDPTL maximum datagram size (default: + ; "0") +;fax_detect=no ; Whether CNG tone detection is enabled (default: "no") +;fax_detect_timeout=30 ; How many seconds into a call before fax_detect is + ; disabled for the call. + ; Zero disables the timeout. + ; (default: "0") +;t38_udptl_nat=no ; Whether NAT support is enabled on UDPTL sessions + ; (default: "no") +;tone_zone= ; Set which country s indications to use for channels created + ; for this endpoint (default: "") +;language= ; Set the default language to use for channels created for this + ; endpoint (default: "") +;one_touch_recording=no ; Determines whether one touch recording is allowed for + ; this endpoint (default: "no") +;record_on_feature=automixmon ; The feature to enact when one touch recording + ; is turned on (default: "automixmon") +;record_off_feature=automixmon ; The feature to enact when one touch recording + ; is turned off (default: "automixmon") +;rtp_engine=asterisk ; Name of the RTP engine to use for channels created + ; for this endpoint (default: "asterisk") +;allow_transfer=yes ; Determines whether SIP REFER transfers are allowed + ; for this endpoint (default: "yes") +;sdp_owner=- ; String placed as the username portion of an SDP origin o line + ; (default: "-") +;sdp_session=Asterisk ; String used for the SDP session s line (default: + ; "Asterisk") +;tos_audio=0 ; DSCP TOS bits for audio streams (default: "0") +;tos_video=0 ; DSCP TOS bits for video streams (default: "0") +;cos_audio=0 ; Priority for audio streams (default: "0") +;cos_video=0 ; Priority for video streams (default: "0") +;allow_subscribe=yes ; Determines if endpoint is allowed to initiate + ; subscriptions with Asterisk (default: "yes") +;sub_min_expiry=0 ; The minimum allowed expiry time for subscriptions + ; initiated by the endpoint (default: "0") +;from_user= ; Username to use in From header for requests to this endpoint + ; (default: "") +;mwi_from_user= ; Username to use in From header for unsolicited MWI NOTIFYs to + ; this endpoint (default: "") +;from_domain= ; Domain to user in From header for requests to this endpoint + ; (default: "") +;dtls_verify=no ; Verify that the provided peer certificate is valid (default: + ; "no") +;dtls_rekey=0 ; Interval at which to renegotiate the TLS session and rekey + ; the SRTP session (default: "0") +;dtls_auto_generate_cert= ; Enable ephemeral DTLS certificate generation (default: + ; "no") +;dtls_cert_file= ; Path to certificate file to present to peer (default: + ; "") +;dtls_private_key= ; Path to private key for certificate file (default: + ; "") +;dtls_cipher= ; Cipher to use for DTLS negotiation (default: "") +;dtls_ca_file= ; Path to certificate authority certificate (default: "") +;dtls_ca_path= ; Path to a directory containing certificate authority + ; certificates (default: "") +;dtls_setup= ; Whether we are willing to accept connections connect to the + ; other party or both (default: "") +;dtls_fingerprint= ; Hash to use for the fingerprint placed into SDP + ; (default: "SHA-256") +;srtp_tag_32=no ; Determines whether 32 byte tags should be used instead of 80 + ; byte tags (default: "no") +;set_var= ; Variable set on a channel involving the endpoint. For multiple + ; channel variables specify multiple 'set_var'(s) +;rtp_keepalive= ; Interval, in seconds, between comfort noise RTP packets if + ; RTP is not flowing. This setting is useful for ensuring that + ; holes in NATs and firewalls are kept open throughout a call. +;rtp_timeout= ; Hang up channel if RTP is not received for the specified + ; number of seconds when the channel is off hold (default: + ; "0" or not enabled) +;rtp_timeout_hold= ; Hang up channel if RTP is not received for the specified + ; number of seconds when the channel is on hold (default: + ; "0" or not enabled) +;contact_user= ; On outgoing requests, force the user portion of the Contact + ; header to this value (default: "") +;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. + ; default is no. +;asymmetric_rtp_codec= ; Allow the sending and receiving codec to differ and + ; not be automatically matched (default: "no") +;refer_blind_progress= ; Whether to notifies all the progress details on blind + ; transfer (default: "yes"). The value "no" is useful + ; for some SIP phones (Mitel/Aastra, Snom) which expect + ; a sip/frag "200 OK" after REFER has been accepted. +;notify_early_inuse_ringing = ; Whether to notifies dialog-info 'early' + ; on INUSE && RINGING state (default: "no"). + ; The value "yes" is useful for some SIP phones + ; (Cisco SPA) to be able to indicate and pick up + ; ringing devices. +;max_audio_streams= ; The maximum number of allowed negotiated audio streams + ; (default: 1) +;max_video_streams= ; The maximum number of allowed negotiated video streams + ; (default: 1) +;webrtc= ; When set to "yes" this also enables the following values that are needed + ; for webrtc: rtcp_mux, use_avpf, ice_support, and use_received_transport. + ; The following configuration settings also get defaulted as follows: + ; media_encryption=dtls + ; dtls_verify=fingerprint + ; dtls_setup=actpass + ; A dtls_cert_file and a dtls_ca_file still need to be specified. + ; Default for this option is "no" +;incoming_mwi_mailbox = ; Mailbox name to use when incoming MWI NOTIFYs are + ; received. + ; If an MWI NOTIFY is received FROM this endpoint, + ; this mailbox will be used when notifying other modules + ; of MWI status changes. If not set, incoming MWI + ; NOTIFYs are ignored. +;follow_early_media_fork = ; On outgoing calls, if the UAS responds with + ; different SDP attributes on subsequent 18X or 2XX + ; responses (such as a port update) AND the To tag + ; on the subsequent response is different than that + ; on the previous one, follow it. This usually + ; happens when the INVITE is forked to multiple UASs + ; and more than 1 sends an SDP answer. + ; This option must also be enabled in the system + ; section. + ; (default: yes) +;accept_multiple_sdp_answers = + ; On outgoing calls, if the UAS responds with + ; different SDP attributes on non-100rel 18X or 2XX + ; responses (such as a port update) AND the To tag on + ; the subsequent response is the same as that on the + ; previous one, process it. This can happen when the + ; UAS needs to change ports for some reason such as + ; using a separate port for custom ringback. + ; This option must also be enabled in the system + ; section. + ; (default: no) +;suppress_q850_reason_headers = + ; Suppress Q.850 Reason headers for this endpoint. + ; Some devices can't accept multiple Reason headers + ; and get confused when both 'SIP' and 'Q.850' Reason + ; headers are received. This option allows the + ; 'Q.850' Reason header to be suppressed. + ; (default: no) +;ignore_183_without_sdp = + ; Do not forward 183 when it doesn't contain SDP. + ; Certain SS7 internetworking scenarios can result in + ; a 183 to be generated for reasons other than early + ; media. Forwarding this 183 can cause loss of + ; ringback tone. This flag emulates the behavior of + ; chan_sip and prevents these 183 responses from + ; being forwarded. + ; (default: no) +;stir_shaken = + ; If this is enabled, STIR/SHAKEN operations will be + ; performed on this endpoint. This includes inbound + ; and outbound INVITEs. On an inbound INVITE, Asterisk + ; will check for an Identity header and attempt to + ; verify the call. On an outbound INVITE, Asterisk will + ; add an Identity header that others can use to verify + ; calls from this endpoint. Additional configuration is + ; done in stir_shaken.conf. + ; The STIR_SHAKEN dialplan function must be used to get + ; the verification results on inbound INVITEs. Nothing + ; happens to the call if verification fails; it's up to + ; you to determine what to do with the results. + ; (default: no) + +;==========================AUTH SECTION OPTIONS========================= +;[auth] +; SYNOPSIS: Authentication type +; +; Note: Using the same auth section for inbound and outbound +; authentication is not recommended. There is a difference in +; meaning for an empty realm setting between inbound and outbound +; authentication uses. Look to the CLI config help +; "config show help res_pjsip auth realm" or on the wiki for the +; difference. +; +;auth_type=userpass ; Authentication type (default: "userpass") +;nonce_lifetime=32 ; Lifetime of a nonce associated with this + ; authentication config (default: "32") +;md5_cred= ; MD5 Hash used for authentication (default: "") +;password= ; PlainText password used for authentication (default: "") +;realm= ; SIP realm for endpoint (default: "") +;type= ; Must be auth (default: "") +;username= ; Username to use for account (default: "") + + +;==========================DOMAIN_ALIAS SECTION OPTIONS========================= +;[domain_alias] +; SYNOPSIS: Domain Alias +;type= ; Must be of type domain_alias (default: "") +;domain= ; Domain to be aliased (default: "") + + +;==========================TRANSPORT SECTION OPTIONS========================= +;[transport] +; SYNOPSIS: SIP Transport +; +;async_operations=1 ; Number of simultaneous Asynchronous Operations + ; (default: "1") +;bind= ; IP Address and optional port to bind to for this transport (default: + ; "") +; Note that for the Websocket transport the TLS configuration is configured +; in http.conf and is applied for all HTTPS traffic. +;ca_list_file= ; File containing a list of certificates to read TLS ONLY + ; (default: "") +;ca_list_path= ; Path to directory containing certificates to read TLS ONLY. + ; PJProject version 2.4 or higher is required for this option to + ; be used. + ; (default: "") +;cert_file= ; Certificate file for endpoint TLS ONLY + ; Will read .crt or .pem file but only uses cert, + ; a .key file must be specified via priv_key_file. + ; Since PJProject version 2.5: If the file name ends in _rsa, + ; for example "asterisk_rsa.pem", the files "asterisk_dsa.pem" + ; and/or "asterisk_ecc.pem" are loaded (certificate, inter- + ; mediates, private key), to support multiple algorithms for + ; server authentication (RSA, DSA, ECDSA). If the chains are + ; different, at least OpenSSL 1.0.2 is required. + ; (default: "") +;cipher= ; Preferred cryptography cipher names TLS ONLY (default: "") +;method= ; Method of SSL transport TLS ONLY (default: "") +;priv_key_file= ; Private key file TLS ONLY (default: "") +;verify_client= ; Require verification of client certificate TLS ONLY (default: + ; "") +;verify_server= ; Require verification of server certificate TLS ONLY (default: + ; "") +;require_client_cert= ; Require client certificate TLS ONLY (default: "") +;domain= ; Domain the transport comes from (default: "") +;external_media_address= ; External IP address to use in RTP handling + ; (default: "") +;external_signaling_address= ; External address for SIP signalling (default: + ; "") +;external_signaling_port=0 ; External port for SIP signalling (default: + ; "0") +;local_net= ; Network to consider local used for NAT purposes (default: "") +;password= ; Password required for transport (default: "") +;protocol=udp ; Protocol to use for SIP traffic (default: "udp") +;type= ; Must be of type transport (default: "") +;tos=0 ; Enable TOS for the signalling sent over this transport (default: "0") +;cos=0 ; Enable COS for the signalling sent over this transport (default: "0") +;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. +;allow_reload=no ; Although transports can now be reloaded, that may not be + ; desirable because of the slight possibility of dropped + ; calls. To make sure there are no unintentional drops, if + ; this option is set to 'no' (the default) changes to the + ; particular transport will be ignored. If set to 'yes', + ; changes (if any) will be applied. +;symmetric_transport=no ; When a request from a dynamic contact comes in on a + ; transport with this option set to 'yes', the transport + ; name will be saved and used for subsequent outgoing + ; requests like OPTIONS, NOTIFY and INVITE. It's saved + ; as a contact uri parameter named 'x-ast-txp' and will + ; display with the contact uri in CLI, AMI, and ARI + ; output. On the outgoing request, if a transport + ; wasn't explicitly set on the endpoint AND the request + ; URI is not a hostname, the saved transport will be + ; used and the 'x-ast-txp' parameter stripped from the + ; outgoing packet. + +;==========================AOR SECTION OPTIONS========================= +;[aor] +; SYNOPSIS: The configuration for a location of an endpoint +;contact= ; Permanent contacts assigned to AoR (default: "") +;default_expiration=3600 ; Default expiration time in seconds for + ; contacts that are dynamically bound to an AoR + ; (default: "3600") +;mailboxes= ; Allow subscriptions for the specified mailbox(es) + ; This option applies when an external entity subscribes to an AoR + ; for Message Waiting Indications. (default: "") +;voicemail_extension= ; The voicemail extension to send in the NOTIFY Message-Account header + ; (default: global/default_voicemail_extension) +;maximum_expiration=7200 ; Maximum time to keep an AoR (default: "7200") +;max_contacts=0 ; Maximum number of contacts that can bind to an AoR (default: + ; "0") +;minimum_expiration=60 ; Minimum keep alive time for an AoR (default: "60") +;remove_existing=no ; Allow a registration to succeed by displacing any existing + ; contacts that now exceed the max_contacts count. Any + ; removed contacts are the next to expire. The behaviour is + ; beneficial when rewrite_contact is enabled and max_contacts + ; is greater than one. The removed contact is likely the old + ; contact created by rewrite_contact that the device is + ; refreshing. + ; (default: "no") +;type= ; Must be of type aor (default: "") +;qualify_frequency=0 ; Interval at which to qualify an AoR via OPTIONS requests. + ; (default: "0") +;qualify_timeout=3.0 ; Qualify timeout in fractional seconds (default: "3.0") +;authenticate_qualify=no ; Authenticates a qualify request if needed + ; (default: "no") +;outbound_proxy= ; Proxy through which to send OPTIONS requests, a full SIP URI + ; must be provided (default: "") + + +;==========================SYSTEM SECTION OPTIONS========================= +[system] +type=system +; SYNOPSIS: Options that apply to the SIP stack as well as other system-wide settings +;timer_t1=500 ; Set transaction timer T1 value milliseconds (default: "500") +;timer_b=32000 ; Set transaction timer B value milliseconds (default: "32000") +;compact_headers=no ; Use the short forms of common SIP header names + ; (default: "no") +;threadpool_initial_size=0 ; Initial number of threads in the res_pjsip + ; threadpool (default: "0") +;threadpool_auto_increment=5 ; The amount by which the number of threads is + ; incremented when necessary (default: "5") +;threadpool_idle_timeout=60 ; Number of seconds before an idle thread + ; should be disposed of (default: "60") +;threadpool_max_size=0 ; Maximum number of threads in the res_pjsip threadpool + ; A value of 0 indicates no maximum (default: "0") +;disable_tcp_switch=yes ; Disable automatic switching from UDP to TCP transports + ; if outgoing request is too large. + ; See RFC 3261 section 18.1.1. + ; Disabling this option has been known to cause interoperability + ; issues, so disable at your own risk. + ; (default: "yes") +;follow_early_media_fork = ; On outgoing calls, if the UAS responds with + ; different SDP attributes on subsequent 18X or 2XX + ; responses (such as a port update) AND the To tag + ; on the subsequent response is different than that + ; on the previous one, follow it. This usually + ; happens when the INVITE is forked to multiple UASs + ; and more than 1 sends an SDP answer. + ; This option must also be enabled on endpoints that + ; require this functionality. + ; (default: yes) +;accept_multiple_sdp_answers = + ; On outgoing calls, if the UAS responds with + ; different SDP attributes on non-100rel 18X or 2XX + ; responses (such as a port update) AND the To tag on + ; the subsequent response is the same as that on the + ; previous one, process it. This can happen when the + ; UAS needs to change ports for some reason such as + ; using a separate port for custom ringback. + ; This option must also be enabled on endpoints that + ; require this functionality. + ; (default: no) +;disable_rport=no ; Disable the use of "rport" in outgoing requests. +;type= ; Must be of type system (default: "") + +;==========================GLOBAL SECTION OPTIONS========================= +;[global] +; SYNOPSIS: Options that apply globally to all SIP communications +;max_forwards=70 ; Value used in Max Forwards header for SIP requests + ; (default: "70") +;type= ; Must be of type global (default: "") +;user_agent=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 user_agent string. +;default_outbound_endpoint=default_outbound_endpoint ; Endpoint to use when + ; sending an outbound + ; request to a URI + ; without a specified + ; endpoint (default: "d + ; efault_outbound_endpo + ; int") +;debug=no ; Enable/Disable SIP debug logging. Valid options include yes|no + ; or a host address (default: "no") +;keep_alive_interval=90 ; The interval (in seconds) at which to send (double CRLF) + ; keep-alives on all active connection-oriented transports; + ; for connection-less like UDP see qualify_frequency. + ; (default: "90") +;contact_expiration_check_interval=30 + ; The interval (in seconds) to check for expired contacts. +;disable_multi_domain=no + ; Disable Multi Domain support. + ; If disabled it can improve realtime performace by reducing + ; number of database requsts + ; (default: "no") +;endpoint_identifier_order=ip,username,anonymous + ; The order by which endpoint identifiers are given priority. + ; Currently, "ip", "header", "username", "auth_username" and "anonymous" + ; are valid identifiers as registered by the res_pjsip_endpoint_identifier_* + ; modules. Some modules like res_pjsip_endpoint_identifier_user register + ; more than one identifier. Use the CLI command "pjsip show identifiers" + ; to see the identifiers currently available. + ; (default: ip,username,anonymous) +;max_initial_qualify_time=4 ; The maximum amount of time (in seconds) from + ; startup that qualifies should be attempted on all + ; contacts. If greater than the qualify_frequency + ; for an aor, qualify_frequency will be used instead. +;regcontext=sipregistrations ; If regcontext is specified, Asterisk will dynamically + ; create and destroy a NoOp priority 1 extension for a + ; given endpoint who registers or unregisters with us. + ; The extension added is the name of the endpoint. +;default_voicemail_extension=asterisk + ; The voicemail extension to send in the NOTIFY Message-Account header + ; if not set on endpoint or aor. + ; (default: "") +; +; The following unidentified_request options are only used when "auth_username" +; matching is enabled in "endpoint_identifier_order". +; +;unidentified_request_count=5 ; The number of unidentified requests that can be + ; received from a single IP address in + ; unidentified_request_period seconds before a security + ; event is generated. (default: 5) +;unidentified_request_period=5 ; See above. (default: 5 seconds) +;unidentified_request_prune_interval=30 + ; The interval at which unidentified requests + ; are check to see if they can be pruned. If they're + ; older than twice the unidentified_request_period, + ; they're pruned. +; +;default_from_user=asterisk ; When Asterisk generates an outgoing SIP request, the + ; From header username will be set to this value if + ; there is no better option (such as CallerID or + ; endpoint/from_user) to be used +;default_realm=asterisk ; When Asterisk generates a challenge, the digest realm + ; will be set to this value if there is no better option + ; (such as auth/realm) to be used. + + ; Asterisk Task Processor Queue Size + ; On heavy loaded system with DB storage you may need to increase + ; taskprocessor queue. + ; If the taskprocessor queue size reached high water level, + ; the alert is triggered. + ; If the alert is set the pjsip distibutor stops processing incoming + ; requests until the alert is cleared. + ; The alert is cleared when taskprocessor queue size drops to the + ; low water clear level. + ; The next options set taskprocessor queue levels for MWI. +;mwi_tps_queue_high=500 ; Taskprocessor high water alert trigger level. +;mwi_tps_queue_low=450 ; Taskprocessor low water clear alert level. + ; The default is -1 for 90% of high water level. + + ; Unsolicited MWI + ; If there are endpoints configured with unsolicited MWI + ; then res_pjsip_mwi module tries to send MWI to all endpoints on startup. +;mwi_disable_initial_unsolicited=no ; Disable sending unsolicited mwi to all endpoints on startup. + ; If disabled then unsolicited mwi will start processing + ; on the endpoint's next contact update. + +;ignore_uri_user_options=no ; Enable/Disable ignoring SIP URI user field options. + ; If you have this option enabled and there are semicolons + ; in the user field of a SIP URI then the field is truncated + ; at the first semicolon. This effectively makes the semicolon + ; a non-usable character for PJSIP endpoint names, extensions, + ; and AORs. This can be useful for improving compatability with + ; an ITSP that likes to use user options for whatever reason. + ; Example: + ; URI: "sip:1235557890;phone-context=national@x.x.x.x;user=phone" + ; The user field is "1235557890;phone-context=national" + ; Which becomes this: "1235557890" + ; + ; Note: The caller-id and redirecting number strings obtained + ; from incoming SIP URI user fields are always truncated at the + ; first semicolon. + +;send_contact_status_on_update_registration=no ; Enable sending AMI ContactStatus + ; event when a device refreshes its registration + ; (default: "no") + +;taskprocessor_overload_trigger=global + ; Set the trigger the distributor will use to detect + ; taskprocessor overloads. When triggered, the distributor + ; will not accept any new requests until the overload has + ; cleared. + ; "global": (default) Any taskprocessor overload will trigger. + ; "pjsip_only": Only pjsip taskprocessor overloads will trigger. + ; "none": No overload detection will be performed. + ; WARNING: The "none" and "pjsip_only" options should be used + ; with extreme caution and only to mitigate specific issues. + ; Under certain conditions they could make things worse. + +;norefersub=yes ; Enable sending norefersub option tag in Supported header to advertise + ; that the User Agent is capable of accepting a REFER request with + ; creating an implicit subscription (see RFC 4488). + ; (default: "yes") + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_acl +;==========================ACL SECTION OPTIONS========================= +;[acl] +; SYNOPSIS: Access Control List +;acl= ; List of IP ACL section names in acl conf (default: "") +;contact_acl= ; List of Contact ACL section names in acl conf (default: "") +;contact_deny= ; List of Contact header addresses to deny (default: "") +;contact_permit= ; List of Contact header addresses to permit (default: + ; "") +;deny= ; List of IP addresses to deny access from (default: "") +;permit= ; List of IP addresses to permit access from (default: "") +;type= ; Must be of type acl (default: "") + + + + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_outbound_registration +;==========================REGISTRATION SECTION OPTIONS========================= +;[registration] +; SYNOPSIS: The configuration for outbound registration +;auth_rejection_permanent=yes ; Determines whether failed authentication + ; challenges are treated as permanent failures + ; (default: "yes") +;client_uri= ; Client SIP URI used when attemping outbound registration + ; (default: "") +;contact_user= ; Contact User to use in request (default: "") +;expiration=3600 ; Expiration time for registrations in seconds + ; (default: "3600") +;max_retries=10 ; Maximum number of registration attempts (default: "10") +;outbound_auth= ; Authentication object to be used for outbound registrations + ; (default: "") +;outbound_proxy= ; Proxy through which to send registrations, a full SIP URI + ; must be provided (default: "") +;retry_interval=60 ; Interval in seconds between retries if outbound + ; registration is unsuccessful (default: "60") +;forbidden_retry_interval=0 ; Interval used when receiving a 403 Forbidden + ; response (default: "0") +;fatal_retry_interval=0 ; Interval used when receiving a fatal response. + ; (default: "0") A fatal response is any permanent + ; failure (non-temporary 4xx, 5xx, 6xx) response + ; received from the registrar. NOTE - if also set + ; the 'forbidden_retry_interval' takes precedence + ; over this one when a 403 is received. Also, if + ; 'auth_rejection_permanent' equals 'yes' a 401 and + ; 407 become subject to this retry interval. +;server_uri= ; SIP URI of the server to register against (default: "") +;transport= ; Transport used for outbound authentication (default: "") +;line= ; When enabled this option will cause a 'line' parameter to be + ; added to the Contact header placed into the outgoing + ; registration request. If the remote server sends a call + ; this line parameter will be used to establish a relationship + ; to the outbound registration, ultimately causing the + ; configured endpoint to be used (default: "no") +;endpoint= ; When line support is enabled this configured endpoint name + ; is used for incoming calls that are related to the outbound + ; registration (default: "") +;type= ; Must be of type registration (default: "") + + + + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_endpoint_identifier_ip +;==========================IDENTIFY SECTION OPTIONS========================= +;[identify] +; SYNOPSIS: Identifies endpoints via some criteria. +; +; NOTE: If multiple matching criteria are provided then an inbound request will +; be matched to the endpoint if it matches ANY of the criteria. +;endpoint= ; Name of endpoint identified (default: "") +;srv_lookups=yes ; Perform SRV lookups for provided hostnames. (default: yes) +;match= ; Comma separated list of IP addresses, networks, or hostnames to match + ; against (default: "") +;match_header= ; SIP header with specified value to match against (default: "") +;type= ; Must be of type identify (default: "") + + + + +;========================PHONEPROV_USER SECTION OPTIONS======================= +;[phoneprov] +; SYNOPSIS: Contains variables for autoprovisioning each user +;endpoint= ; The endpoint from which to gather username, secret, etc. (default: "") +;PROFILE= ; The name of a profile configured in phoneprov.conf (default: "") +;MAC= ; The mac address for this user (default: "") +;OTHERVAR= ; Any other name value pair to be used in templates (default: "") + ; Common variables include LINE, LINEKEYS, etc. + ; See phoneprov.conf.sample for others. +;type= ; Must be of type phoneprov (default: "") + + + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_outbound_publish +;======================OUTBOUND_PUBLISH SECTION OPTIONS===================== +; See https://wiki.asterisk.org/wiki/display/AST/Publishing+Extension+State +; for more information. +;[outbound-publish] +;type=outbound-publish ; Must be of type 'outbound-publish'. + +;expiration=3600 ; Expiration time for publications in seconds + +;outbound_auth= ; Authentication object(s) to be used for outbound + ; publishes. + ; This is a comma-delimited list of auth sections + ; defined in pjsip.conf used to respond to outbound + ; authentication challenges. + ; Using the same auth section for inbound and + ; outbound authentication is not recommended. There + ; is a difference in meaning for an empty realm + ; setting between inbound and outbound authentication + ; uses. See the auth realm description for details. + +;outbound_proxy= ; SIP URI of the outbound proxy used to send + ; publishes + +;server_uri= ; SIP URI of the server and entity to publish to. + ; This is the URI at which to find the entity and + ; server to send the outbound PUBLISH to. + ; This URI is used as the request URI of the outbound + ; PUBLISH request from Asterisk. + +;from_uri= ; SIP URI to use in the From header. + ; This is the URI that will be placed into the From + ; header of outgoing PUBLISH messages. If no URI is + ; specified then the URI provided in server_uri will + ; be used. + +;to_uri= ; SIP URI to use in the To header. + ; This is the URI that will be placed into the To + ; header of outgoing PUBLISH messages. If no URI is + ; specified then the URI provided in server_uri will + ; be used. + +;event= ; Event type of the PUBLISH. + +;max_auth_attempts= ; Maximum number of authentication attempts before + ; stopping the pub. + +;transport= ; Transport used for outbound publish. + ; A transport configured in pjsip.conf. As with other + ; res_pjsip modules, this will use the first + ; available transport of the appropriate type if + ; unconfigured. + +;multi_user=no ; Enable multi-user support (Asterisk 14+ only) + + + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_pubsub +;=============================RESOURCE-LIST=================================== +; See https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=30278158 +; for more information. +;[resource_list] +;type=resource_list ; Must be of type 'resource_list'. + +;event= ; The SIP event package that the list resource. + ; belongs to. The SIP event package describes the + ; types of resources that Asterisk reports the state + ; of. + +;list_item= ; The name of a resource to report state on. + ; In general Asterisk looks up list items in the + ; following way: + ; 1. Check if the list item refers to another + ; configured resource list. + ; 2. Pass the name of the resource off to + ; event-package-specific handlers to find the + ; specified resource. + ; The second part means that the way the list item + ; is specified depends on what type of list this is. + ; For instance, if you have the event set to + ; presence, then list items should be in the form of + ; dialplan_extension@dialplan_context. For + ; message-summary, mailbox names should be listed. + +;full_state=no ; Indicates if the entire list's state should be + ; sent out. + ; If this option is enabled, and a resource changes + ; state, then Asterisk will construct a notification + ; that contains the state of all resources in the + ; list. If the option is disabled, Asterisk will + ; construct a notification that only contains the + ; states of resources that have changed. + ; NOTE: Even with this option disabled, there are + ; certain situations where Asterisk is forced to send + ; a notification with the states of all resources in + ; the list. When a subscriber renews or terminates + ; its subscription to the list, Asterisk MUST send + ; a full state notification. + +;notification_batch_interval=0 + ; Time Asterisk should wait, in milliseconds, + ; before sending notifications. + +;==========================INBOUND_PUBLICATION================================ +; See https://wiki.asterisk.org/wiki/display/AST/Exchanging+Device+and+Mailbox+State+Using+PJSIP +; for more information. +;[inbound-publication] +;type= ; Must be of type 'inbound-publication'. + +;endpoint= ; Optional name of an endpoint that is only allowed + ; to publish to this resource. + + +; MODULE PROVIDING BELOW SECTION(S): res_pjsip_publish_asterisk +;==========================ASTERISK_PUBLICATION=============================== +; See https://wiki.asterisk.org/wiki/display/AST/Exchanging+Device+and+Mailbox+State+Using+PJSIP +; for more information. +;[asterisk-publication] +;type=asterisk-publication ; Must be of type 'asterisk-publication'. + +;devicestate_publish= ; Optional name of a publish item that can be used + ; to publish a req. + +;mailboxstate_publish= ; Optional name of a publish item that can be used + ; to publish a req. + +;device_state=no ; Whether we should permit incoming device state + ; events. + +;device_state_filter= ; Optional regular expression used to filter what + ; devices we accept events for. + +;mailbox_state=no ; Whether we should permit incoming mailbox state + ; events. + +;mailbox_state_filter= ; Optional regular expression used to filter what + ; mailboxes we accept events for. + +[transport-udp] +type=transport +protocol=udp +bind=0.0.0.0 + + +; questa acl si applica a tutto +[acl] +type=acl +deny=0.0.0.0/0.0.0.0 +permit=192.168.1.0/255.255.255.0 + +[removeme] +type=endpoint +deny=0.0.0.0/0.0.0.0 +permit=192.168.1.0/255.255.255.0 +transport=transport-udp +language=it +aors=removeme +auth=removeme + +[removeme] +type=aors +[removeme] +type=auth +username=removeme +password=removeme + +[lan](!) +type=endpoint +deny=0.0.0.0/0.0.0.0 +permit=192.168.1.0/255.255.255.0 +transport=transport-udp +language=it +disallow=all +; allow=ilbc +; allow=g729 +; allow=gsm +; allow=g723 +; allow=silk +; allow=silk16 +; allow=silk24 +allow=ulaw +allow=speex16 +; allow=speex32 + +[interno](!,lan) +context=from-interni + +[ext](!,lan) +context=from-ext + + +[baseauth](!) +type=auth +auth_type=userpass + +[baseaor](!) +type=aor +max_contacts=1 + +[400](interno) +context=from-mixer +aors = 400 +auth = 400 + +[400](baseaor) + +[400](baseauth) +username=400 +password=mixerone + +[401](interno) +context=from-regia +aors = 401 +auth=401 + +[401](baseaor) +[401](baseauth) +username=401 +password=pass401 + + +[402](ext) +; XXX: togli questo commento e fallo tornare un (interno) +; context=from-regia +aors = 402 +auth=402 + +[402](baseaor) +[402](baseauth) +username=402 +password=pass402 + + + +[403](interno) +aors = 403 +auth=403 + +[403](baseaor) +[403](baseauth) +username=403 +password=pass403 + + + +[404](interno) +aors = 404 +auth=404 + +[404](baseaor) +[404](baseauth) +username=404 +password=pass404 + + + +[020202](ext) +aors = 020202 +auth=020202 + +[020202](baseaor) +[020202](baseauth) +username=020202 +password=pass020202 diff --git a/transfer_back.py b/transfer_back/transfer_back.py similarity index 100% rename from transfer_back.py rename to transfer_back/transfer_back.py