From fd43b05693b3d3afef5f13c0e503879a3ceb04ae Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Thu, 28 May 2026 15:30:53 +0000 Subject: [PATCH] docs: Remove trailing blank line from all code blocks --- docs/Asterisk-Community/IRC.md | 3 - ...Answer-Playback-and-Hangup-Applications.md | 4 -- .../Asterisk-Queues/Building-Queues.md | 60 ------------------- .../Assigning-Agents-to-Queues.md | 4 -- .../Controlling-the-way-Queues-Call-Agents.md | 2 - .../Queue-Pre-Acknowledgement-Messages.md | 1 - .../Routing-Incoming-Calls-to-Queues.md | 4 -- .../ConfBridge/ConfBridge-AMI-Actions.md | 10 ---- .../ConfBridge/ConfBridge-AMI-Events.md | 6 -- .../ConfBridge/ConfBridge-CLI-Commands.md | 15 ----- .../ConfBridge/ConfBridge-Configuration.md | 5 -- .../ConfBridge/ConfBridge-Functions.md | 4 -- .../ConfBridge/index.md | 2 - .../Applications/Directory-Application.md | 2 - ...arly-Media-and-the-Progress-Application.md | 3 - .../Applications/External-IVR-Interface.md | 3 - .../Applications/MacroExclusive.md | 4 -- docs/Configuration/Applications/SMS.md | 3 - .../Basic-SLA-Configuration-Example.md | 2 - .../Applications/The-Read-Application.md | 1 - .../The-Verbose-and-NoOp-Applications.md | 1 - .../Voicemail/Message-Waiting-Indication.md | 2 - .../Channel-Drivers/IP-Quality-of-Service.md | 1 - .../Configuring-chan_iax2-for-IPv6.md | 2 - .../IAX2-Security.md | 5 -- .../Using-Callfiles-and-Local-Channels.md | 13 ---- .../Local-Channel/Local-Channel-Modifiers.md | 2 - .../Mobile-Channel-Dialplan-Hints.md | 1 - .../Motif/Calling-using-Google.md | 10 ---- .../Configuring-chan_sip-for-IPv6.md | 4 -- ...ing-chan_sip-for-Presence-Subscriptions.md | 6 -- .../chan_sip-State-and-Presence-Options.md | 7 --- .../Asterisk-PJSIP-Troubleshooting-Guide.md | 30 ---------- .../Configuring-Outbound-Registrations.md | 10 ---- .../Configuring-res_pjsip-for-IPv6.md | 3 - ...ng-res_pjsip-for-Presence-Subscriptions.md | 2 - ...nfiguring-res_pjsip-to-work-through-NAT.md | 1 - .../Dialing-PJSIP-Channels.md | 4 -- ...ng-Device-and-Mailbox-State-Using-PJSIP.md | 3 - .../Migrating-from-chan_sip-to-res_pjsip.md | 9 --- .../PJSIP-Advanced-Codec-Negotiation.md | 1 - ...onfiguration-Sections-and-Relationships.md | 15 ----- .../PJSIP-Configuration-Wizard.md | 5 -- .../PJSIP-Transport-Selection.md | 5 -- .../Publishing-Extension-State.md | 4 -- .../Resource-List-Subscriptions-RLS.md | 9 --- .../Setting-up-PJSIP-Realtime.md | 17 ------ .../res_pjsip-Configuration-Examples.md | 4 -- .../res_pjsip-Remote-Attended-Transfers.md | 5 -- .../Skinny/Skinny-call-logging.md | 2 - .../Introduction-to-the-Unistim-channel.md | 8 --- .../Asterisk-Builtin-mini-HTTP-Server.md | 1 - .../Asterisk-Main-Configuration-File.md | 2 - .../Configuring-Localized-Tone-Indications.md | 3 - .../Configuring-the-Asterisk-Module-Loader.md | 5 -- .../Logging-Configuration.md | 2 - .../Core-Configuration/Named-ACLs.md | 10 ---- .../AEL-Example-Usages/AEL-Conditionals.md | 1 - .../Dialplan/Conditional-Applications.md | 3 - .../Contexts-Extensions-and-Priorities.md | 5 -- .../Dialplan/Expressions/index.md | 2 - .../Include-Statements-Basics.md | 2 - ...Statements-to-Create-Classes-of-Service.md | 3 - .../Advanced-pbx_lua-Topics.md | 6 -- .../Dialplan-to-Lua-Reference.md | 15 ----- ...k-from-Lua-apps-variables-and-functions.md | 7 --- .../Lua-Dialplan-Examples.md | 2 - .../Lua-Dialplan-Hints.md | 1 - .../Lua-Dialplan-Tips-and-Tricks.md | 5 -- .../Lua-Dialplan-Configuration/index.md | 2 - .../Dialplan/Pattern-Matching.md | 10 ---- .../Dialplan/Subroutines/Gosub.md | 6 -- .../Dialplan/Subroutines/Hangup-Handlers.md | 9 --- .../Dialplan/Subroutines/Macros.md | 5 -- .../Subroutines/Pre-Bridge-Handlers.md | 11 ---- .../Dialplan/Subroutines/Pre-Dial-Handlers.md | 7 --- .../Dialplan/Switch-Statements.md | 3 - .../Channel-Variables/Case-Sensitivity.md | 9 --- ...ting-and-Substituting-Channel-Variables.md | 4 -- .../Channel-Variables/Variable-Inheritance.md | 2 - .../Variables/Global-Variables-Basics.md | 2 - ...PRIORITY-UNIQUEID-and-CHANNEL-Variables.md | 1 - .../Features/Built-in-Dynamic-Features.md | 2 - docs/Configuration/Features/Call-Parking.md | 9 --- docs/Configuration/Features/Call-Pickup.md | 11 ---- .../Features/Custom-Dynamic-Features.md | 3 - .../Features/Feature-Code-Call-Transfers.md | 6 -- .../Features/One-Touch-Features.md | 2 - .../Asterisk-Dialplan-Function-Examples.md | 7 --- .../Manipulating-Party-ID-Information.md | 9 --- docs/Configuration/Functions/index.md | 4 -- .../Configuring-Asterisk-Calendaring.md | 4 -- .../Interfaces/Asterisk-Calendaring/index.md | 1 - ...risk-External-Application-Protocol-AEAP.md | 18 ------ .../Asterisk-Configuration-for-ARI.md | 3 - .../Using-Swagger-to-Drive-ARI.md | 1 - .../Getting-Started-with-ARI/index.md | 3 - .../index.md | 3 - .../ARI-and-Bridges-Basic-Mixing-Bridges.md | 5 -- .../ARI-and-Bridges-Bridge-Operations.md | 11 ---- .../ARI-and-Bridges-Holding-Bridges.md | 13 ---- .../Introduction-to-ARI-and-Bridges/index.md | 15 ----- .../ARI-and-Channels-Handling-DTMF.md | 28 --------- ...and-Channels-Manipulating-Channel-State.md | 10 ---- ...-and-Channels-Simple-Media-Manipulation.md | 6 -- .../Introduction-to-ARI-and-Channels/index.md | 15 ----- .../ARI-and-Media-Part-1-Recording.md | 6 -- .../ARI-and-Media-Part-2-Playbacks.md | 4 -- .../index.md | 4 -- .../ARI-Push-Configuration.md | 7 --- .../The-Asterisk-Resource/index.md | 1 - .../Asterisk-REST-Interface-ARI/index.md | 1 - .../Followme-Realtime.md | 2 - .../LDAP-Realtime-Driver.md | 6 -- .../ODBC/Configuring-res_odbc.md | 2 - ...ng-Asterisk-Connected-to-MySQL-via-ODBC.md | 14 ----- .../cURL.md | 25 -------- .../Distributed-Device-State/Corosync.md | 10 ---- .../Distributed-Device-State-with-AIS.md | 4 -- ...stributed-Device-State-with-XMPP-PubSub.md | 2 - ...ilizing-the-StatsD-Dialplan-Application.md | 2 - .../PostgreSQL-CDR-Backend.md | 3 - .../RADIUS-CDR-Backend.md | 9 --- .../MSSQL-CEL-Backend.md | 11 ---- .../PostgreSQL-CEL-Backend.md | 2 - .../RADIUS-CEL-Backend.md | 9 --- .../CEL-Design-Goals.md | 3 - ...Configuring-Asterisk-for-WebRTC-Clients.md | 2 - ...stalling-and-Configuring-CyberMegaPhone.md | 6 -- .../WebRTC/WebRTC-tutorial-using-SIPML5.md | 3 - .../Asterisk-Security-Event-Logger.md | 1 - .../Background-and-WaitExten-Applications.md | 1 - .../Creating-a-Simple-IVR-Menu.md | 2 - .../Goto-Application-and-Priority-Labels.md | 1 - .../Handling-Special-Extensions.md | 2 - .../Record-Application.md | 1 - ...r-SayAlpha-and-SayPhonetic-Applications.md | 1 - .../Creating-Dialplan-Extensions.md | 2 - .../Making-a-Phone-Call.md | 1 - .../Registering-Phones-to-Asterisk.md | 2 - .../DUNDi-Dialplan-Functions.md | 1 - .../Digium-General-Peering-Agreement.md | 1 - .../Conference-Bridge-Messaging.md | 3 - .../Conference-Participant-Messaging.md | 2 - .../Civic-Address.md | 3 - .../Geography-Markup-Language.md | 1 - .../URI.md | 4 -- .../About-the-Sounds-Tools.md | 1 - .../Signaling-System-Number-7.md | 2 - .../PLC-Background-on-Translation.md | 2 - .../Packet-Loss-Concealment-PLC/PLC-Tips.md | 1 - ...risk-Versions-20.17.0-22.7.0-and-23.1.0.md | 5 -- docs/Deployment/Performance-Tuning/index.md | 5 -- .../Configuration-of-users.conf.md | 2 - .../Creating-Phone-Profiles.md | 1 - .../Installing-Blink-SIP-client.md | 3 - .../Secure-Calling-Tutorial/index.md | 14 ----- ...Troubleshooting-Asterisk-Module-Loading.md | 15 ----- .../Unable-to-connect-to-remote-Asterisk.md | 1 - .../CLI-commands-useful-for-debugging.md | 6 -- .../Development/Debugging/Function-Tracing.md | 1 - ...ce-Asterisk-versions-13.14.0-and-14.3.0.md | 11 ---- .../Debugging/MALLOC_DEBUG-Compiler-Flag.md | 5 -- .../Debugging/Reference-Count-Debugging.md | 3 - ...he-Hoard-Memory-Allocator-with-Asterisk.md | 2 - .../Open-Features-and-Improvements.md | 1 - .../Asterisk-Sounds-Submission-Process.md | 2 - .../Commit-Messages.md | 1 - .../Release-Management.md | 1 - .../Asterisk-Channel-Data-Stores.md | 2 - .../Create-a-new-resource-with-ARI.md | 4 -- .../External-Media-and-ARI.md | 1 - .../Modules.md | 5 -- ...r-ao2-hash-sort-and-callback-functions..md | 4 -- .../Using-the-Configuration-Framework.md | 12 ---- .../Alembic-Scripts.md | 2 - .../Build-System-Architecture.md | 1 - .../Locking-in-Asterisk.md | 7 --- .../Measuring-SIP-Channel-Performance.md | 4 -- .../Upgrading-pjproject-Bundled.md | 4 -- .../Reference-Information/Repotools.md | 5 -- .../Media-Architecture-Proposal.md | 36 ----------- .../AMI-Event-Documentation.md | 9 --- ...ion-parsing-with-the-Config-Options-API.md | 10 ---- .../Pre-dial-handlers-Specification.md | 1 - .../Unique-Call-ID-Logging.md | 8 --- .../Unistim-channel-improvements.md | 1 - .../Asterisk-11-Projects/Who-Hung-Up.md | 1 - .../app_macro-Deprecation.md | 4 -- .../Asterisk-Client-Library-Generator.md | 1 - .../Using-the-Stasis-Message-Bus/index.md | 3 - .../Stasis-Message-Bus/index.md | 4 -- .../Asterisk-12-API-Improvements/index.md | 1 - .../Asterisk-12-Bridging-API.md | 40 ------------- .../Asterisk-12-Bridging-Project/index.md | 5 -- .../Writing-a-SIP-Session-Supplement.md | 12 ---- ...ent-Subscription-and-Publication-Design.md | 3 - ...nts-and-Location-A-Match-Made-in-Heaven.md | 7 --- .../res_sip-design/index.md | 4 -- .../res_sip_session-design.md | 3 - .../Tests-for-Basic-Call-Functionality.md | 2 - .../New-SIP-channel-driver/index.md | 4 -- .../Asterisk-13-ARI-Improvements/index.md | 7 --- .../Media-Format-Rewrite.md | 18 ------ .../PJSIP-Large-Messages.md | 1 - .../PJSIP-Subscription-Abstraction-Plan.md | 10 ---- .../Resource-List-Configuration.md | 9 --- .../Resource-List-Subscription-Test-Plan.md | 9 --- .../Resource-List-Subscriptions/index.md | 1 - ...-Project-ARI-and-generic-Text-To-Speech.md | 1 - .../Asterisk-14-Project-Media-Playlists.md | 6 -- .../Asterisk-14-Project-URI-Media-Playback.md | 14 ----- .../Asterisk-Beacon-Module.md | 9 --- .../DNS-NAPTRSRV-Test-Plan-for-PJSIP.md | 14 ----- .../Asterisk-DNS-API/index.md | 13 ---- .../Module-Loader-Ideas.md | 4 -- .../Roadmap/Asterisk-15-Projects/SDP-Work.md | 6 -- .../Asterisk-15-Projects/Stream-Support.md | 8 --- .../WebRTC-User-Experience-Improvements.md | 2 - .../Asterisk-18-Projects/STIR-and-SHAKEN.md | 8 --- .../Speech-to-Text-Text-to-Speech-Emotion.md | 11 ---- .../Adding-to-an-existing-section.md | 6 -- .../Comments/Block-Comments.md | 3 - .../Comments/Comments-on-a-Single-Line.md | 1 - .../Templates/Template-Syntax.md | 1 - .../Templates/Using-Templates.md | 4 -- ...-include-tryinclude-and-exec-Constructs.md | 2 - .../SIP-Realtime-MySQL-table-structure.md | 1 - .../Sorcery/Sorcery-Caching.md | 9 --- .../Asterisk-Configuration/Sorcery/index.md | 5 -- .../Asterisk-Internal-Database/index.md | 1 - .../Directory-and-File-Structure.md | 11 ---- .../Key-Concepts/Frames/Audiohooks.md | 3 - .../Extension-State-and-Hints.md | 3 - .../States-and-Presence/Presence-State.md | 4 -- .../Querying-and-Manipulating-State.md | 3 - docs/Getting-Started/Hello-World.md | 7 --- .../Building-and-Installing-Asterisk.md | 8 --- .../Installing-Initialization-Scripts.md | 2 - .../Installing-Sample-Files.md | 1 - .../Building-and-Installing-DAHDI.md | 1 - .../Building-and-Installing-LibPRI.md | 3 - .../Checking-Asterisk-Requirements.md | 5 -- .../Prerequisites/PJSIP-pjproject.md | 13 ---- ...g-Menuselect-to-Select-Asterisk-Options.md | 10 ---- .../Validating-Your-Installation.md | 7 --- .../What-to-Download/index.md | 1 - .../Asterisk-on-OpenSolaris.md | 2 - .../CHANGES-and-UPGRADE.txt.md | 3 - .../Code-Review/Coding-Guidelines.md | 18 ------ .../Code-Review/Gerrit-Usage.md | 11 ---- .../Git-Usage.md | 1 - .../Review-Board-Usage.md | 7 --- .../Subversion-Usage.md | 16 ----- .../Asterisk-Audio-and-Video-Capabilities.md | 3 - .../CLI-Syntax-and-Help-Commands.md | 6 -- ...-and-Manipulating-Channels-from-the-CLI.md | 6 -- .../Logging/Basic-Logging-Start-up-Options.md | 3 - .../Logging/Call-Identifier-Logging.md | 1 - .../Logging/Collecting-Debug-Information.md | 9 --- .../Verbosity-in-Core-and-Remote-Consoles.md | 5 -- docs/Operation/Running-Asterisk/index.md | 18 ------ .../Running-the-Asterisk-Test-Suite.md | 7 --- .../Pluggable-Component-Framework.md | 4 -- .../Test-Asterisk-Configuration-Files.md | 3 - .../Tests-with-SIPp/Basic-Test-with-SIPp.md | 3 - .../Test-Development/Writing-a-Python-Test.md | 13 ---- .../Test-Suite-Documentation/Using-Python3.md | 14 ----- 268 files changed, 1545 deletions(-) diff --git a/docs/Asterisk-Community/IRC.md b/docs/Asterisk-Community/IRC.md index b18475abeb..626f862618 100644 --- a/docs/Asterisk-Community/IRC.md +++ b/docs/Asterisk-Community/IRC.md @@ -12,19 +12,16 @@ Use IRC server to connect with Asterisk developers and us ```bash title=" " linenums="1" #asterisk - ``` ### Asterisk Developers Room ```bash title=" " linenums="1" #asterisk-dev - ``` ### Asterisk ARI/Application Developers Room ```bash title=" " linenums="1" #asterisk-ari - ``` diff --git a/docs/Configuration/Applications/Answer-Playback-and-Hangup-Applications.md b/docs/Configuration/Applications/Answer-Playback-and-Hangup-Applications.md index 4584d9d8f7..903d21cf18 100644 --- a/docs/Configuration/Applications/Answer-Playback-and-Hangup-Applications.md +++ b/docs/Configuration/Applications/Answer-Playback-and-Hangup-Applications.md @@ -17,7 +17,6 @@ To avoid the first few milliseconds of a prompt from being cut off you can play ```conf title=" " linenums="1" exten => 1234,1,Playback(hello-world) - ``` You could avoid the first few seconds of the prompt from being cut off by playing the silence/1 file: @@ -25,14 +24,12 @@ You could avoid the first few seconds of the prompt from being cut off by playin ```conf title=" " linenums="1" exten => 1234,1,Playback(silence/1) exten => 1234,n,Playback(hello-world) - ``` Alternatively this could all be done on the same line by separating the filenames with an ampersand (&): ```conf title=" " linenums="1" exten => 1234,1,Playback(silence/1&hello-world) - ``` The **Hangup()** application hangs up the current call. While not strictly necessary due to auto-fallthrough (see the note on Priority numbers above), in general we recommend you add the **Hangup()** application as the last priority in any extension. @@ -43,5 +40,4 @@ Now let's put **Answer()**, **Playback()**, and **Hangup()** together to play a exten => 6000,1,Answer(500) exten => 6000,n,Playback(hello-world) exten => 6000,n,Hangup() - ``` diff --git a/docs/Configuration/Applications/Asterisk-Queues/Building-Queues.md b/docs/Configuration/Applications/Asterisk-Queues/Building-Queues.md index e16a1a0ea9..a4e1599ddc 100644 --- a/docs/Configuration/Applications/Asterisk-Queues/Building-Queues.md +++ b/docs/Configuration/Applications/Asterisk-Queues/Building-Queues.md @@ -42,7 +42,6 @@ allow=ulaw [0004f2040001](std-device) [0004f2040002](std-device) - ``` What we're doing here is creating a [std-device] template and applying it to a pair of peers that we'll register as 0004f2040001 and 0004f2040002; our devices. @@ -55,7 +54,6 @@ Name/username Host Dyn Nat ACL Port Status 0004f2040001/0004f2040001 192.168.128.145 D 5060 Unmonitored 0004f2040002/0004f2040002 192.168.128.126 D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] - ``` ##### Configuring Device State @@ -65,7 +63,6 @@ Next, we need to configure our system to track the state of the devices. We do t ``` *CLI> core show hints There are no registered dialplan hint - ``` We need to add the devices we're going to track to the extensions.conf file under the [default] context which is the default configuration in sip.conf, however we can change this to any context we want with the 'subscribecontext' @@ -76,7 +73,6 @@ Add the following lines to extensions.conf: [default] exten => 0004f2040001,hint,SIP/0004f2040001 exten => 0004f2040002,hint,SIP/0004f2040002 - ``` Then perform a 'dialplan reload' in order to reload the dialplan. @@ -91,7 +87,6 @@ After reloading our dialplan, you can see the status of the devices with 'core s 0004f2040001@default : SIP/0004f2040001 State:Idle Watchers 0 ---------------- - 2 hints registered - ``` At this point, create an extension that you can dial that will play a prompt that is long enough for you to go back to the Asterisk console to check the state of your device while it is in use. @@ -104,7 +99,6 @@ extensions.conf [devices] exten => 555,1,Playback(tt-monkeys) - ``` Dial that extension and then check the state of your device on the console. @@ -121,7 +115,6 @@ Dial that extension and then check the state of your device on the console. 0004f2040001@default : SIP/0004f2040001 State:Idle Watchers 0 ---------------- - 2 hints registered - ``` Aha, we're not getting the device state correctly. There must be something else we need to configure. @@ -143,7 +136,6 @@ dtmfmode=rfc2833 disallow=all allow=ulaw callcounter=yes ; <-- add this - ``` Then reload chan_sip with 'sip reload' and perform our 555 test again. Dial 555 and then check the device state with 'core show hints'. @@ -160,7 +152,6 @@ Then reload chan_sip with 'sip reload' and perform our 555 test again. Dial 555 0004f2040001@default : SIP/0004f2040001 State:InUse Watchers 0 ---------------- - 2 hints registered - ``` Note that now we have the correct device state when extension 555 is dialed, showing that our device is InUse after dialing extension 555. This is important when creating queues, otherwise our queue members would get multiple calls from the queues. @@ -180,7 +171,6 @@ persistentmembers=yes autofill=yes monitor-type=MixMonitor shared_lastcall=no - ``` We can then define a [queue_template] that we'll assign to each of the queues we create. These definitions can be overridden by each queue individually if you reassign them under the [sales] or [support] headers. So under the [general] @@ -201,7 +191,6 @@ ringinuse=no ; don't ring members when already InUse [support](queue_template) ; Support queue - ``` After defining our queues, lets reload our app_queue.so module. @@ -211,7 +200,6 @@ After defining our queues, lets reload our app_queue.so module. -- Reloading module 'app_queue.so' (True Call Queueing) == Parsing '/etc/asterisk/queues.conf': == Found - ``` Then verify our queues loaded with 'queue show'. @@ -225,7 +213,6 @@ support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talk sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s No Members No Callers - ``` ##### Adding Queue Members @@ -237,7 +224,6 @@ This is the format of the 'queue add member' command: ``` Usage: queue add member to [[[penalty ] as ] state_interface ] Add a channel to a queue with optionally: a penalty, membername and a state_interface - ``` The penalty, membername, and state_interface are all optional values. Special attention should be brought to the 'state_interface' option for a member though. The reason for state_interface is that if you're using a channel that does not have device state itself (for example, if you were using the Local channel to deliver a call to an end point) then you could assign the device state of a SIP device to the pseudo channel. This allows the state of a SIP device to be applied to the Local channel for correct device state information. @@ -247,7 +233,6 @@ Lets add our device located at SIP/0004f2040001 ``` *CLI> queue add member SIP/0004f2040001 to sales Added interface 'SIP/0004f2040001' to queue 'sales' - ``` Then lets verify our member was indeed added. @@ -258,7 +243,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti Members: SIP/0004f2040001 (dynamic) (Not in use) has taken no calls yet No Callers - ``` Now, if we dial our 555 extension, we should see that our member becomes InUse within the queue. @@ -273,7 +257,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti Members: SIP/0004f2040001 (dynamic) (In use) has taken no calls yet No Callers - ``` We can also remove our members from the queue using the 'queue remove' CLI command. @@ -281,7 +264,6 @@ We can also remove our members from the queue using the 'queue remove' CLI comma ``` *CLI> queue remove member SIP/0004f2040001 from sales Removed interface 'SIP/0004f2040001' from queue 'sales' - ``` Because we don't want to have to add queue members manually from the CLI, we should create a method that allows queue members to login and out from their devices. We'll do that in the next section. @@ -298,14 +280,12 @@ exten => 555,1,Playback(tt-monkeys) exten => 100,1,Queue(sales) exten => 101,1,Queue(support) - ``` Then reload the dialplan, and try calling extension 100 from SIP/0004f2040002, which is the device we have not logged into the queue. ``` *CLI> dialplan reload - ``` And now we call the queue at extension 100 which will ring our device at SIP/0004f2040001. @@ -316,7 +296,6 @@ And now we call the queue at extension 100 which will ring our device at SIP/000 -- Started music on hold, class 'default', on SIP/0004f2040002-00000005 == Using SIP RTP CoS mark 5 -- SIP/0004f2040001-00000006 is ringing - ``` We can see the device state has changed to Ringing while the device is ringing. @@ -328,7 +307,6 @@ sales has 1 calls (max unlimited) in 'rrmemory' strategy (2s holdtime, 3s talkti SIP/0004f2040001 (dynamic) (Ringing) has taken 1 calls (last was 14 secs ago) Callers: 1. SIP/0004f2040002-00000005 (wait: 0:03, prio: 0) - ``` Our queue member then answers the phone. @@ -337,7 +315,6 @@ Our queue member then answers the phone. *CLI> -- SIP/0004f2040001-00000006 answered SIP/0004f2040002-00000005 -- Stopped music on hold on SIP/0004f2040002-00000005 -- Native bridging SIP/0004f2040002-00000005 and SIP/0004f2040001-00000006 - ``` And we can see the queue member is now in use. @@ -348,14 +325,12 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 3s talkti Members: SIP/0004f2040001 (dynamic) (In use) has taken 1 calls (last was 22 secs ago) No Callers - ``` Then the call is hung up. ``` *CLI> == Spawn extension (devices, 100, 1) exited non-zero on 'SIP/0004f2040002-00000005' - ``` And we see that our queue member is available to take another call. @@ -366,7 +341,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talkti Members: SIP/0004f2040001 (dynamic) (Not in use) has taken 2 calls (last was 6 secs ago) No Callers - ``` ##### Logging In and Out of Queues @@ -391,7 +365,6 @@ exten => _1XX,n,Hangup() exten => invalid_queue,1,Verbose(2,Attempted to enter invalid queue) exten => invalid_queue,n,Playback(silence/1&invalid) exten => invalid_queue,n,Hangup() - ``` The [globals] section contains the following two global variables. @@ -400,21 +373,18 @@ The [globals] section contains the following two global variables. [globals] QUEUE_100=sales QUEUE_101=support - ``` So when we dial extension 100, it matches our pattern _1XX. The number we dialed (100) is then retrievable via ${EXTEN} and we can get the name of queue 100 (sales) from the global variable QUEUE_100. We then assign it to the channel variable thisQueue so it is easier to work with in our dialplan. ``` exten => _1XX,n,Set(thisQueue=${GLOBAL(QUEUE_${EXTEN})}) - ``` We then check to see if we've gotten a value back from the global variable which would indicate whether the queue was valid or not. ``` exten => _1XX,n,GotoIf($["${thisQueue}" = ""]?invalid_queue,1) - ``` If ${thisQueue} returns nothing, then we Goto the invalid_queue extension and playback the 'invalid' file. @@ -429,7 +399,6 @@ First, we create a pattern match that takes star plus the queue number that we ; Extension *100 or *101 will login/logout a queue member from sales or support queues respectively. exten => _*10[0-1],1,Set(xtn=${EXTEN:1}) ; save ${EXTEN} with * chopped off to ${xtn} exten => _*10[0-1],n,Goto(queueLoginLogout,member_check,1) ; check if already logged into a queue - ``` We save the value of ${EXTEN:1} to the 'xtn' channel variable so we don't need to keep typing the complicated pattern match. @@ -449,7 +418,6 @@ exten => member_check,n,Set(thisActiveMember=SIP/${CHANNEL(peername)}) ; initial exten => member_check,n,GotoIf($["${queueMembers}" = ""]?q_login,1) ; short circuit to logging in if we don't have ; any members logged into this queue - ``` At this point if there are no members currently logged into our sales queue, we then short-circuit our dialplan to go to the 'q_login' extension since there is no point in wasting cycles searching to see if we're already logged in. @@ -462,7 +430,6 @@ exten => member_check,n,Set(field=1) ; start our field counter at one exten => member_check,n,Set(logged_in=0) ; initialize 'logged_in' to "not logged in" exten => member_check,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) ; initialize 'thisQueueMember' with the value in the ; first field of the comma-separated list - ``` Now we get to enter our While() loop to determine if we're already logged in. @@ -470,7 +437,6 @@ Now we get to enter our While() loop to determine if we're already logged in. ``` ; Enter our loop to check if our member is already logged into this queue exten => member_check,n,While($[${EXISTS(${thisQueueMember})}]) ; while we have a queue member... - ``` This is where we check to see if the member at this position of the list is the same as the device we're calling from. If it doesn't match, then we go to the 'check_next' priority label (where we increase our ${field} counter variable). If it does match, then we continue on in the dialplan. @@ -480,7 +446,6 @@ exten => member_check,n,GotoIf($["${thisQueueMember}" != "${thisActiveMember}"]? ; same as our active peer, then ; check the next in the list of ; logged in queue members - ``` If we continued on in the dialplan, then we set the ${logged_in} channel variable to '1' which represents we're already logged into this queue. We then exit the While() loop with the ExitWhile() dialplan application. @@ -488,7 +453,6 @@ If we continued on in the dialplan, then we set the ${logged_in} channel variabl ``` exten => member_check,n,Set(logged_in=1) ; if we got here, set as logged in exten => member_check,n,ExitWhile() ; then exit our loop - ``` If we didn't match this peer name in the list, then we increase our ${field} counter variable by one, update the ${thisQueueMember} channel variable and then move back to the top of the loop for another round of checks. @@ -497,7 +461,6 @@ If we didn't match this peer name in the list, then we increase our ${field} cou exten => member_check,n(check_next),Set(field=$[${field} + 1]) ; if we got here, increase counter exten => member_check,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) ; get next member in the list exten => member_check,n,EndWhile() ; ...end of our loop - ``` And once we exit our loop, we determine whether we need to log our device in or out of the queue. @@ -505,7 +468,6 @@ And once we exit our loop, we determine whether we need to log our device in or ``` ; if not logged in, then login to this queue, otherwise, logout exten => member_check,n,GotoIf($[${logged_in} = 0]?q_login,1:q_logout,1) ; if not logged in, then login, otherwise, logout - ``` The following two extensions are used to either log the device in or out of the queue. We use the AddQueueMember() and RemovQueueMember() applications to login or logout the device from the queue. @@ -529,7 +491,6 @@ exten => q_logout,n,RemoveQueueMember(${thisQueue},${thisActiveMember}) exten => q_logout,n,Playback(silence/1) exten => q_logout,n,ExecIf($["${RQMSTATUS}" = "REMOVED"]?Playback(agent-loggedoff):Playback(an-error-has-occurred)) exten => q_logout,n,Hangup() - ``` And that's it! Give it a shot and you should see console output similar to the following which will login and logout your queue members to the queues you've configured. @@ -543,7 +504,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talkti SIP/0004f2040001 (dynamic) (Not in use) has taken no calls yet SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet No Callers - ``` Then we dial \*100 to logout the active device from the sales queue. @@ -579,7 +539,6 @@ Then we dial \*100 to logout the active device from the sales queue. -- Playing 'agent-loggedoff.slin' (language 'en') -- Executing [q_logout@queueLoginLogout:5] Hangup("SIP/0004f2040001-00000012", "") in new stack == Spawn extension (queueLoginLogout, q_logout, 5) exited non-zero on 'SIP/0004f2040001-00000012' - ``` And we can see that the device we loggd out by running 'queue show sales'. @@ -590,7 +549,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talkti Members: SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet No Callers - ``` ##### Pausing and Unpausing Members of Queues @@ -606,7 +564,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet SIP/0004f2040001 (dynamic) (Not in use) has taken no calls yet No Callers - ``` We can then pause our devices with 'queue pause' which has the following format. @@ -616,7 +573,6 @@ Usage: queue {pause|unpause} member [queue [reason ]] Pause or unpause a queue member. Not specifying a particular queue will pause or unpause a member across all queues to which the member belongs. - ``` Lets pause device 0004f2040001 in the sales queue by executing the following. @@ -624,7 +580,6 @@ Lets pause device 0004f2040001 in the sales queue by executing the following. ``` *CLI> queue pause member SIP/0004f2040001 queue sales paused interface 'SIP/0004f2040001' in queue 'sales' for reason 'lunch' - ``` And we can see they are paused with 'queue show sales'. @@ -636,7 +591,6 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet SIP/0004f2040001 (dynamic) (paused) (Not in use) has taken no calls yet No Callers - ``` At this point the queue member will no longer receive calls from the system. We can unpause them with the CLI command 'queue unpause member'. @@ -644,7 +598,6 @@ At this point the queue member will no longer receive calls from the system. We ``` *CLI> queue unpause member SIP/0004f2040001 queue sales unpaused interface 'SIP/0004f2040001' in queue 'sales' - ``` And if you don't specify a queue, it will pause or unpause from all queues. @@ -652,7 +605,6 @@ And if you don't specify a queue, it will pause or unpause from all queues. ``` *CLI> queue pause member SIP/0004f2040001 paused interface 'SIP/0004f2040001' - ``` Of course we want to allow the agents to pause and unpause themselves from their devices, so we need to create an extension and some dialplan logic for that to happen. @@ -674,7 +626,6 @@ exten => _*0[01]!,n,Set(thisQueue=${GLOBAL(QUEUE_${xtn})}) ; get the queue name exten => _*0[01]!,n,GotoIf($[${ISNULL(${thisQueue})} & ${EXISTS(${xtn})}]?invalid_queue,1) ; if 'thisQueue' is blank and the ; the agent dialed a queue exten, ; we will tell them it's invalid - ``` The following line will determine if we're trying to pause or unpause. This is done by taking the value dialed (e.g. \*00100) and chopping off the first 2 digits which leaves us with 0100, and then the :1 will return the next digit, which in this case is '0' that we're using to signify that the queue member wants to be paused (in queue 100). @@ -684,7 +635,6 @@ So we're doing the following with our EXTEN variable. ``` ${EXTEN:2:1} offset ^ ^ length - ``` Which causes the following. @@ -695,12 +645,10 @@ Which causes the following. *00100 ^ then return a digit length of one, which is digit 0 - ``` ``` exten => _*0[01]!,n,GotoIf($[${EXTEN:2:1} = 0]?pause,1:unpause,1) ; determine if they wanted to pause ; or to unpause. - ``` The following two extensions, pause & unpause, are used for pausing and unpausing our extension from the queue(s). We use the PauseQueueMember() and UnpauseQueueMember() dialplan applications which accept the queue name (optional) and the queue member name. If the queue name is not provided, then it is assumed we want to pause or unpause from all logged in queues. @@ -711,7 +659,6 @@ exten => unpause,1,NoOp() exten => unpause,n,UnpauseQueueMember(${thisQueue},SIP/${CHANNEL(peername)}) ; if 'thisQueue' is populated we'll pause in ; that queue, otherwise, we'll unpause in ; in all queues - ``` Once we've unpaused ourselves, we use GoSub() to perform some common dialplan logic that is used for pausing and unpausing. We pass three arguments to the subroutine: @@ -725,7 +672,6 @@ exten => unpause,n,GoSub(changePauseStatus,start,1(UPQMSTATUS,UNPAUSED,available ; pass the values for: variable to check, ; value to check for, and file to play exten => unpause,n,Hangup() - ``` And the same method is done for pausing. @@ -736,7 +682,6 @@ exten => pause,1,NoOp() exten => pause,n,PauseQueueMember(${thisQueue},SIP/${CHANNEL(peername)}) exten => pause,n,GoSub(changePauseStatus,start,1(PQMSTATUS,PAUSED,unavailable)) exten => pause,n,Hangup() - ``` Lets explore what happens in the subroutine we're using for pausing and unpausing. @@ -750,7 +695,6 @@ Lets explore what happens in the subroutine we're using for pausing and unpausin ; exten => start,1,NoOp() exten => start,n,Playback(silence/1) ; answer line with silence - ``` The following line is probably the most complex. We're using the IF() function inside the Playback() application which determines which file to playback to the user. @@ -765,7 +709,6 @@ So when expanded, we'd end up with the following inside the IF() function. ```bash title=" " linenums="1" $["${PQMSTATUS}" = "PAUSED"]?unavailable:not-yet-connected - ``` ${PQMSTATUS} would then be expanded further to contain the status of our PauseQueueMember() dialplan application, which could either be PAUSED or NOTFOUND. So if ${PQMSTATUS} returned PAUSED, then it would match what we're looking to match on, and we'd then return 'unavailable' to Playback() that would tell the user they are now unavailable. @@ -779,7 +722,6 @@ exten => start,n,Playback(${IF($["${${ARG1}}" = "${ARG2}"]?${ARG3}:not-yet-conne ; matches the value we're looking ; for and playback the file we want ; to play if it does - ``` If ${xtn} is null, then we just go to the end of the subroutine, but if it isn't then we will play back "in the queue" followed by the queue extension number indicating which queue they were (un)paused from. @@ -789,7 +731,6 @@ exten => start,n,GotoIf($[${ISNULL(${xtn})}]?end) ; if ${xtn} is null, then just exten => start,n,Playback(in-the-queue) ; if not null, then playback "in the queue" exten => start,n,SayNumber(${xtn}) ; and the queue number that we (un)paused from exten => start,n(end),Return() ; return from were we came - ``` ##### Queue Variables @@ -802,7 +743,6 @@ exten => show_variables,1,NoOp() same => n,Verbose(0,strategy = ${QUEUESTRATEGY}) same => n,Verbose(0,calls = ${QUEUECALLS}) same => n,Hangup() - ``` Note, QUEUE_VARIABLES needs to be called with a valid queue name, and prior to calling the other queue variable functions in order to ensure retrieval of the correctly associated values for a given queue. diff --git a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Assigning-Agents-to-Queues.md b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Assigning-Agents-to-Queues.md index 76c3568309..3101233881 100644 --- a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Assigning-Agents-to-Queues.md +++ b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Assigning-Agents-to-Queues.md @@ -26,7 +26,6 @@ context queues-loginout { goto queues-manip,O${AGENT_NUMBER},1; } } - ``` In the above contexts, the agents dial 6092 to log into their queues, and they dial 6093 to log out of their queues. The agent is prompted for their agent number, and if they are logging in, their passcode, and then they are transferred to the proper extension in the queues-manip context. The queues-manip context does all the actual work: @@ -59,7 +58,6 @@ context queues-manip { &queue-success(${EXTEN}); } } - ``` In the above extensions, note that the queue-addremove macro is used to actually add or remove the agent from the applicable queue, with the applicable priority level. Note that agents with a priority level of 10 will be called before agents with levels of 20 or 30. @@ -86,7 +84,6 @@ macro queue-success(exten) { } } } - ``` The queue-addremove macro is defined in this manner: @@ -112,7 +109,6 @@ macro queue-addremove(queuename,penalty,exten) { break; } } - ``` Basically, it uses the first character of the exten variable, to determine the proper actions to take. In the above dial plan code, only the cases I or O are used, which correspond to the Login and Logout actions. diff --git a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Controlling-the-way-Queues-Call-Agents.md b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Controlling-the-way-Queues-Call-Agents.md index e617051b9b..99f470bf4c 100644 --- a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Controlling-the-way-Queues-Call-Agents.md +++ b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Controlling-the-way-Queues-Call-Agents.md @@ -42,7 +42,6 @@ context agents { 6170 => &callagent(${ROCK},${EXTEN}); 6070 => &callagent(${SALINE},${EXTEN}); } - ``` In the above, the variables ${RAQUEL}, etc stand for actual devices to ring that person's phone (like DAHDI/37). @@ -73,7 +72,6 @@ macro callagent(device,exten) { Busy(); } } - ``` In the callagent macro above, the ${exten} will be 6121, or 6165, etc, which is the extension of the agent. diff --git a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Queue-Pre-Acknowledgement-Messages.md b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Queue-Pre-Acknowledgement-Messages.md index a50f769545..4582e60b14 100644 --- a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Queue-Pre-Acknowledgement-Messages.md +++ b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Queue-Pre-Acknowledgement-Messages.md @@ -23,5 +23,4 @@ exten=>s,46,Set(MACRO_RESULT=CONTINUE) exten=>s,50,Playback(after-the-tone) exten=>s,51,Playback(connected) exten=>s,52,Playback(beep) - ``` diff --git a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Routing-Incoming-Calls-to-Queues.md b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Routing-Incoming-Calls-to-Queues.md index a1672bb027..bf02d01b60 100644 --- a/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Routing-Incoming-Calls-to-Queues.md +++ b/docs/Configuration/Applications/Asterisk-Queues/Configuring-Call-Queues-with-AEL/Routing-Incoming-Calls-to-Queues.md @@ -52,7 +52,6 @@ context mainmenu { Hangup(); } } - ``` The Contexts referenced from the queues.conf file @@ -77,7 +76,6 @@ context sales { Hangup(); } } - ``` Please note that there is only one attempt to queue a call in the sales queue. All sales agents that are logged in will be rung. @@ -111,7 +109,6 @@ context customerservice { Hangup(); } } - ``` Note that calls coming into customerservice will first be try to queue calls to those agents with a QUEUE_MAX_PENALTY of 10, and if none are available, then all agents are rung. @@ -138,7 +135,6 @@ context dispatch { Hangup(); } } - ``` And in the dispatch context, first agents of priority 10 are tried, then 20, and if none are available, all agents are tried. diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Actions.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Actions.md index 0d075dfa95..2b0a29432b 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Actions.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Actions.md @@ -29,7 +29,6 @@ MarkedUser: No Event: ConfbridgeListComplete EventList: Complete ListItems: 1 - ``` On This PageConfbridgeListRooms @@ -55,7 +54,6 @@ Locked: No Event: ConfbridgeListRoomsComplete EventList: Complete ListItems: 1 - ``` ConfbridgeMute @@ -72,7 +70,6 @@ Channel: SIP/mypeer-00000001 Response: Success Message: User muted - ``` ConfbridgeUnmute @@ -89,7 +86,6 @@ Channel: SIP/mypeer-00000001 Response: Success Message: User unmuted - ``` ConfbridgeKick @@ -106,7 +102,6 @@ Channel: SIP/mypeer-00000001 Response: Success Message: User kicked - ``` ConfbridgeLock @@ -122,7 +117,6 @@ Conference: 1111 Response: Success Message: Conference locked - ``` ConfbridgeUnlock @@ -138,7 +132,6 @@ Conference: 1111 Response: Success Message: Conference unlocked - ``` ConfbridgeStartRecord @@ -161,7 +154,6 @@ Channel: ConfBridgeRecorder/conf-1111-uid-1653801660 Variable: MIXMONITOR_FILENAME Value: /var/spool/asterisk/monitor/confbridge-1111-1303309869.wav Uniqueid: 1303309869.6 - ``` ConfbridgeStopRecord @@ -186,7 +178,6 @@ CallerIDNum: CallerIDName: Cause: 0 Cause-txt: Unknown - ``` ConfbridgeSetSingleVideoSrc @@ -203,5 +194,4 @@ Channel: SIP/mypeer-00000001 Response: Success Message: Conference single video source set. - ``` diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Events.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Events.md index df83965893..1ec93840d8 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Events.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-AMI-Events.md @@ -14,7 +14,6 @@ This event is sent when the first user requests a conference and it is instantia Event: ConfbridgeStart Privilege: call,all Conference: 1111 - ``` On This PageConfbridgeJoin @@ -32,7 +31,6 @@ Uniqueid: 1303309562.3 Conference: 1111 CallerIDnum: 1234 CallerIDname: mypeer - ``` ConfbridgeLeave @@ -50,7 +48,6 @@ Uniqueid: 1303308745.0 Conference: 1111 CallerIDnum: 1234 CallerIDname: mypeer - ``` ConfbridgeEnd @@ -64,7 +61,6 @@ This event is sent when the last user leaves a conference and it is torn down. Event: ConfbridgeEnd Privilege: call,all Conference: 1111 - ``` ConfbridgeTalking @@ -81,7 +77,6 @@ Channel: SIP/mypeer-00000001 Uniqueid: 1303308745.0 Conference: 1111 TalkingStatus: on - ``` **Stop talking Example** @@ -93,5 +88,4 @@ Channel: SIP/mypeer-00000001 Uniqueid: 1303308745.0 Conference: 1111 TalkingStatus: off - ``` diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-CLI-Commands.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-CLI-Commands.md index a63d3249ac..58ea7aabaf 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-CLI-Commands.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-CLI-Commands.md @@ -16,7 +16,6 @@ Removes the specified channel from the conference, e.g.: ``` *CLI> confbridge kick 1111 SIP/mypeer-00000000 Kicking SIP/mypeer-00000000 from confbridge 1111 - ``` `confbridge list` @@ -29,7 +28,6 @@ Shows a summary listing of all bridges, e.g.: Conference Bridge Name Users Marked Locked? ================================ ====== ====== ======== 1111 1 0 unlocked - ``` `confbridge list ` @@ -42,7 +40,6 @@ Shows a detailed listing of participants in a specified conference, e.g.: Channel User Profile Bridge Profile Menu ============================= ================ ================ ================ SIP/mypeer-00000001 default_user 1111 sample_user_menu - ``` `confbridge lock ` @@ -53,7 +50,6 @@ Locks a specified conference so that only Admin users can join, e.g.: ``` *CLI> confbridge lock 1111 Conference 1111 is locked. - ``` `confbridge unlock ` @@ -64,7 +60,6 @@ Unlocks a specified conference so that only Admin users can join, e.g.: ``` *CLI> confbridge unlock 1111 Conference 1111 is unlocked. - ``` `confbridge mute ` @@ -75,7 +70,6 @@ Mutes a specified user in a specified conference, e.g.: ``` *CLI> confbridge mute 1111 SIP/mypeer-00000001 Muting SIP/mypeer-00000001 from confbridge 1111 - ``` `confbridge unmute ` @@ -86,7 +80,6 @@ Unmutes a specified user in a specified conference, e.g.: ``` *CLI> confbridge unmute 1111 SIP/mypeer-00000001 Unmuting SIP/mypeer-00000001 from confbridge 1111 - ``` `confbridge record start ` @@ -98,7 +91,6 @@ Begins recording a conference. If "file" is specified, it will be used, otherwis *CLI> confbridge record start 1111 Recording started *CLI> == Begin MixMonitor Recording ConfBridgeRecorder/conf-1111-uid-618880445 - ``` `confbridge record stop ` @@ -111,7 +103,6 @@ Stops recording the specified conference, e.g.: Recording stopped. *CLI> == MixMonitor close filestream (mixed) == End MixMonitor Recording ConfBridgeRecorder/conf-1111-uid-618880445 - ``` `confbridge show menus` @@ -124,7 +115,6 @@ Shows a listing of Conference Menus as defined in confbridge.conf, e.g.: --------- Menus ----------- sample_admin_menu sample_user_menu - ``` `confbridge show menu ` @@ -144,7 +134,6 @@ Name: sample_admin_menu *2=admin_toggle_conference_lock *1=toggle_mute *=playback_and_continue(conf-adminmenu) - ``` `confbridge show profile bridges` @@ -157,7 +146,6 @@ Shows a listing of Bridge Profiles as defined in confbridge.conf, e.g.: --------- Bridge Profiles ----------- 1111 default_bridge - ``` `confbridge show profile bridge ` @@ -190,7 +178,6 @@ sound_locked: conf-locked sound_unlocked_now: conf-unlockednow sound_lockednow: conf-lockednow sound_error_menu: conf-errormenu - ``` `confbridge show profile users` @@ -203,7 +190,6 @@ Shows a listing of User Profiles as defined in confbridge.conf, e.g.: --------- User Profiles ----------- awesomeusers default_user - ``` `confbirdge show profile user ` @@ -233,5 +219,4 @@ PIN: None Announce User Count: enabled Announce join/leave: enabled Announce User Count all: enabled - ``` diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Configuration.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Configuration.md index 3227f96d94..e6518a165c 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Configuration.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Configuration.md @@ -42,7 +42,6 @@ type=menu DTMF=function otherDTMF=otherFunction ; - ``` ## Bridge Profile Configuration Options @@ -90,7 +89,6 @@ max_members=20 mixing_interval=10 internal_sample_rate=auto record_conference=yes - ``` ## User Profile Configuration Options @@ -134,7 +132,6 @@ announce_join_leave=yes dsp_drop_silence=yes denoise=yes pin=456 - ``` ## Conference Menu Configuration Options @@ -189,7 +186,6 @@ type=menu 9=increase_talking_volume *0=no_op 0=no_op - ``` Of particular note in this example, we're calling the dialplan_exec option. Here, we're specifying "addcaller,1,1." This means that when someone dials 3, Asterisk will escape them out of the bridge momentarily to go execute priority 1 of extension 1 in the addcaller context of the dialplan (extensions.conf). Our dialplan, including the addcaller context, in this case, might look like: @@ -200,7 +196,6 @@ exten => 1,1,Originate(SIP/otherpeer,exten,conferences,100,1) [conferences] exten => 100,1,ConfBridge(1234) - ``` Thus, when someone dials "3" while in the bridge, they'll Originate a call from the dialplan that puts SIP/otherpeer into the conference. Once the dial has completed, the person that dialed "3" will find themselves back in the bridge, with the other participants. diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Functions.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Functions.md index 846383c85c..0d3825328a 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Functions.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/ConfBridge-Functions.md @@ -13,7 +13,6 @@ On This PageSyntax ``` CONFBRIDGE(type,option) - ``` * type - Refers to which type of profile the option belongs to. Type can be either "bridge" or "user." @@ -29,7 +28,6 @@ exten => 1,1,Answer() exten => 1,n,Set(CONFBRIDGE(user,announce_join_leave)=yes) exten => 1,n,Set(CONFBRIDGE(user,startmuted)=yes) exten => 1,n,ConfBridge(1) - ``` **Example 2** @@ -40,7 +38,6 @@ exten => 1,n,Set(CONFBRIDGE(user,template)=default_user) exten => 1,n,Set(CONFBRIDGE(user,admin)=yes) exten => 1,n,Set(CONFBRIDGE(user,marked)=yes) exten => 1,n,ConfBridge(1) - ``` Function CONFBRIDGE_INFO @@ -52,7 +49,6 @@ The CONFBRIDGE_INFO dialplan function is used to retrieve information about a co ``` CONFBRIDGE_INFO(type,conf) - ``` * type - Refers to which information type to be retrieved. Type can be either "parties," "admins," "marked," or "locked." diff --git a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/index.md b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/index.md index 80481eb9ef..7971453fcf 100644 --- a/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/index.md +++ b/docs/Configuration/Applications/Conferencing-Applications/ConfBridge/index.md @@ -36,7 +36,6 @@ The ConfBridge application syntax and usage can be found at [Application ConfBri ``` exten => 1,1,Answer() exten => 1,n,ConfBridge(1234) - ``` ### Example 2 @@ -44,7 +43,6 @@ exten => 1,n,ConfBridge(1234) ``` exten => 1,1,Answer() exten => 1,n,ConfBridge(1234,,1234_participants,1234_menu) - ``` ## Usage Notes, FAQ and Other diff --git a/docs/Configuration/Applications/Directory-Application.md b/docs/Configuration/Applications/Directory-Application.md index 208845811c..addeed0c77 100644 --- a/docs/Configuration/Applications/Directory-Application.md +++ b/docs/Configuration/Applications/Directory-Application.md @@ -7,7 +7,6 @@ The next application we'll cover is named **Directory()**, because it presents t ```conf title=" " linenums="1" Directory([voicemail_context,[dialplan_context,[options]]]) - ``` ## Parameters @@ -36,7 +35,6 @@ Let's add a dial-by-name directory to our dialplan. Simply add this line to your ```conf title=" " linenums="1" exten => 6501,1,Directory(vm-demo,users,ef) - ``` Now you should be able to dial extension **6501** to test your dial-by-name directory. diff --git a/docs/Configuration/Applications/Early-Media-and-the-Progress-Application.md b/docs/Configuration/Applications/Early-Media-and-the-Progress-Application.md index cb78b18933..d3b7955fbb 100644 --- a/docs/Configuration/Applications/Early-Media-and-the-Progress-Application.md +++ b/docs/Configuration/Applications/Early-Media-and-the-Progress-Application.md @@ -14,7 +14,6 @@ exten => 500,1,Progress() exten => 500,n,Wait(1) exten => 500,n,Playback(WeAreClosedGoAway,noanswer) exten => 500,n,Hangup() - ``` In the example above, we start an early media call which waits for a second and then plays a rather rudely named message indicating that the requested service has closed for whatever reason before hanging up. It is worth observing that the Playback application is called with the 'noanswer' argument. Without that argument, Playback would automatically answer the call and then we would no longer be in early media mode. @@ -23,7 +22,6 @@ Strictly speaking, Asterisk will send audio via RTP to any device that calls in ```conf title=" " linenums="1" exten => 500,1,Queue(queuename) - ``` This is certainly a brief example. The queue application does not perform any sort of automatic answering, so at this point Asterisk will be sending the phone audio packets, but it will not have formally answered the call or have sent a progress indication. At this point, different phones will behave differently. In the case of the internal test, our Polycom Soundpoint IP 330 phone played nothing while our SNOM360 phone played audio until approximately one minute into the call before it started ceaselessly generating a ring-back indication. There is nothing wrong with either of these phones... they are simply reacting to an oddly formed SIP dialog. Obviously though, neither of these is ideal for a queue and the problem wouldn't have existed had Queue been started after using the Progress application like below: @@ -31,7 +29,6 @@ This is certainly a brief example. The queue application does not perform any so ```conf title=" " linenums="1" exten => 500,1,Progress() exten => 500,n,Queue(queuename) - ``` Getting the hang of when to use Progress and Answer can be a little tricky, and it varies greatly from application to application. If you want to be safe, you can always just answer the calls and keep things simple, but there are a number of use cases where it is more appropriate to use early media, and most people who actually need this feature will probably be aware of when it is necessary. diff --git a/docs/Configuration/Applications/External-IVR-Interface.md b/docs/Configuration/Applications/External-IVR-Interface.md index 9ae19d4adc..ff4d878fe2 100644 --- a/docs/Configuration/Applications/External-IVR-Interface.md +++ b/docs/Configuration/Applications/External-IVR-Interface.md @@ -13,7 +13,6 @@ To execute a local application use the form: ```conf title="extensions.conf" ExternalIVR(/full/path/to/application[(arguments)],options) - ``` The arguments are optional, however if they exist they must be enclosed in parentheses. The external application will be executed in a child process, with its standard file handles connected to the Asterisk process as follows: @@ -118,14 +117,12 @@ If `ExternalIVR` is executed as: ```conf title="extensions.conf" ExternalIVR(/usr/bin/foo(arg1,arg2),n) - ``` The response to the `P` command would be: ```text P,TIMESTAMP,/usr/bin/foo,arg1,arg2 - ``` /// note diff --git a/docs/Configuration/Applications/MacroExclusive.md b/docs/Configuration/Applications/MacroExclusive.md index 8d45d5c64e..d5162981cd 100644 --- a/docs/Configuration/Applications/MacroExclusive.md +++ b/docs/Configuration/Applications/MacroExclusive.md @@ -18,7 +18,6 @@ Consider this example macro, intended to return a "next" number - each caller is [macro-next] exten => s,1,Set(RESULT=${COUNT}) exten => s,n,SetGlobalVar(COUNT=$[${COUNT} + 1]) - ``` The problem is that in a box with high activity, you can be sure that two calls will come along together - both will get the same "RESULT", or the "COUNT" value will get mangled. @@ -41,7 +40,6 @@ exten => s,1,Set(DB(STACK/${ARG1})=${ARG2}^${DB(STACK/${ARG1})}) exten => s,1,Set(RESULT=${DB(STACK/${ARG1})}) exten => s,n,Set(DB(STACK/${ARG1})=${CUT(RESULT,^,2)}) exten => s,n,Set(RESULT=${CUT(RESULT,^,1)}) - ``` All that futzing with the STACK/${ARG1} in the astdb needs protecting if this is to work. But neither push nor pop can run together. @@ -51,7 +49,6 @@ So add this "pattern": ``` [macro-stack] exten => Macro(${ARG1},${ARG2},${ARG3}) - ``` ... and use it like so: @@ -65,7 +62,6 @@ exten => s,n,MacroExclusive(stack,pop,MYSTACK) ; RESULT gets pawpaws (yum) exten => s,n,MacroExclusive(stack,pop,MYSTACK) ; RESULT gets guavas exten => s,n,MacroExclusive(stack,pop,MYSTACK) ; RESULT gets apples exten => s,n,MacroExclusive(stack,pop,MYSTACK) ; RESULT gets bananas - ``` We get to the push and pop macros "via" the stack macro. But only one call can execute the stack macro at a time; ergo, only one of push OR pop can run at a time. diff --git a/docs/Configuration/Applications/SMS.md b/docs/Configuration/Applications/SMS.md index bf212831db..f84cb808a3 100644 --- a/docs/Configuration/Applications/SMS.md +++ b/docs/Configuration/Applications/SMS.md @@ -80,7 +80,6 @@ This is a context to use with a manager script. exten => _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME}) exten => _X.,n,SMS(${CALLERIDNUM}) exten => _X.,n,Hangup - ``` The script sends @@ -92,7 +91,6 @@ The script sends channel: Local/17094009 context: smsdial priority: 1 - ``` You put the message as the name of the caller ID (messy, I know), the originating number and hence queue name as the number of the caller ID and the exten as the number to which the sms is to be sent. The context uses SMS to create the message in the queue and then SMS to communicate with 17094009 to actually send the message. @@ -108,7 +106,6 @@ exten => _XXXXXX_8005875290,n,System(/usr/lib/asterisk/smsin ${EXTEN:3}) exten => _XXXXXX_80058752[0-8]0,1,SMS(${EXTEN:3}${CALLERIDNUM:8:1},a) exten => _XXXXXX_80058752[0-8]0,n,System(/usr/lib/asterisk/smsin ${EXTEN>:3}${CALLERIDNUM:8:1}) exten => _XXXXXX_80058752[0-8]0,n,Hangup - ``` In this case the called number we get from BT is 6 digits (XXXXXX) and we are using the last 3 digits as the queue name. diff --git a/docs/Configuration/Applications/Shared-Line-Appearances-SLA/SLA-Configuration-Examples/Basic-SLA-Configuration-Example.md b/docs/Configuration/Applications/Shared-Line-Appearances-SLA/SLA-Configuration-Examples/Basic-SLA-Configuration-Example.md index beeb617d3c..c29f6c420b 100644 --- a/docs/Configuration/Applications/Shared-Line-Appearances-SLA/SLA-Configuration-Examples/Basic-SLA-Configuration-Example.md +++ b/docs/Configuration/Applications/Shared-Line-Appearances-SLA/SLA-Configuration-Examples/Basic-SLA-Configuration-Example.md @@ -33,7 +33,6 @@ device=SIP/station2 [station3](station) device=SIP/station3 - ``` With this configuration, the dialplan is generated automatically. The first DAHDI channel should have its context set to "line1" and the second should be set to "line2" in dahdi.conf. In sip.conf, station1, station2, and station3 should all have their context set to "sla_stations". @@ -62,5 +61,4 @@ exten => station3_line1,hint,SLA:station3_line1 exten => station3_line1,1,SLAStation(station3_line1) exten => station3_line2,hint,SLA:station3_line2 exten => station3_line2,1,SLAStation(station3_line2) - ``` diff --git a/docs/Configuration/Applications/The-Read-Application.md b/docs/Configuration/Applications/The-Read-Application.md index 8361c1dd77..f704f64f67 100644 --- a/docs/Configuration/Applications/The-Read-Application.md +++ b/docs/Configuration/Applications/The-Read-Application.md @@ -9,7 +9,6 @@ The **Read()** application allows you to play a sound prompt to the caller and r exten=>6123,1,Read(Digits,enter-ext-of-person) exten=>6123,n,Playback(you-entered) exten=>6123,n,SayNumber(${Digits}) - ``` In this example, the **Read()** application plays a sound prompt which says "Please enter the extension of the person you are looking for", and saves the captured digits in a variable called **Digits**. It then plays a sound prompt which says "You entered" and then reads back the value of the **Digits** variable. diff --git a/docs/Configuration/Applications/The-Verbose-and-NoOp-Applications.md b/docs/Configuration/Applications/The-Verbose-and-NoOp-Applications.md index fab51811bb..b36e24fb0a 100644 --- a/docs/Configuration/Applications/The-Verbose-and-NoOp-Applications.md +++ b/docs/Configuration/Applications/The-Verbose-and-NoOp-Applications.md @@ -8,7 +8,6 @@ Asterisk has a convenient dialplan applications for printing information to the ``` exten=>6123,1,Verbose(2,The channel name is ${CHANNEL}) exten=>6123,n,Verbose(2,The unique id is ${UNIQUEID}) - ``` The **NoOp()** application stands for "No Operation". In other words, it does nothing. Because of the way Asterisk prints everything to the console if your verbosity level is three or higher, however, the **NoOp()** application is often used to print debugging information to the console like the **Verbose()** does. While you'll probably come across examples of the **NoOp()** application in other examples, we recommend you use the **Verbose()** application instead. diff --git a/docs/Configuration/Applications/Voicemail/Message-Waiting-Indication.md b/docs/Configuration/Applications/Voicemail/Message-Waiting-Indication.md index 88864d6961..d0e0e42352 100644 --- a/docs/Configuration/Applications/Voicemail/Message-Waiting-Indication.md +++ b/docs/Configuration/Applications/Voicemail/Message-Waiting-Indication.md @@ -56,7 +56,6 @@ Asterisk can subscribe to receive MWI from another SIP server and store it local ;mwi => 1234:password@myportprovider.example.com:6969/1234 ;mwi => 1234:password:authuser@myauthprovider.example.com/1234 ;mwi => 1234:password:authuser@myauthportprovider.example.com:6969/1234 - ``` MWI received will be stored in the 1234 mailbox of the SIP_Remote context. It can be used by other phones by setting their SIP peers "mailbox" option to the `@SIP_Remote`. e.g. `mailbox=1234@SIP_Remote` @@ -69,7 +68,6 @@ A chan_sip peer can be configured to receive unsolicited MWI NOTIFY messages and ``` ;[somesippeer] ;unsolicited_mailbox=123456789 - ``` If the remote SIP server sends an unsolicited MWI NOTIFY message the new/old message count will be stored in the configured virtual mailbox. It can be used by any device supporting MWI by specifying `mailbox=@SIP_Remote` as the mailbox for the desired SIP peer. diff --git a/docs/Configuration/Channel-Drivers/IP-Quality-of-Service.md b/docs/Configuration/Channel-Drivers/IP-Quality-of-Service.md index a618f20a8c..0c2fc2f50b 100644 --- a/docs/Configuration/Channel-Drivers/IP-Quality-of-Service.md +++ b/docs/Configuration/Channel-Drivers/IP-Quality-of-Service.md @@ -12,7 +12,6 @@ Asterisk running on Linux can also set 802.1p CoS marks in VLAN packets for the ``` vconfig set_egress_map [vlan-device] [skb-priority] [vlan-qos] - ``` The table below shows all VoIP channel drivers and other Asterisk modules that support QoS settings for network traffic. It also shows the type(s) of traffic for which each module can support setting QoS settings: diff --git a/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Configuration/Configuring-chan_iax2-for-IPv6.md b/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Configuration/Configuring-chan_iax2-for-IPv6.md index 52b16e9410..380064d7bb 100644 --- a/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Configuration/Configuring-chan_iax2-for-IPv6.md +++ b/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Configuration/Configuring-chan_iax2-for-IPv6.md @@ -13,7 +13,6 @@ Examples ``` bindport=4569 - ``` The default port to listen on is 4569. Bindport must be specified **before** bindaddr or may be specified on a specific bindaddr if followed by colon and port (e.g. bindaddr=192.168.0.1:4569). @@ -23,7 +22,6 @@ For IPv6 the address needs to be in brackets then colon and port (e.g. bindaddr= ``` bindaddr=192.168.0.1:459 bindaddr=[2001:db8::1]:4569 - ``` You can specify 'bindaddr' more than once to bind to multiple addresses, but the first will be the default. IPv6 addresses are accepted. diff --git a/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Security.md b/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Security.md index 8bd0d9be42..6394a33929 100644 --- a/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Security.md +++ b/docs/Configuration/Channel-Drivers/Inter-Asterisk-eXchange-protocol-version-2-IAX2/IAX2-Security.md @@ -26,7 +26,6 @@ iax.conf calltokenoptional = 0.0.0.0/0.0.0.0 maxcallnumbers = 16382 ... - ``` #### Controlled Networks @@ -72,7 +71,6 @@ type = peer host = dynamic maxcallnumbers = 1024 ... - ``` ##### Partial Upgrade @@ -84,7 +82,6 @@ iax.conf [friendA] requirecalltoken = auto ... - ``` Note that there are some cases where auto should not be used. For example, if multiple peers use the same authentication details, and they have not all upgraded to support call token validation, then the ones that do not support it will get locked out. Once an upgraded client successfully completes an authenticated call setup using call token validation, @@ -105,7 +102,6 @@ iax.conf type = user requirecalltoken = no ... - ``` Since disabling call token validation for the guest account allows a huge hole for malicious call number consumption, an option has been provided to segregate the call numbers consumed by connections not using call token validation from those that do. That way, there are resources dedicated to the more secure connections to ensure that service is not interrupted for them. @@ -115,7 +111,6 @@ iax.conf [general] maxcallnumbers_nonvalidated = 2048 ... - ``` ### CLI Commands diff --git a/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Examples/Using-Callfiles-and-Local-Channels.md b/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Examples/Using-Callfiles-and-Local-Channels.md index cd76fc06ac..a8a1999714 100644 --- a/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Examples/Using-Callfiles-and-Local-Channels.md +++ b/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Examples/Using-Callfiles-and-Local-Channels.md @@ -13,7 +13,6 @@ Our callfile will simply look like the following: Channel: Local/201@devices Application: Playback Data: silence/1&tt-weasels - ``` Add the callfile information to a file such as 'callfile.new' or some other appropriately named file. @@ -24,7 +23,6 @@ Before looking at our dialplan, lets put some data into AstDB that we can then l ``` *CLI> database put phones 201/device SIP/0004f2040001 - ``` We've now put the device destination (SIP/0004f2040001) into the 201/device key within the phones family. This will allow us to lookup the device location for extension 201 from the database. @@ -33,7 +31,6 @@ We can then verify our entry in the database using the 'database show' CLI comma ``` *CLI> database show /phones/201/device : SIP/0004f2040001 - ``` Now lets create the dialplan that will allow us to call SIP/0004f2040001 when we request extension 201 from the [extensions] context via our Local channel. @@ -46,21 +43,18 @@ exten => 201,n,GotoIf($[${ISNULL(${DEVICE})}]?hangup) ; if nothing returned, ; then hangup exten => 201,n,Dial(${DEVICE},30) exten => 201,n(hangup),Hangup() - ``` Then, we can perform a call to our device using the callfile by moving it into the /var/spool/asterisk/outgoing/ directory. ``` mv callfile.new /var/spool/asterisks/outgoing* - ``` Then after a moment, you should see output on your console similar to the following, and your device ringing. Information about what is going on during the output has also been added throughout. ``` – Attempting call on Local/201@devices for application Playback(silence/1&tt-weasels) (Retry 1) - ``` You'll see the line above as soon as Asterisk gets the request from the callfile. @@ -68,14 +62,12 @@ You'll see the line above as soon as Asterisk gets the request from the callfile ``` – Executing [201@devices:1] NoOp("Local/201@devices-ecf0;2", "") in new stack – Executing [201@devices:2] Set("Local/201@devices-ecf0;2", "DEVICE=SIP/0004f2040001") in new stack - ``` This is where we performed our lookup in the AstDB. The value of SIP/0004f2040001 was then returned and saved to the DEVICE channel variable. ``` – Executing [201@devices:3] GotoIf("Local/201@devices-ecf0;2", "0?hangup") in new stack - ``` We perform a check to make sure ${DEVICE} isn't NULL. If it is, we'll just hangup here. @@ -84,14 +76,12 @@ We perform a check to make sure ${DEVICE} isn't NULL. If it is, we'll just hangu – Executing [201@devices:4] Dial("Local/201@devices-ecf0;2", "SIP/0004f2040001,30") in new stack – Called 000f2040001 – SIP/0004f2040001-00000022 is ringing - ``` Now we call our device SIP/0004f2040001 from the Local channel. ``` SIP/0004f2040001-00000022 answered Local/201@devices-ecf0;2* - ``` We answer the call. @@ -99,7 +89,6 @@ We answer the call. ``` > Channel Local/201@devices-ecf0;1 was answered. > Launching Playback(silence/1&tt-weasels) on Local/201@devices-ecf0;1 - ``` We then start playing back the files. @@ -107,7 +96,6 @@ We then start playing back the files. ``` – Playing 'silence/1.slin' (language 'en') == Spawn extension (devices, 201, 4) exited non-zero on 'Local/201@devices-ecf0;2' - ``` At this point we now see the Local channel has been optimized out of the call path. This is important as we'll see in examples later. By default, the Local channel will try to optimize itself out of the call path as soon as it can. Now that the call has been established and audio is flowing, it gets out of the way. @@ -115,7 +103,6 @@ At this point we now see the Local channel has been optimized out of the call pa ``` – Playing 'tt-weasels.ulaw' (language 'en') [Mar 1 13:35:23] NOTICE[16814]: pbx_spool.c:349 attempt_thread: Call completed to Local/201@devices - ``` We can now see the tt-weasels file is played directly to the destination (instead of through the Local channel which was optimized out of the call path) and then a NOTICE stating the call was completed. diff --git a/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Modifiers.md b/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Modifiers.md index b4fdca5fdc..efea0f4329 100644 --- a/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Modifiers.md +++ b/docs/Configuration/Channel-Drivers/Local-Channel/Local-Channel-Modifiers.md @@ -13,14 +13,12 @@ For example below we are adding the "n" modifier to the dial-string. ``` Local/101@mycontext/n - ``` You can add more than one modifier by adding them directly adjacent to the previous modifier. ``` Local/101@mycontext/nj - ``` ## List of Modifiers diff --git a/docs/Configuration/Channel-Drivers/Mobile-Channel/Mobile-Channel-Dialplan-Hints.md b/docs/Configuration/Channel-Drivers/Mobile-Channel/Mobile-Channel-Dialplan-Hints.md index 6b8f94b5bf..76f0fb59e2 100644 --- a/docs/Configuration/Channel-Drivers/Mobile-Channel/Mobile-Channel-Dialplan-Hints.md +++ b/docs/Configuration/Channel-Drivers/Mobile-Channel/Mobile-Channel-Dialplan-Hints.md @@ -8,5 +8,4 @@ chan_mobile supports 'device status' so you can do somthing like ``` exten => 1234,hint,SIP/30&Mobile/dave&Mobile/blackberry - ``` diff --git a/docs/Configuration/Channel-Drivers/Motif/Calling-using-Google.md b/docs/Configuration/Channel-Drivers/Motif/Calling-using-Google.md index 09c43e8a7d..9ef11365ba 100644 --- a/docs/Configuration/Channel-Drivers/Motif/Calling-using-Google.md +++ b/docs/Configuration/Channel-Drivers/Motif/Calling-using-Google.md @@ -26,14 +26,12 @@ ICE support is required for chan_motif to operate. It is disabled by default and ``` [general] icesupport=yes - ``` If this option is not enabled you will receive the following error message. ``` Unable to add Google ICE candidates as ICE support not available or no candidates available - ``` ## Motif configuration @@ -48,7 +46,6 @@ context=incoming-motif disallow=all allow=ulaw connection=google - ``` This general section of this configuration specifies several items. @@ -100,7 +97,6 @@ usesasl=yes status=available statusmessage="I am available" timeout=5 - ``` The default general section does not need any modification. @@ -136,7 +132,6 @@ type=peer secret=my_secure_password host=dynamic context=local - ``` ## Dialplan configuration @@ -152,7 +147,6 @@ exten => s,1,NoOp() same => n,Answer() same => n,SendDTMF(1) same => n,Dial(SIP/malcolm,20) - ``` !!! note @@ -174,7 +168,6 @@ In this example, we're Waiting 1 second, answering the call, sending the DTMF "1 exten => s,1,Dial(SIP/malcolm,20,D(:1)) --- - ``` !!! tip Filtering Caller ID @@ -193,7 +186,6 @@ exten => s,1,NoOp() same => n,Set(stripcrazysuffix=${CUT(crazygooglecid,@,1)}) same => n,Set(CALLERID(all)=${stripcrazysuffix}) same => n,Dial(SIP/malcolm,20,D(:1)) - ``` First, we set a variable called **crazygooglecid** to be equal to the name field of the CALLERID function. Next, we use the CUT function to grab everything that's before the @ symbol, and save it in a new variable called **stripcrazysuffix.** We'll set this new variable to the CALLERID that we're going to use for our Dial. Finally, we'll actually Dial our internal destination. @@ -204,7 +196,6 @@ Outgoing calls to Google Talk users take the form of: ``` exten => 100,1,Dial(Motif/google/mybuddy@gmail.com,,r) - ``` Where the technology is "Motif," the dialing peer is "google" as defined in xmpp.conf, and the dial string is the Google account name. @@ -215,7 +206,6 @@ Outgoing calls made to Google Voice take the form of: ``` exten => _1XXXXXXXXXX,1,Dial(Motif/google/${EXTEN}@voice.google.com,,r) - ``` Where the technology is "Motif," the dialing peer is "google" as defined in motif.conf, and the dial string is a full E.164 number, sans the plus character. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-IPv6.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-IPv6.md index beadb74063..0ccafacd14 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-IPv6.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-IPv6.md @@ -16,7 +16,6 @@ Binding to a specific IPv6 interface ``` [general] bindaddr=2001:db8::1 - ``` Binding to all available IPv6 interfaces (wildcard) @@ -24,7 +23,6 @@ Binding to all available IPv6 interfaces (wildcard) ``` [general] bindaddr=:: - ``` You can specify a port number by wrapping the address in square brackets and using a colon delimiter. @@ -32,7 +30,6 @@ You can specify a port number by wrapping the address in square brackets and usi ``` [general] bindaddr=[::]:5062 - ``` !!! tip @@ -49,5 +46,4 @@ Other options such as "outboundproxy" or "permit" can use IPv6 addresses the sam ``` permit=2001:db8::/32 - ``` diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-Presence-Subscriptions.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-Presence-Subscriptions.md index b9e1909ac5..cd3a850343 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-Presence-Subscriptions.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/Configuring-chan_sip-for-Presence-Subscriptions.md @@ -51,7 +51,6 @@ busylevel=1 [Bob-desk] type=friend busylevel=1 - ``` We are setting one option in the general section, and then a few options across the three SIP peers involved. @@ -72,7 +71,6 @@ For our example we need to define a hint mapping 6001 to Bob's two devices. ``` [default] exten = 6001,hint,SIP/Bob-mobile&SIP/Bob-desk - ``` Defining the hint is pretty straightforward and follows the syntax discussed in the [Extension State and Hints](/Fundamentals/Key-Concepts/States-and-Presence/Extension-State-and-Hints) section. @@ -85,7 +83,6 @@ If you have restarted Asterisk to load the hints, then you can check to make sur *CLI> core show hints -= Registered Asterisk Dial Plan Hints =- 6001@default : SIP/Bob-mobile&SIP/B State:Unavailable Watchers 0 - ``` You'll see the state changes to Idle or something else if you have your sip.conf configured properly and the two SIP devices are at least available. @@ -117,7 +114,6 @@ SUBSCRIBE(w/ Auth) ---> <--- 200 OK <--- NOTIFY 200 OK ---> - ``` In the expanding frame below is a SIP trace of a successful subscription for reference. You could see this on your own system by running "sip set debug on" and then watching for the subscription. You might have to restart your phone again or re-add a contact to see it. @@ -257,7 +253,6 @@ Content-Length: 0 <-------------> --- (9 headers 0 lines) --- - ``` Once the subscription has taken place, there is a command to list them. "sip show subscriptions" @@ -267,7 +262,6 @@ Once the subscription has taken place, there is a command to list them. "sip sho Peer User Call ID Extension Last state Type Mailbox Expiry 10.24.17.254 Alice ZjE2ZDAwYThiOTA 6001@default Unavailable pidf+xml 001800 1 active SIP subscription - ``` From this point onward, Asterisk should send out a SIP NOTIFY to the Alice peer whenever state changes for any of the devices mapped to the hint 6001. Alice's phone should then reflect that state on its display. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/chan_sip-State-and-Presence-Options.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/chan_sip-State-and-Presence-Options.md index 4eb660214c..43e201ee32 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/chan_sip-State-and-Presence-Options.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-chan_sip/chan_sip-State-and-Presence-Options.md @@ -20,7 +20,6 @@ Default: no ``` [general] callcounter=yes - ``` busylevel @@ -34,7 +33,6 @@ Default: 0 [6001] type=friend busylevel=2 - ``` notifyhold @@ -49,7 +47,6 @@ Default: yes ``` [general] notifyhold=no - ``` Extension State, Hints, Subscriptions @@ -68,7 +65,6 @@ Default: yes [6001] type=friend allowsubscribe=no - ``` subscribecontext @@ -85,7 +81,6 @@ Default: null (by default Asterisk will use the context specified with the "cont type=friend context=internal subscribecontext=myhints - ``` notifyringing @@ -98,7 +93,6 @@ Default: yes ``` [general] notifyringing=no - ``` notifycid @@ -124,5 +118,4 @@ Default: no ; notifycid to 'ignore-context' also causes call-pickups attempted ; via SNOM's NOTIFY mechanism to set the context for the call pickup ; to PICKUPMARK. - ``` diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Asterisk-PJSIP-Troubleshooting-Guide.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Asterisk-PJSIP-Troubleshooting-Guide.md index 3673d20a8d..b650db5ba9 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Asterisk-PJSIP-Troubleshooting-Guide.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Asterisk-PJSIP-Troubleshooting-Guide.md @@ -33,14 +33,12 @@ On this Page ``` [2014-10-13 16:12:17.349] DEBUG[27284]: res_pjsip_endpoint_identifier_user.c:106 username_identify: Could not identify endpoint by username 'eggowaffles' - ``` or ``` [2014-10-13 16:13:07.201] DEBUG[27507]: res_pjsip_endpoint_identifier_ip.c:113 ip_identify_match_check: Source address 127.0.0.1:5061 does not match identify 'david-ident' - ``` then this is a good indication that the request is being rejected because Asterisk cannot determine which endpoint the incoming request is coming from. @@ -73,7 +71,6 @@ m=audio 6000 RTP/AVP 0 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=ptime:20 - ``` In this example, the URI in the From header is "sip:eggowaffles@127.0.0.1:5061". The user portion is "eggowaffles", so Asterisk attempts to look up an endpoint called "eggowaffles" in its configuration. If such an endpoint is not configured, then the INVITE is rejected by Asterisk. The most common cause of the problem is that the user name referenced in the From header is not the name of a configured endpoint in Asterisk. @@ -86,7 +83,6 @@ But what if you have configured an endpoint called "eggowaffles"? It is possible ``` [2014-10-13 16:25:01.674] ERROR[27771]: config_options.c:710 aco_process_var: Could not find option suitable for category 'eggowaffles' named 'setvar' at line 390 of [2014-10-13 16:25:01.674] ERROR[27771]: res_sorcery_config.c:275 sorcery_config_internal_load: Could not create an object of type 'endpoint' with id 'eggowaffles' from configuration file 'pjsip.conf' - ``` In this case, I set an endpoint option called "setvar" instead of the appropriate "set_var". The result was that the endpoint was not loaded. @@ -101,7 +97,6 @@ Asterisk can also recognize endpoints based on the source IP address of the SIP ``` Module Description Use Count Status Support Level res_pjsip_endpoint_identifier_ip.so PJSIP IP endpoint identifier 0 Running core - ``` * Run the troubleshooting steps from the Identify by User section to ensure that the endpoint you have configured has actually been properly loaded. * From the Asterisk CLI, run the command `pjsip show endpoint `. Below the headers at the top of the output, you should see something like the following: @@ -112,7 +107,6 @@ res_pjsip_endpoint_identifier_ip.so PJSIP IP endpoint identifier 0 Running core Aor: david 10 Transport: main-transport udp 0 0 0.0.0.0:5060 Identify: 10.24.16.36/32 - ``` Notice the bottom line. This states that the endpoint is matched based on the IP address 10.24.16.36. If you do not see such a line for the endpoint that you expect to be matched, then there is likely a configuration error. If the line does appear, then ensure that the IP address listed matches what you expect for the endpoint. @@ -130,7 +124,6 @@ Notice the bottom line. This states that the endpoint is matched based on the IP Aor: david 10 Transport: main-transport udp 0 0 0.0.0.0:5060 Identify: 10.24.16.36/32 - ``` Notice that if a SIP request arrives from 10.24.16.36, it is ambiguous if the request should be matched to carol or david. @@ -150,7 +143,6 @@ sorcery.conf ``` [res_pjsip_endpoint_identifier_ip] identify = realtime,ps_endpoint_id_ips - ``` And then you would need the corresponding config in `extconfig.conf`: @@ -160,7 +152,6 @@ extconfig.conf ``` [settings] ps_endpoint_id_ips => odbc - ``` ### Anonymous Identification @@ -171,7 +162,6 @@ Anonymous endpoint identification allows for a specially-named endpoint called " ``` Module Description Use Count Status Support Level res_pjsip_endpoint_identifier_anonymous.so PJSIP Anonymous endpoint identifier 0 Running core - ``` * Ensure that the "anonymous" endpoint has been properly loaded. See the troubleshooting steps in the Identify by User section for more details about how to determine if an endpoint has been loaded. @@ -295,7 +285,6 @@ To: ;tag=z9hG4bKPjCrZnx79augJPtGcTbYlXEs2slZNtwYeC Call-ID: q.TF2SAaX3jn8dtaLTOCuIO8FRyDCsSR CSeq: 9776 ACK Content-Length: 0 - ``` At first glance, it would appear that the incoming call was challenged for authentication, and that 200 then failed to authenticate on the second INVITE sent. The actual problem here is that the endpoint 200 does not exist within Asterisk. Whenever a SIP request arrives and Asterisk cannot match the request to a configured endpoint, Asterisk will respond to the request with a 401 Unauthorized response. The response will contain a WWW-Authenticate header to make it look as though Asterisk is requesting authentication. Since no endpoint was actually matched, the authentication challenge created by Asterisk is just dummy information and is actually impossible to authenticate against. @@ -325,7 +314,6 @@ The opposite problem of authentication failures is that incoming calls are not b Aor: david 10 Transport: main-transport udp 0 0 0.0.0.0:5060 Identify: 10.24.16.36/32 - ``` Notice the "InAuth" on the second line of output. This shows that the endpoint's auth is pointing to a configuration section called "david-auth" and that the auth section has a username of "david". If you do not see an "InAuth" specified for the endpoint, then this means that Asterisk does not see that the endpoint is configured for authentication. Check the following: @@ -341,7 +329,6 @@ If you are seeing a message like the following on your CLI when you place an inc ``` [2014-10-14 13:22:45.886] NOTICE[1583]: res_pjsip_session.c:1538 new_invite: Call from '201' (UDP:10.24.18.87:5060) to extension '456789' rejected because extension not found in context 'default'. - ``` then it means that Asterisk was not able to direct the incoming call to an appropriate extension in the dialplan. In the case above, I dialled "456789" on the phone that corresponds with endpoint 201. Endpoint 201 is configured with `context = default` and the "default" context in my dialplan does not have an extension "456789". @@ -379,7 +366,6 @@ If you see a message like the following: ``` [2014-10-14 15:50:50.407] ERROR[2004]: chan_pjsip.c:1767 request: Unable to create PJSIP channel - endpoint 'hammerhead' was not found - ``` then this means that Asterisk thinks the endpoint you are trying to dial does not exist. For troubleshooting tips about how to ensure that endpoints are loaded as expected, check the Identify by User subsection in the Incoming Calls section. @@ -390,7 +376,6 @@ Alternatively, if you see a message like the following: [2014-10-14 15:55:06.292] ERROR[2578][C-00000000]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("hammerhead", "(null)", ...): Name or service not known [2014-10-14 15:55:06.292] WARNING[2578][C-00000000]: chan_sip.c:6116 create_addr: No such host: hammerhead [2014-10-14 15:55:06.292] DEBUG[2578][C-00000000]: chan_sip.c:29587 sip_request_call: Cant create SIP call - target device not registered - ``` or @@ -398,7 +383,6 @@ or ``` [2014-10-14 15:55:58.440] WARNING[2700][C-00000000]: channel.c:5946 ast_request: No channel type registered for 'SIP' [2014-10-14 15:55:58.440] WARNING[2700][C-00000000]: app_dial.c:2431 dial_exec_full: Unable to create channel of type 'SIP' (cause 66 - Channel not implemented) - ``` then it means that your dialplan is referencing "SIP/hammerhead" instead of "PJSIP/hammerhead". Change your dialplan to refer to the correct channel driver, and don't forget to `dialplan reload` when you are finished. @@ -411,7 +395,6 @@ If Asterisk is finding your endpoint successfully, it may be that Asterisk has n ``` [2014-10-14 15:58:06.690] WARNING[2743]: res_pjsip/location.c:155 ast_sip_location_retrieve_contact_from_aor_list: Unable to determine contacts from empty aor list [2014-10-14 15:58:06.690] WARNING[2834][C-00000000]: app_dial.c:2431 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination) - ``` If you see this, then the endpoint you are dialling either has no associated address of record (AoR) or the associated AoR does not have any contact URIs bound to it. AoRs are necessary in order to determine the appropriate destination of the call. To see if your endpoint has an associated AoR, run `pjsip show endpoint ` from the Asterisk CLI. The following is sample output of an endpoint that **does** have an AoR configured on it: @@ -422,7 +405,6 @@ If you see this, then the endpoint you are dialling either has no associated add Aor: david 10 Transport: main-transport udp 0 0 0.0.0.0:5060 Identify: 10.24.16.36/32 - ``` Notice the third line. The endpoint points to the AoR section called "david". If your endpoint does not have an AoR associated with it, this third line will be absent. @@ -436,7 +418,6 @@ If those appear to be okay, it may be that there was an error when attempting to ``` Unable to find object heman. - ``` Then it means the AoR did not get loaded properly. Here are some troubleshooting steps to ensure your AoR is configured correctly: @@ -447,7 +428,6 @@ Then it means the AoR did not get loaded properly. Here are some troubleshooting ``` [2014-10-14 16:16:20.658] ERROR[2939]: config_options.c:710 aco_process_var: Could not find option suitable for category '1000' named 'awesomeness' at line 219 of [2014-10-14 16:16:20.659] ERROR[2939]: res_sorcery_config.c:275 sorcery_config_internal_load: Could not create an object of type 'aor' with id '1000' from configuration file 'pjsip.conf' - ``` In this case, I tried to set an option called "awesomeness" on the AoR 1000. Since Asterisk did not recognize this option, AoR 1000 was unable to be loaded. @@ -458,7 +438,6 @@ Another issue you may encounter is that you have properly configured an AoR on t ``` Aor: 201 1 Contact: 201/sip:201@10.24.18.87:5060;ob Unknown nan - ``` The "Contact:" line shows the URI "sip:201@10.24.18.87:5060;ob" is bound to the AoR 201. If the AoR does not have any contacts bound to it, then no Contact lines would appear. The absence of Contact lines can be explained by any of the following: @@ -523,7 +502,6 @@ Contact: "200" Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 - ``` This REGISTER was sent by the endpoint 200. The URI in the To header is "sip:200@10.24.20.249". Asterisk extracts the username portion of this URI to determine the address of record (AoR) that the REGISTER pertains to. In this case, the AoR has the same name as the endpoint, 200. The URI in the Contact header is "sip:200@10.24.16.37:5060;ob". The REGISTER request is attempting to bind this contact URI to the AoR. Ultimately, what this means is that when someone requests to reach endpoint 200, Asterisk will check the AoRs associated with the endpoint, and send requests to all contact URIs that have been bound to the AoR. In other words, the REGISTER gives Asterisk the means to locate the endpoint. @@ -535,7 +513,6 @@ You can ensure that your configuration is sane by running the the `pjsip show en Aor: 200 1 Contact: 200/sip:200@10.24.16.37:5060;ob Unknown nan Transport: main-transport udp 0 0 0.0.0.0:5060 - ``` This shows that endpoint 200 has AoR 200 associated with it. And you can also see that the contact "sip:200@10.24.16.37:5060;ob" has been bound to the AoR. @@ -552,13 +529,11 @@ More likely, the issue will be that an AoR will be listed, but there will be no ``` Module Description Use Count Status Support Level res_pjsip_registrar.so PJSIP Registrar Support 0 Running core - ``` * Ensure that the AoR has a `max_contacts` value configured on it. If this option is not set, then registration cannot succeed. You will see this message on the CLI: ``` [2014-10-16 11:34:07.887] WARNING[2940]: res_pjsip_registrar.c:685 registrar_on_rx_request: AOR '200' has no configured max_contacts. Endpoint '200' unable to register - ``` Asterisk will transmit a 403 Forbidden in response to the registration attempt. @@ -570,7 +545,6 @@ If you initially have successful registrations but they later start failing, the ``` [2014-10-16 11:34:07.887] WARNING[2940]: res_pjsip_registrar.c:411 rx_task: Registration attempt from endpoint '200' to AOR '200' will exceed max contacts of 1 - ``` Asterisk will respond to the registration attempt with a 403 Forbidden. @@ -589,7 +563,6 @@ If you are still having trouble, here are some troubleshooting steps: ``` [2014-10-16 12:05:16.064] ERROR[3187]: res_pjsip_outbound_registration.c:724 sip_outbound_registration_regc_alloc: Invalid server URI 'registrar@example.com' specified on outbound registration 'outreg' - ``` In this case, I left off the initial "sip:" from the URI. @@ -617,7 +590,6 @@ If you are attempting to subscribe to the presence or dialog event packages, the ``` [2014-10-16 12:56:58.605] WARNING[3780]: res_pjsip_exten_state.c:337 new_subscribe: Extension blah does not exist or has no associated hint - ``` The warning message is self-explanatory. If you think you have placed extension "blah" in your `extensions.conf` file and it contains a hint, then be sure that it exists in the same context as the `context` option on the endpoint that is attempting to subscribe. Also be sure that if you have recently changed your `extensions.conf` file that you have saved the changes and run the `dialplan reload` CLI command. @@ -633,7 +605,6 @@ If you are attempting to subscribe to the message-summary package, then here are ``` [2014-10-16 13:06:51.323] NOTICE[3963]: res_pjsip_mwi.c:566 mwi_validate_for_aor: Endpoint '200' already configured for unsolicited MWI for mailbox '200'. Denying MWI subscription to 200 - ``` The most likely cause of something like this is that you have an endpoint and an AoR that both have `mailboxes = 200` in your configuration. The endpoint with `mailboxes = 200` attempts to subscribe to the AoR that has `mailboxes = 200`. In this case, since Asterisk is already sending MWI notifications about mailbox 200 to the endpoint, the subscription to the AoR is denied. To fix this, remove the `mailboxes` option from your endpoint, or configure your device not to attempt to subscribe to MWI. @@ -652,7 +623,6 @@ If you look into your logs you might messages similar to the following: ``` [Dec 12 00:58:31] ERROR[10157] config_options.c: Error parsing bind=:: at line 8 of [Dec 12 00:58:31] ERROR[10157] res_sorcery_config.c: Could not create an object of type 'transport' with id 'my-ipv6-transport' from configuration file 'pjsip.conf' - ``` The most likely issue is that you have not compiled **pjproject** with support for IPv6. You can find instructions at [PJSIP-pjproject](/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/PJSIP-pjproject). diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-Outbound-Registrations.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-Outbound-Registrations.md index 87d26840e3..bc4099a030 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-Outbound-Registrations.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-Outbound-Registrations.md @@ -28,7 +28,6 @@ type = registration server_uri = sip:registrar@example.com client_uri = sip:client@example.com contact_user = inbound-calls - ``` This results in the following outbound REGISTER request being sent by Asterisk: @@ -46,7 +45,6 @@ Expires: 3600 Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER, REGISTER Max-Forwards: 70 Content-Length: 0 - ``` Let's go over how the options were applied to this REGISTER: @@ -69,7 +67,6 @@ client_uri = sip:client@example.com\;transport=tcp contact_user = inbound-calls --- - ``` Outbound registrations and endpoints @@ -87,7 +84,6 @@ type = endpoint type = identify match = endpoint = my_provider - ``` This represents the bare minimum necessary in order to accept incoming calls from the provider. The `identify` section makes it so that incoming SIP traffic from the IP address in the `match` option will be associated with the endpoint called `my_provider_endpoint`. @@ -109,7 +105,6 @@ endpoint = my_provider [my_provider_aor] type = aor contact = sip:my_provider@example.com - ``` !!! warning @@ -136,7 +131,6 @@ outbound_auth = provider_auth type = auth username = my_username password = my_password - ``` With this configuration, now if the registrar responds to a REGISTER by challenging for authentication, Asterisk will use the authentication credentials in the provider_auth section in order to authenticate. Details about what options are available in auth sections can be found [here](/Latest_API/API_Documentation/Module_Configuration/res_pjsip) in the "auth" section. @@ -181,7 +175,6 @@ auth_rejection_permanent = no retry_interval = 30 forbidden_retry_interval = 300 max_retries = 20 - ``` In general, this configuration is more lenient than the default. We will retry registration more times, we will retry after authentication requests and forbidden responses, and we will retry more often. @@ -199,7 +192,6 @@ You can monitor the status of your configured outbound registrations via the CLI ========================================================================================= my_provider/sip:registrar@example.com provider_auth Unregistered outreg/sip:registrar@example.com n/a Unregistered - ``` On this particular Asterisk instance, there are two outbound registrations configured. The headers at the top explain what is in each column. The "Status" can be one of the following values: @@ -231,7 +223,6 @@ In addition, you can see the details of a particular registration by issuing the server_uri : sip:registrar@example.com support_path : false transport : - ``` This provides the same status line as before and also provides the configured values for the outbound registration. @@ -285,7 +276,6 @@ Event: OutboundRegistrationDetailComplete EventList: Complete Registered: 0 NotRegistered: 2 - ``` The command sends `OutboundRegistrationDetail` events for each configured outbound registration. Most information is the same as the CLI displays, but there is one additional piece of data displayed: NextReg. This is the number of seconds until Asterisk will send a new REGISTER request to the registrar. In this particular scenario, that number is 0 because the two outbound registrations have reached their maximum number of retries. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-IPv6.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-IPv6.md index 39a77a4fc5..3b6287ca7f 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-IPv6.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-IPv6.md @@ -23,7 +23,6 @@ bind=[fe80::5e26:aff:fe4b:4399] type=transport protocol=tcp bind=[fe80::5e26:aff:fe4b:4399] - ``` Bind PJSIP to the first available IPv6 interface @@ -36,7 +35,6 @@ A transport can be configured to automatically bind to the first available IPv6 type=transport protocol=udp bind=:: - ``` Configure a PJSIP endpoint to use RTP over IPv6 @@ -51,5 +49,4 @@ transport=transport-udp6 context=from-external disallow=all allow=ulaw - ``` diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-Presence-Subscriptions.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-Presence-Subscriptions.md index 5e545ad0af..4c6289f375 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-Presence-Subscriptions.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-for-Presence-Subscriptions.md @@ -19,7 +19,6 @@ extensions.conf ``` [default] exten => 1000,hint,PJSIP/alice - ``` The line shown here is similar to any normal line in a dialplan, except that instead of a priority number or label, the word "hint" is specified. The hint is used to associate the state of individual devices with the state of a dialplan extension. An English translation of the dialplan line would be "Use the state of device PJSIP/alice as the basis for the state of extension 1000". When PJSIP endpoints subscribe to presence, they are subscribing to the state of an extension in the dialplan. By providing the dialplan hint, you are creating the necessary association in order to know which device (or devices) are relevant. For the example given above, this means that if someone subscribes to the state of extension 1000, then they will be told the state of PJSIP/alice. For more information about device state, see [this page](/Fundamentals/Key-Concepts/States-and-Presence/Device-State). @@ -50,7 +49,6 @@ extensions.conf ``` [default] exten => 1000,hint,PJSIP/alice,CustomPresence:alice - ``` This means that updates to the presence state of CustomPresence:alice will also be conveyed to subscribers to extension 1000. For more information on presence state in Asterisk, see [this page](/Fundamentals/Key-Concepts/States-and-Presence/Presence-State). diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-to-work-through-NAT.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-to-work-through-NAT.md index 43d97ff78e..a3d5116b4b 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-to-work-through-NAT.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-to-work-through-NAT.md @@ -127,7 +127,6 @@ username=6001 [6001] type=aor max_contacts=2 - ``` ### For Remote Phones Behind NAT diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Dialing-PJSIP-Channels.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Dialing-PJSIP-Channels.md index f14b588774..5e6f94e521 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Dialing-PJSIP-Channels.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Dialing-PJSIP-Channels.md @@ -12,26 +12,22 @@ Below we'll simply dial an endpoint using the chan_pjsip channel driver. This is ``` exten => _6XXX,1,Dial(PJSIP/${EXTEN}) - ``` To dial all the contacts associated with the endpoint, use the `PJSIP_DIAL_CONTACTS()` function. It evaluates to a list of contacts separated by `&`, which causes the Dial application to call them simultaneously. ``` exten => _6XXX,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})}) - ``` Heres how you would dial with an explicit SIP URI, user and domain, via an endpoint (in this case dialing out a trunk), but not using its associated AOR/contact objects. ``` exten => _9NXXNXXXXXX,1,Dial(PJSIP/mytrunk/sip:${EXTEN:1}@203.0.113.1:5060) - ``` This uses a contact(and its domain) set in the AOR associated with the **mytrunk** endpoint, but still explicitly sets the user portion of the URI in the dial string. For the AOR's contact, you would define it in the AOR config without the user name. ``` exten => _9NXXNXXXXXX,1,Dial(PJSIP/${EXTEN:1}@mytrunk) - ``` diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Exchanging-Device-and-Mailbox-State-Using-PJSIP.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Exchanging-Device-and-Mailbox-State-Using-PJSIP.md index d88e99092c..cc021baf6e 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Exchanging-Device-and-Mailbox-State-Using-PJSIP.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Exchanging-Device-and-Mailbox-State-Using-PJSIP.md @@ -50,7 +50,6 @@ devicestate_publish=instance2-devicestate mailboxstate_publish=instance2-mwi device_state=yes mailbox_state=yes - ``` This configures the first instance to publish device and mailbox state to 'instance 2' located at 172.16.10.2 using a resource name of 'instance1' without authentication. As no filters exist all state will be published. It also configures the first instance to accept all device and mailbox state messages published to a resource named 'instance2' from 'instance2'. @@ -82,7 +81,6 @@ devicestate_publish=instance1-devicestate mailboxstate_publish=instance1-mwi device_state=yes mailbox_state=yes - ``` This configures the second instance to publish device and mailbox state to 'instance 1' located at 172.16.10.1 using a resource name of 'instance2' without authentication. As no filters exist all state will be published. It also configures the second instance to accept all device and mailbox state messages published to a resource named 'instance1' from 'instance1'. @@ -121,7 +119,6 @@ device_state=yes device_state_filter=^PJSIP/ mailbox_state=yes mailbox_state_filter=^1000 - ``` This builds upon the initial configuration for instance #2 but adds filtering of received events. Only device state events relating to PJSIP endpoints will be accepted. As well only mailbox state events for mailboxes starting with 1000 will be accepted. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Migrating-from-chan_sip-to-res_pjsip.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Migrating-from-chan_sip-to-res_pjsip.md index d367478469..f8187d061a 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Migrating-from-chan_sip-to-res_pjsip.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Migrating-from-chan_sip-to-res_pjsip.md @@ -26,7 +26,6 @@ Options: -h, --help show this help message and exit -p PREFIX, --prefix=PREFIX output prefix for include files - ``` ### Example of Use @@ -37,7 +36,6 @@ Options: Reading sip.conf Converting to PJSIP... Writing pjsip.conf - ``` On this Page @@ -87,7 +85,6 @@ disallow=all allow=ulaw context=internal secret=1234 - ``` | @@ -135,7 +132,6 @@ type=auth auth_type=userpass password=1234 username=6001 - ``` | @@ -169,7 +165,6 @@ host=203.0.113.1 disallow=all allow=ulaw context=from-external - ``` | @@ -209,7 +204,6 @@ aors=mytrunk type=identify endpoint=mytrunk match=203.0.113.1 - ``` | @@ -231,7 +225,6 @@ noload => res_pjsip_session.so noload => chan_pjsip.so noload => res_pjsip_exten_state.so noload => res_pjsip_log_forwarder.so - ``` Having a noload for the above modules should (at the moment of writing this) prevent any PJSIP related modules from loading. @@ -300,7 +293,6 @@ nat=never type=peer nat=route ;... - ``` | @@ -334,6 +326,5 @@ rtp_symmetric=no force_rport=yes rewrite_contact=yes ;... - ``` | diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Advanced-Codec-Negotiation.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Advanced-Codec-Negotiation.md index 7ee60dc243..4e9e8b5fcf 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Advanced-Codec-Negotiation.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Advanced-Codec-Negotiation.md @@ -75,7 +75,6 @@ codec_prefs_incoming_offer = prefer: pending, operation: union, keep: all, trans codec_prefs_outgoing_offer = prefer: pending, operation: intersect, keep: all, transcode: allow codec_prefs_outgoing_offer = prefer: pending, operation: union, keep: all, transcode: allow codec_prefs_outgoing_offer = prefer: pending, operation: union, keep: all, transcode: allow - ``` You'll notice that the defaults always prefer the "pending" topology so in our example, what Alice sends in her SDP offer sets the stage. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Sections-and-Relationships.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Sections-and-Relationships.md index 57a6b08a84..b5fcd69981 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Sections-and-Relationships.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Sections-and-Relationships.md @@ -63,7 +63,6 @@ allow=ulaw transport=simpletrans auth=auth6001 aors=6001 - ``` If you want to define the Caller Id this endpoint should use, then add something like the following: @@ -71,7 +70,6 @@ If you want to define the Caller Id this endpoint should use, then add something ``` trust_id_outbound=yes callerid=Spaceman Spiff <6001> - ``` ### TRANSPORT @@ -98,7 +96,6 @@ A basic UDP transport bound to all interfaces type=transport protocol=udp bind=0.0.0.0 - ``` Or a TLS transport, with many possible options and parameters: @@ -114,7 +111,6 @@ priv_key_file= ca_list_file= cipher= method= - ``` ### AUTH @@ -133,7 +129,6 @@ type=auth auth_type=userpass password=6001 username=6001 - ``` And then an example with MD5 authentication @@ -144,7 +139,6 @@ type=auth auth_type=md5 md5_cred=51e63a3da6425a39aecc045ec45f1ae8 username=6001 - ``` ### AOR @@ -170,7 +164,6 @@ First, we have a configuration where you are expecting the SIP User Agent (likel [6001] type=aor max_contacts=1 - ``` Second, we have a configuration where you are **not** expecting the SIP User Agent to register against the AOR. In this case, you can assign contacts manually as follows. We don't have to worry about max_contacts since that option only affects the maximum allowed contacts to be created through external interaction, like registration. @@ -179,7 +172,6 @@ Second, we have a configuration where you are **not** expecting the SIP User Age [6001] type=aor contact=sip:6001@192.0.2.1:5060 - ``` Third, it's useful to note that you could define only the domain and omit the user portion of the SIP URI if you wanted. Then you could define the **user** portion dynamically in your dialplan when calling the Dial application. You'll likely do this when building an AOR/Endpoint combo to use for dialing out to an ITSP. For example: "Dial(PJSIP/${EXTEN}@mytrunk)" @@ -188,7 +180,6 @@ Third, it's useful to note that you could define only the domain and omit the us [mytrunk] type=aor contact=sip:203.0.113.1:5060 - ``` ### REGISTRATION @@ -223,7 +214,6 @@ outbound_auth=mytrunk server_uri=sip:sip.example.com client_uri=sip:1234567890@sip.example.com retry_interval=60 - ``` What if you don't need to authenticate? You can simply omit the **outbound_auth** option. @@ -240,7 +230,6 @@ EXAMPLE BASIC CONFIGURATION [example2.com] type=domain_alias domain=example.com - ``` ### ACL @@ -257,7 +246,6 @@ A configuration pulling from the acl.conf file: [acl] type=acl acl=example_named_acl1 - ``` A configuration defined in the object itself: @@ -268,7 +256,6 @@ type=acl deny=0.0.0.0/0.0.0.0 permit=209.16.236.0 permit=209.16.236.1 - ``` A configuration where we are restricting based on contact headers instead of IP addresses. @@ -279,7 +266,6 @@ type=acl contactdeny=0.0.0.0/0.0.0.0 contactpermit=209.16.236.0 contactpermit=209.16.236.1 - ``` All of these configurations can be combined. @@ -299,7 +285,6 @@ Its use is quite straightforward. With this configuration if Asterisk sees inbou type=identify endpoint=6001 match=203.0.113.1 - ``` ### CONTACT diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Wizard.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Wizard.md index b8498bbd95..04169b40ed 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Wizard.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Wizard.md @@ -21,7 +21,6 @@ outbound_auth/username = my_username outbound_auth/password = my_password endpoint/context = default aor/qualify_frequency = 15 - ``` | `pjsip.conf` @@ -56,7 +55,6 @@ client_uri = sip:my_username@sip.my-itsp.net type = identify endpoint = my-itsp match = sip.my-itsp.net - ``` | @@ -196,7 +194,6 @@ inbound_auth/username = alice inbound_auth/password = alicespassword has_phoneprov = yes phoneprov/MAC = deadbeef4dad - ``` | This example demonstrates the power of both wizards and templates.Once the template is created, adding a new phone could be as simple as creating a wizard objectOf course, you can override ANYTHING in the wizard object or specify everything and not use templates at all. | @@ -240,7 +237,6 @@ outbound_auth/username = my_username outbound_auth/password = my_password registration/expiration = 900 registration/support_path = no - ``` | This is an example of trunks to 2 different ITSPs each of which has a primary andIt also shows most of the endpoint and aor parameters being left at their defaults.In this scenario, each wizard object takes the place of an endpoint, aor, auth, | @@ -260,6 +256,5 @@ sends_registrations = no accepts_registrations = no sends_auth = no accepts_auth = no - ``` | This one's even simpler. The `sends_` and `accepts_` parameters all default to `no` so you don't really | diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Transport-Selection.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Transport-Selection.md index 2b8907a87f..897bf0c136 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Transport-Selection.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Transport-Selection.md @@ -113,7 +113,6 @@ cert_file=certificate [phone] type=endpoint - ``` This example includes an endpoint without a transport explicitly defined. Since there is only one transport configured for each address family and transport type each respective one will be used depending on the URI dialed. For requests to this endpoint the logic in section 3a will be used. @@ -166,7 +165,6 @@ transport=system-local-udp [phone-unspecified] type=endpoint - ``` This example includes three endpoints which are each present on different networks. To ensure that outgoing requests to the first two endpoints travel over the correct transport the transport has been explicitly specified on each. For requests to these endpoints the logic in section 3b will be used. For requests to the "phone-unspecified" endpoint since no transport has been explicitly specified the logic in section 3a will be used. @@ -186,7 +184,6 @@ bind=[2001:470:e20f:42::42] type=transport protocol=tcp bind=[2001:470:e20f:42::42] - ``` IPv4+IPv6 Combined (Single Interface) @@ -214,7 +211,6 @@ bind=[2001:470:e20f:42::42] type=transport protocol=tcp bind=[2001:470:e20f:42::42] - ``` !!! warning @@ -235,7 +231,6 @@ If a transport can not be found during the transport selection process you will ``` Failed to send Request msg INVITE/cseq=7846 (tdta0x7fa920002e50)! err=171060 (Unsupported transport (PJSIP_EUNSUPTRANSPORT)) - ``` This can occur due to using a transport type (such as TCP) or address family when a transport meeting the requirements does not exist. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Publishing-Extension-State.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Publishing-Extension-State.md index babbb49acd..029414ce02 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Publishing-Extension-State.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Publishing-Extension-State.md @@ -57,7 +57,6 @@ multi_user=yes @body=application/dialog-info+xml @context=^users @exten=^1000 - ``` #### This configuration would limit outbound publish to all extension state changes a result of hints in the context "users". @@ -71,7 +70,6 @@ event=dialog multi_user=yes @body=application/dialog-info+xml @context=^users - ``` You are also not limited to a single configured outbound publish. You can have as many as you want, provided they have different names. Each one can go to the same server with a different body type, or to different servers. @@ -84,14 +82,12 @@ As part of the work to implement the publishing of extension state, the concept ``` [users] autohints=yes - ``` For example, once enabled, if a device state change occurs for "PJSIP/alice" and no hint named "alice" exists, then one will be automatically created in lieu of explicit definition of the following: ``` exten => alice,hint,PJSIP/alice - ``` Despite being added after startup, this hint will still be given to the extension state publishing for publishing. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Resource-List-Subscriptions-RLS.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Resource-List-Subscriptions-RLS.md index bd62262aef..29e142cfb4 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Resource-List-Subscriptions-RLS.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Resource-List-Subscriptions-RLS.md @@ -32,7 +32,6 @@ event = presence list_item = alice list_item = bob list_item = carol - ``` It should be simple to glean the intent of this list. We have created a list called "sales" that provides the presence of the sales team of alice, bob, and carol. Let's go over each of the options in more detail. @@ -66,7 +65,6 @@ list_item = alice list_item = bob list_item = carol notification_batch_interval = 2000 - ``` The units for the `notification_batch_interval` are milliseconds. With this configuration, Asterisk will collect resource state changes for 2000 milliseconds before sending notifications on this resource list. @@ -92,7 +90,6 @@ event = presence list_item = alice list_item = bob list_item = carol - ``` And you have the following in `extensions.conf` @@ -103,7 +100,6 @@ extensions.conf [default] exten => alice,hint,PJSIP/alice exten => bob,hint,PJSIP/bob - ``` Notice that there is no "carol" extension in `extensions.conf`. What happens when a user attempts to subscribe to the sales list? @@ -129,7 +125,6 @@ list_item = tech_support type = resource_list event = presence list_item = sales - ``` Notice that the sales list contains the tech_support list, and the tech_support list contains the sales list. We have a loop here. How is that handled? @@ -158,7 +153,6 @@ type = resource_list event = presence list_item = sales list_item = alice - ``` Notice that the tech_support list now also has alice as a list_item. How does the process change on a subscription attempt to sales? @@ -196,7 +190,6 @@ event = presence list_item = alice list_item = bob list_item = carol - ``` And let's say you have the following `extensions.conf`: @@ -206,7 +199,6 @@ extensions.conf ``` [default] exten => sales,hint,Custom:sales - ``` What happens if someone attempts to subscribe to the "sales" presence resource? @@ -236,7 +228,6 @@ event = presence list_item = alice list_item = bob notification_batch_interval = 10000 - ``` What is the batch interval when a user subscribes to the sales list? diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Setting-up-PJSIP-Realtime.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Setting-up-PJSIP-Realtime.md index 9d235c30a8..0bc1734ffa 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Setting-up-PJSIP-Realtime.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Setting-up-PJSIP-Realtime.md @@ -26,7 +26,6 @@ So, from the CLI, perform: ```bash title=" " linenums="1" # apt-get install unixodbc unixodbc-dev libmyodbc python-dev python-pip python-mysqldb - ``` Once these packages are installed, check your Asterisk installation's **make menuconfig** tool to make sure that the **res_config_odbc** and **res_odbc** resource modules, as well as the **res_pjsip_xxx** modules are selected for installation. If they are, then go through the normal Asterisk installation process: **./configure; make; make install** @@ -39,7 +38,6 @@ Use the **mysqladmin** tool to create the database that we'll use to store the c ```bash title=" " linenums="1" # mysqladmin -u root -p create asterisk - ``` This will prompt you for your MySQL database password and then create a database named **asterisk** that we'll use to store our PJSIP configuration. @@ -52,21 +50,18 @@ First, install Alembic: ```bash title=" " linenums="1" # pip install alembic - ``` Then, move to the Asterisk source directory containing the Alembic scripts: ```bash title=" " linenums="1" # cd contrib/ast-db-manage/ - ``` Next, edit the **config.ini.sample** file and change the **sqlalchemy.url** option, e.g. ```conf title="config.ini.sample" sqlalchemy.url = mysql://root:password@localhost/asterisk - ``` such that the URL matches the username and password required to access your database. @@ -75,14 +70,12 @@ Then rename the config.ini.sample file to config.ini ```bash title=" " linenums="1" # cp config.ini.sample config.ini - ``` Finally, use Alembic to set up the database tables: ```bash title=" " linenums="1" # alembic -c config.ini upgrade head - ``` You'll see something similar to: @@ -94,7 +87,6 @@ INFO [alembic.migration] Will assume non-transactional DDL. INFO [alembic.migration] Running upgrade None -> 4da0c5f79a9c, Create tables INFO [alembic.migration] Running upgrade 4da0c5f79a9c -> 43956d550a44, Add tables for pjsip # - ``` You can then connect to MySQL to see that the tables were created: @@ -121,7 +113,6 @@ mysql> show tables; +--------------------+ 12 rows in set (0.00 sec) mysql> quit - ``` ## Configuring ODBC @@ -134,7 +125,6 @@ Description = ODBC for MySQL Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so UsageCount = 2 - ``` Next, we'll tell ODBC **which** MySQL database to use. To do this, we'll edit the **/etc/odbc.ini** configuration file and create a database handle called **asterisk**. Your file should look something like: @@ -162,7 +152,6 @@ dsn => asterisk username => root password => password pre-connect => yes - ``` Again, take care to use the proper username and password. @@ -181,7 +170,6 @@ ODBC DSN Settings Pooled: No Connected: Yes *CLI> - ``` ## Connecting PJSIP Sorcery to the Realtime Database @@ -210,7 +198,6 @@ contact=realtime,ps_contacts [res_pjsip_endpoint_identifier_ip] identify=realtime,ps_endpoint_id_ips - ``` The items use the following nomenclature: @@ -230,7 +217,6 @@ For example if you want to read **endpoints** from both realtime and static conf ```conf title="sorcery.conf" endpoint=realtime,ps_endpoints endpoint=config,pjsip.conf,criteria=type=endpoint - ``` You can swap the order to control which data source is read first. @@ -250,7 +236,6 @@ ps_aors => odbc,asterisk ps_domain_aliases => odbc,asterisk ps_endpoint_id_ips => odbc,asterisk ps_contacts => odbc,asterisk - ``` /// note @@ -301,7 +286,6 @@ mysql> insert into ps_auths (id, auth_type, password, username) values (102, 'us mysql> insert into ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) values (101, 'transport-udp', '101', '101', 'testing', 'all', 'g722', 'no'); mysql> insert into ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) values (102, 'transport-udp', '102', '102', 'testing', 'all', 'g722', 'no'); mysql> quit; - ``` In this example, we first created an **aor** for each peer, one called **101** and the other **102**. @@ -319,7 +303,6 @@ Endpoints: 101 102 *CLI> - ``` ### A Little Dialplan diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Configuration-Examples.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Configuration-Examples.md index c6aa19a3d4..e210161c2b 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Configuration-Examples.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Configuration-Examples.md @@ -39,7 +39,6 @@ username=6001 [6001] type=aor max_contacts=1 - ``` * auth= is used for the endpoint as opposed to outbound_auth= since we want to allow inbound registration for this endpoint @@ -91,7 +90,6 @@ aors=mytrunk type=identify endpoint=mytrunk match=sip.example.com - ``` * "contact=sip:203.0.113.1:5060", we don't define the user portion statically since we'll set that dynamically in dialplan when we call the Dial application. @@ -112,7 +110,6 @@ client_uri=sip:1234567890@sip.example.com\;transport=tcp retry_interval=60 --- - ``` Multiple endpoints with phones registering to Asterisk, using templates @@ -179,7 +176,6 @@ password=6003 username=6003 [6003](aor-single-reg) - ``` Obviously the larger your configuration is, the more templates will benefit you. Here we just break apart the endpoints with templates, but you could do that with any config section that needs instances with variation, but where each may share common settings with their peers. diff --git a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Remote-Attended-Transfers.md b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Remote-Attended-Transfers.md index d5fad0af1e..9ca8096198 100644 --- a/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Remote-Attended-Transfers.md +++ b/docs/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Remote-Attended-Transfers.md @@ -22,21 +22,18 @@ As you can see, Bob has simultaneous calls through two separate servers. Now whe ``` Refer-To: - ``` That's a bit verbose. So let's break it down a little bit. First, there is a SIP URI: ``` sip:carol@server_b.com - ``` Next, there is a Replaces URI header. There are some URL-escaped character sequences in there. If we decode them, we get the following: ``` Replaces: ABCDE;to-tag=BtoBob;from-tag=BobtoB - ``` If we break down the parts of this, what the Replaces section tells us is that the REFER request is saying that the SIP dialog with Call-ID "ABCDE", to-tag "BtoBob" and from-tag "BobtoB" needs to be replaced by the party (or parties) that Bob is talking to. @@ -54,7 +51,6 @@ In the scenario above, when Asterisk A receives the REFER request from Bob, Aste ``` Replaces: ABCDE;to-tag=BtoBob;from-tag=BobtoB - ``` When Server B receives this INVITE, it will essentially swap this new call in for the call referenced by the Replaces header. By doing this, the final picture looks something like the following: @@ -100,7 +96,6 @@ If you decide to perform the transfer, the most straightforward way to do this i ``` exten => external_replaces,1,NoOp() same => n,Dial(PJSIP/default_outgoing/${SIPREFERTOHDR}) - ``` Let's examine that `Dial()` more closely. First, we're dialing using PJSIP, which is pretty obvious. Next, we have the endpoint name. The endpoint name could be any configured endpoint you want to use to make this call. Remember that endpoint settings are things such as what codecs to use, what user name to place in the from header, etc. By default, if you just dial `PJSIP/some_endpoint`, Asterisk looks at some_endpoint's configured `aors` to determine what location to send the outgoing call to. However, you can override this default behavior and specify a URI to send the call to instead. This is what is being done in this `Dial()` statement. We're dialing using settings for an endpoint called "default_outgoing", presumably used as a default endpoint for outgoing calls. We're sending the call out to the URI specified by `SIPREFERTOHDR` though. Using the scenario on this page, the `Dial()` command would route the call to `sip:carol@server_b`. diff --git a/docs/Configuration/Channel-Drivers/Skinny/Skinny-call-logging.md b/docs/Configuration/Channel-Drivers/Skinny/Skinny-call-logging.md index c7aada29ab..030e28cf6b 100644 --- a/docs/Configuration/Channel-Drivers/Skinny/Skinny-call-logging.md +++ b/docs/Configuration/Channel-Drivers/Skinny/Skinny-call-logging.md @@ -17,7 +17,6 @@ exten => 100,1,NoOp exten => 100,n,Progress exten => 100,n,Ringing exten => 100,n,VoicemailMain(${CALLERID(num)@mycontext,s) - ``` Example (This will not): @@ -26,5 +25,4 @@ Example (This will not): exten => 100,1,NoOp exten => 100,n,VoicemailMain(${CALLERID(num)@mycontext,s) - ``` diff --git a/docs/Configuration/Channel-Drivers/Unistim/Introduction-to-the-Unistim-channel.md b/docs/Configuration/Channel-Drivers/Unistim/Introduction-to-the-Unistim-channel.md index a66d5959c7..c3b89d834e 100644 --- a/docs/Configuration/Channel-Drivers/Unistim/Introduction-to-the-Unistim-channel.md +++ b/docs/Configuration/Channel-Drivers/Unistim/Introduction-to-the-Unistim-channel.md @@ -48,21 +48,18 @@ If you have this entry on unistim.conf : [violet] device=006038abcdef line => 102 - ``` then use: ``` exten => 2100,1,Dial(USTM/102@violet) - ``` You can display a text with : ``` exten => 555,1,SendText(Sends text to client. Greetings) - ``` ##### Rebooting a Nortel phone @@ -79,14 +76,12 @@ Select the ring style #1 and the default volume : ``` exten => 2100,1,Dial(USTM/102@violet/r1) - ``` Select the ring style #4 with a very loud volume : ``` exten => 2100,1,Dial(USTM/102@violet/r43) - ``` ##### Country code @@ -104,7 +99,6 @@ exten => 2100,1,Dial(USTM/102@violet/r43) | 5 2 | | 4 1 | | 3 0 | - ``` * When the second letter of bookmark= is @, then the first character is used for positioning this entry @@ -128,7 +122,6 @@ autoprovisioning=yes [template] line => 100 bookmark=Support@123 ; Every phone will have a softkey Support - ``` * If a first phone have a mac = 006038abcdef, a new device named USTM/100@006038abcdef will be created. @@ -141,7 +134,6 @@ Example: [black] tn=1234 line => 100 - ``` * If a user enter TN 1234, the phone will be known as USTM/100@black. diff --git a/docs/Configuration/Core-Configuration/Asterisk-Builtin-mini-HTTP-Server.md b/docs/Configuration/Core-Configuration/Asterisk-Builtin-mini-HTTP-Server.md index 6339ccfd96..fdcb602852 100644 --- a/docs/Configuration/Core-Configuration/Asterisk-Builtin-mini-HTTP-Server.md +++ b/docs/Configuration/Core-Configuration/Asterisk-Builtin-mini-HTTP-Server.md @@ -22,7 +22,6 @@ A very basic configuration of http.conf could be as follows: enabled=yes bindaddr=0.0.0.0 bindport=8088 - ``` That configuration would enable the HTTP server and have it bind to all available network interfaces on port 8088. diff --git a/docs/Configuration/Core-Configuration/Asterisk-Main-Configuration-File.md b/docs/Configuration/Core-Configuration/Asterisk-Main-Configuration-File.md index 0abf19466c..af6b13de23 100644 --- a/docs/Configuration/Core-Configuration/Asterisk-Main-Configuration-File.md +++ b/docs/Configuration/Core-Configuration/Asterisk-Main-Configuration-File.md @@ -33,7 +33,6 @@ astspooldir => /var/spool/asterisk astrundir => /var/run/asterisk astlogdir => /var/log/asterisk astsbindir => /usr/sbin - ``` The directories listed above are explained in detail in the [Directory and File Structure](/Fundamentals/Directory-and-File-Structure) page. @@ -154,5 +153,4 @@ lockmode = lockfile | flock ;astctlowner = root ;astctlgroup = asterisk ;astctl = asterisk.ctl - ``` diff --git a/docs/Configuration/Core-Configuration/Configuring-Localized-Tone-Indications.md b/docs/Configuration/Core-Configuration/Configuring-Localized-Tone-Indications.md index 686cfd7615..1761ada4e9 100644 --- a/docs/Configuration/Core-Configuration/Configuring-Localized-Tone-Indications.md +++ b/docs/Configuration/Core-Configuration/Configuring-Localized-Tone-Indications.md @@ -22,7 +22,6 @@ Within the general section, only the **country** option can be set. This option ``` [general] country=us - ``` As an example, the above set the default country to the tone set for the USA. @@ -56,7 +55,6 @@ Explanation of the 'tonelist' usage: ; concisely: ; element = [!]freq[+|*freq2][/duration] ; tonelist = element[,element]* - ``` Example of a location specific tone configuration: @@ -78,5 +76,4 @@ record = 425/250,0/250 ; Info not used in Brazil standard (using UK standard) info = 950/330,1400/330,1800/330 stutter = 350+440 - ``` diff --git a/docs/Configuration/Core-Configuration/Configuring-the-Asterisk-Module-Loader.md b/docs/Configuration/Core-Configuration/Configuring-the-Asterisk-Module-Loader.md index ece82130f6..5742a7b3ab 100644 --- a/docs/Configuration/Core-Configuration/Configuring-the-Asterisk-Module-Loader.md +++ b/docs/Configuration/Core-Configuration/Configuring-the-Asterisk-Module-Loader.md @@ -37,7 +37,6 @@ Let's show a few arbitrary examples below. ;require = res_pjsip.so ;noload = pbx_gtkconsole.so ;load = res_musiconhold.so - ``` CLI Commands @@ -50,14 +49,12 @@ Asterisk provides a few commands for managing modules at run-time. Be sure to ch ``` Usage: module show [like keyword] Shows Asterisk modules currently in use, and usage statistics. - ``` * module load ``` Usage: module load Loads the specified module into Asterisk. - ``` * module unload @@ -68,7 +65,6 @@ Usage: module unload [-f|-h] [ ... ] in use (may cause a crash) and the -h module causes the module to be unloaded even if the module says it cannot, which almost always will cause a crash. - ``` * module reload @@ -76,5 +72,4 @@ Usage: module unload [-f|-h] [ ... ] Usage: module reload [module ...] Reloads configuration files for all listed modules which support reloading, or for all supported modules if none are listed. - ``` diff --git a/docs/Configuration/Core-Configuration/Logging-Configuration.md b/docs/Configuration/Core-Configuration/Logging-Configuration.md index 5ae57f1a05..ace2de9d90 100644 --- a/docs/Configuration/Core-Configuration/Logging-Configuration.md +++ b/docs/Configuration/Core-Configuration/Logging-Configuration.md @@ -65,7 +65,6 @@ rotatestrategy = rotate ; two archive files to remain uncompressed, but after that point, ; they are compressed on disk. exec_after_rotate=gzip -9 ${filename}.2 - ``` Log Files Section: @@ -130,5 +129,4 @@ full => notice,warning,error,verbose,dtmf,fax ; output notices, warning, and errors to the syslog facility syslog.local0 => notice,warning,error - ``` diff --git a/docs/Configuration/Core-Configuration/Named-ACLs.md b/docs/Configuration/Core-Configuration/Named-ACLs.md index 047c113fda..7da77c3619 100644 --- a/docs/Configuration/Core-Configuration/Named-ACLs.md +++ b/docs/Configuration/Core-Configuration/Named-ACLs.md @@ -30,7 +30,6 @@ On This Page [name_of_acl1] deny=0.0.0.0/0.0.0.0 permit=127.0.0.1 - ``` Multiple rules can be specified in an ACL as well by chaining deny/permit specifiers. @@ -41,7 +40,6 @@ deny=10.24.0.0/255.255.0.0 deny=10.25.0.0/255.255.0.0 permit=10.24.11.0/255.255.255.0 permit=10.24.12.0/255.255.255.0 - ``` Named ACLs support common modifiers like templates and additions within configuration as well. @@ -54,7 +52,6 @@ deny=0.0.0.0/0.0.0.0 permit=10.24.20.1 permit=10.24.20.2 permit=10.24.20.3 - ``` ### Configuring for IPv6 @@ -68,7 +65,6 @@ permit = ::1/128 [ipv6_example_2] permit = fe80::21d:bad:fad:2323 - ``` ### ARA Configuration @@ -82,7 +78,6 @@ Example Configuration ``` ;in extconfig.conf acls => odbc,asterisk,acltable - ``` #### Schema @@ -113,7 +108,6 @@ WITH ( ALTER TABLE acltable OWNER TO asterisk; GRANT ALL ON TABLE acltable TO asterisk; ) - ``` ##### Table Creation Script (SQLite3) @@ -122,7 +116,6 @@ GRANT ALL ON TABLE acltable TO asterisk; BEGIN TRANSACTION; CREATE TABLE acltable (rule TEXT, sense TEXT, rule_order NUMERIC, name TEXT); COMMIT; - ``` !!! note @@ -161,7 +154,6 @@ Example 1: referencing a Named ACL ;deny=0.0.0.0/0.0.0.0 ;permit=127.0.0.1 acl=name_of_acl_1 ; an ACL included from acl.conf that matches peer1's commented out permits/denies - ``` Multiple named ACLs can be referenced as well by specifying a comma delineated list of Named ACLs to apply. @@ -176,7 +168,6 @@ Example 2: multiple Named ACL references [peer1] ;stuff acl=named_acl_1,named_acl_2 - ``` Similarly, a SIP or IAX2 peer defined in ARA can include an '*acl*' column and list the Named ACLs to apply in that column. @@ -190,7 +181,6 @@ acl=named_acl_1 acl=named_acl_2 --- - ``` ### ACL Rule Application diff --git a/docs/Configuration/Dialplan/Asterisk-Extension-Language-AEL/AEL-Example-Usages/AEL-Conditionals.md b/docs/Configuration/Dialplan/Asterisk-Extension-Language-AEL/AEL-Example-Usages/AEL-Conditionals.md index a4e2354902..a9b24ba223 100644 --- a/docs/Configuration/Dialplan/Asterisk-Extension-Language-AEL/AEL-Example-Usages/AEL-Conditionals.md +++ b/docs/Configuration/Dialplan/Asterisk-Extension-Language-AEL/AEL-Example-Usages/AEL-Conditionals.md @@ -57,7 +57,6 @@ context conditional { } } } - ``` !!! note diff --git a/docs/Configuration/Dialplan/Conditional-Applications.md b/docs/Configuration/Dialplan/Conditional-Applications.md index af25517dee..7a00314582 100644 --- a/docs/Configuration/Dialplan/Conditional-Applications.md +++ b/docs/Configuration/Dialplan/Conditional-Applications.md @@ -7,7 +7,6 @@ There is one conditional application - the conditional goto : ``` exten => 1,2,GotoIf(condition?label1:label2) - ``` If condition is true go to label1, else go to label2. Labels are interpreted exactly as in the normal goto command. @@ -16,7 +15,6 @@ If condition is true go to label1, else go to label2. Labels are interpreted exa ``` exten => 1,2,GotoIf($[${CALLERID(all)} = 123456]?2,1:3,1) - ``` Example of use : @@ -26,5 +24,4 @@ exten => s,2,Set(vara=1) exten => s,3,Set(varb=$[${vara} + 2]) exten => s,4,Set(varc=$[${varb} * 2]) exten => s,5,GotoIf($[${varc} = 6]?99,1:s,6) - ``` diff --git a/docs/Configuration/Dialplan/Contexts-Extensions-and-Priorities.md b/docs/Configuration/Dialplan/Contexts-Extensions-and-Priorities.md index 44638f5243..6f04d29ec0 100644 --- a/docs/Configuration/Dialplan/Contexts-Extensions-and-Priorities.md +++ b/docs/Configuration/Dialplan/Contexts-Extensions-and-Priorities.md @@ -21,14 +21,12 @@ Within each context, we can define one or more **extensions**. An extension is s ```conf linenums="1" exten => number,priority,application([parameter[,parameter2...]]) - ``` Let's look at an example extension. ```conf linenums="1" exten => 6001,1,Dial(PJSIP/demo-alice,20) - ``` In this case, the extension number is **6001**, the priority number is **1**, the [application](/Configuration/Applications) is **Dial()**, and the two parameters to the application are **PJSIP/demo-alice** and **20**. @@ -55,7 +53,6 @@ Priority numbers can also be simplified by using the letter **n** in place of th exten => 6123,1,NoOp() exten => 6123,n,Verbose("Do something!") exten => 6123,n,Verbose("Do something different!") - ``` ///note @@ -85,7 +82,6 @@ You can also assign a label (or alias) to a particular priority number by placin exten => 6123,1,NoOp() exten => 6123,n(repeat),Verbose("Do something!") exten => 6123,n,Verbose("Do something different!") - ``` Here, we've assigned a label named **repeat** to the second priority. @@ -96,7 +92,6 @@ Included in the Asterisk 1.6.2 branch (and later) there is a way to avoid having exten => 6123,1,NoOp() same => n(repeat),Verbose("Do something!") same => n,Verbose("Do something different!") - ``` ## Dialplan search order diff --git a/docs/Configuration/Dialplan/Expressions/index.md b/docs/Configuration/Dialplan/Expressions/index.md index 114361af6c..04d85700de 100644 --- a/docs/Configuration/Dialplan/Expressions/index.md +++ b/docs/Configuration/Dialplan/Expressions/index.md @@ -10,7 +10,6 @@ For example, after the sequence: ``` exten => 1,1,Set(lala=$[1 + 2]) exten => 1,2,Set(koko=$[2 * ${lala}]) - ``` the value of variable koko is "6". @@ -19,7 +18,6 @@ And, further: ``` exten => 1,1,Set(lala=$[ 1 + 2 ]); - ``` will parse as intended. Extra spaces are ignored. diff --git a/docs/Configuration/Dialplan/Include-Statements/Include-Statements-Basics.md b/docs/Configuration/Dialplan/Include-Statements/Include-Statements-Basics.md index 1b5fca0fd1..f12223a4a9 100644 --- a/docs/Configuration/Dialplan/Include-Statements/Include-Statements-Basics.md +++ b/docs/Configuration/Dialplan/Include-Statements/Include-Statements-Basics.md @@ -24,7 +24,6 @@ exten => 6000,1,Answer(500) exten => 6500,1,Answer(500) same => n,VoiceMailMain(@vm-demo) - ``` !!! tip Location of Include Statements** Please note that in the example above, we placed the include statement before extensions **6001** and **6002 @@ -62,5 +61,4 @@ exten => _.,2,NoOp(); exten => _.,3,NoOp(); ; <- Priority 3 ends up being here, which is NOT what you want --- - ``` diff --git a/docs/Configuration/Dialplan/Include-Statements/Using-Include-Statements-to-Create-Classes-of-Service.md b/docs/Configuration/Dialplan/Include-Statements/Using-Include-Statements-to-Create-Classes-of-Service.md index 1dc977d20d..abdf85636c 100644 --- a/docs/Configuration/Dialplan/Include-Statements/Using-Include-Statements-to-Create-Classes-of-Service.md +++ b/docs/Configuration/Dialplan/Include-Statements/Using-Include-Statements-to-Create-Classes-of-Service.md @@ -30,7 +30,6 @@ exten => NXX,1,Dial(SIP/provider/${EXTEN}) ; if you don't find a match in this context, look in [users] include => users - ``` Remember that the variable **${EXTEN}** will get replaced with the dialed extension. For example, if Bob dials **5551212** in the **local** context, Asterisk will execute the Dial application with **SIP/provider/5551212** as the first parameter. (This syntax means "Dial out to the account named provider using the SIP channel driver, and dial the number **5551212**.) @@ -44,7 +43,6 @@ exten => _1NXXNXXXXXX,1,Dial(SIP/provider/${EXTEN}) ; if you don't find a match in this context, look in [local] include => local - ``` Last but not least, let's add an **international** context. In North America, you dial 011 to signify that you're going to dial an international number. @@ -56,7 +54,6 @@ exten => _011.,1,Dial(SIP/provider/${EXTEN}) ; if you don't find a match in this context, look in [longdistance] include => longdistance - ``` And there we have it -- a simple chain of contexts going from most privileged (international calls) down to lease privileged (local calling). diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Advanced-pbx_lua-Topics.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Advanced-pbx_lua-Topics.md index 62da288bd6..db67f4bfd9 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Advanced-pbx_lua-Topics.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Advanced-pbx_lua-Topics.md @@ -29,7 +29,6 @@ for _, e in ipairs(data) do app.dial("SIP/" .. e.sip_peer, e.dial_timeout) end end - ``` The `extensions` Table @@ -47,7 +46,6 @@ extensions = { end; }; } - ``` Where did the priorities go? @@ -57,7 +55,6 @@ There are no priorities. Asterisk uses priorities to define the order in which d ``` extensions.default["1234"]("default", "1234") - ``` Lua Script Lifetime @@ -81,7 +78,6 @@ channel variable: var is the placeholder object var = channel.my_variable var:set("my value") value = var:get("my value") - ``` --- @@ -96,7 +92,6 @@ fax_modems = channel.FAXOPT("module") fax_modems:set("v17") value = fax_modems:get() - ``` --- @@ -109,7 +104,6 @@ dial = app.dial -- the only thing we can do with it is execute it dial("SIP/100") - ``` There is a small cost in creating the placeholder objects so storing frequently used placeholder objects can be used as a micro optimization. This should never be necessary though and only provides benefits if you are running micro benchmarks. diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Dialplan-to-Lua-Reference.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Dialplan-to-Lua-Reference.md index 8e14d8d57a..43f532ef65 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Dialplan-to-Lua-Reference.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Dialplan-to-Lua-Reference.md @@ -21,7 +21,6 @@ extensions.conf exten => _1XX,1,Dial(SIP/${EXTEN}) exten => _2XX,1,Voicemail(${EXTEN:1}) - ``` 50% @@ -41,7 +40,6 @@ end extensions.users["_2XX"] = function(c, e) app.voicemail("1" .. e:sub(2)) end - ``` Context Includes @@ -65,7 +63,6 @@ exten => s,n,Playback(demo-congrats) [default] include => demo include => users - ``` 50% @@ -92,7 +89,6 @@ extensions = { include = {"demo", "users"}; }; } - ``` Loops @@ -110,7 +106,6 @@ exten => 100,n,Set(i=0) exten => 100,n,While($[i < 10]) exten => 100,n,Verbose(i = ${i}) exten => 100,n,EndWhile - ``` 50% @@ -124,7 +119,6 @@ i = 0 while i < 10 do app.verbose("i = " .. i) end - ``` Variables @@ -139,7 +133,6 @@ extensions.conf exten => 100,1,Set(my_variable=my_value) exten => 100,n,Verbose(my_variable = ${my_variable}) - ``` 50% @@ -151,7 +144,6 @@ extensions.lua channel.my_variable = "my_value" app.verbose("my_variable = " .. channel.my_variable:get()) - ``` Applications @@ -165,7 +157,6 @@ extensions.conf ``` exten => 100,1,Dial("SIP/100",,m) - ``` 50% @@ -176,7 +167,6 @@ extensions.lua ``` app.dial("SIP/100", nil, "m") - ``` Macros/GoSub @@ -197,7 +187,6 @@ exten => s,n,Dial(${ARG1}) [default] exten => 100,1,Macro(dial,SIP/100) - ``` 50% @@ -217,7 +206,6 @@ end extensions.default[100] = function() dial("SIP/100") end - ``` Goto @@ -237,7 +225,6 @@ exten => 100,1,Goto(102,1) exten => 102,1,Playback("demo-thanks") exten => 102,n,Hangup - ``` 50% @@ -258,7 +245,6 @@ end extensions.default[100] = function() do_hangup() end - ``` !!! info "" @@ -277,5 +263,4 @@ function extension_function(c, e) end --- - ``` diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Interacting-with-Asterisk-from-Lua-apps-variables-and-functions.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Interacting-with-Asterisk-from-Lua-apps-variables-and-functions.md index 3b81b72c6e..967096400c 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Interacting-with-Asterisk-from-Lua-apps-variables-and-functions.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Interacting-with-Asterisk-from-Lua-apps-variables-and-functions.md @@ -31,7 +31,6 @@ extensions.lua ``` app.playback("please-hold") app.dial("SIP/100", nil, "m") - ``` Any dialplan application can be executed using the `app` table. Application names are case insensitive. Arguments are passed to dialplan applications just as arguments are passed to functions in lua. String arguments must be quoted as they are lua strings. Empty arguments may be passed as `nil` or as empty strings. @@ -42,7 +41,6 @@ Any dialplan application can be executed using the `app` table. Application name ``` channel.my_variable = "my_value" - ``` After this the channel variable `${my_variable`} contains the value "my_value". @@ -51,7 +49,6 @@ After this the channel variable `${my_variable`} contains the value "my_value". ``` value = channel.my_variable:get() - ``` Any channel variable can be read and set using the `channel` table. Local and global lua variables can be used as they normally would and are completely unrelated to channel variables. @@ -71,7 +68,6 @@ value = channel.my_variable -- does not work as expected (value:get() could be u ``` channel["my_variable"] = "my_value" value = channel["my_variable"]:get() - ``` ## Dialplan Functions @@ -80,14 +76,12 @@ value = channel["my_variable"]:get() ``` channel.FAXOPT("modems"):set("v17,v27,v29") - ``` ### Read a Dialplan Function ``` value = channel.FAXOPT("modems"):get() - ``` Note the use of the `:` operator with the `get()` and `set()` methods. @@ -108,7 +102,6 @@ value = channel["FAXOPT(modems)"]:get() ``` channel.FAXOPT("modems") = "v17,v27,v29" -- syntax error value = channel.FAXOPT("modems") -- does not work as expected (value:get() could be used to get the value after this line) - ``` !!! info "" diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Examples.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Examples.md index 207ff4b7e5..4d59965844 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Examples.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Examples.md @@ -42,7 +42,6 @@ e.sales["5000"] = call_sales_queue("sales1") e.sales["6000"] = call_sales_queue("sales2") extensions = e - ``` Less Clutter v2 @@ -107,5 +106,4 @@ register("sales", "6000", call_sales_queue("sales2")) register("sales", "7000", function() app.queue("sales3") end) - ``` diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Hints.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Hints.md index 763c37eba8..a34b25f8f5 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Hints.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Hints.md @@ -25,5 +25,4 @@ hints = { ["201"] = "SIP/201"; }; } - ``` diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Tips-and-Tricks.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Tips-and-Tricks.md index b4d06fad7c..0d3d8cef58 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Tips-and-Tricks.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/Lua-Dialplan-Tips-and-Tricks.md @@ -16,7 +16,6 @@ do_expensive_db_query() autoservice_stop() app.stopmusiconhold() - ``` !!! info "" @@ -45,7 +44,6 @@ end extensions.default[100] = sip_exten(100) extensions.default[101] = sip_exten(101) - ``` Creating Custom Aliases for Built-in Constructs @@ -65,7 +63,6 @@ function my_exten(context, extensions) c.my_variable = "my new channel variable" a.dial("SIP/100") end - ``` Re-purposing The `print` Function @@ -86,7 +83,6 @@ function print(...) app.verbose(msg) end - ``` Splitting Configuration into Multiple Files @@ -110,7 +106,6 @@ Assume you name your extensions.lua file extensions.lua.lua ``` luac -o extensions.lua extensions.lua.lua - ``` The pbx_lua module automatically knows the difference between a lua text file and a lua bytecode file. diff --git a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/index.md b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/index.md index 1ca37cf06c..89743e943c 100644 --- a/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/index.md +++ b/docs/Configuration/Dialplan/Lua-Dialplan-Configuration/index.md @@ -33,14 +33,12 @@ extensions = { app.dial("SIP/101", 60) end; } - ``` The `extensions.lua` file can be reloaded by reloading the pbx_lua module. ``` *CLI> module reload pbx_lua - ``` If there are errors in the file, the errors will be reported and the existing extensions.lua file will remain in use. Channels that existed before the reload command was issued will also continue to use the existing extensions.lua file. diff --git a/docs/Configuration/Dialplan/Pattern-Matching.md b/docs/Configuration/Dialplan/Pattern-Matching.md index 79079daeaa..5a64f27da2 100644 --- a/docs/Configuration/Dialplan/Pattern-Matching.md +++ b/docs/Configuration/Dialplan/Pattern-Matching.md @@ -64,7 +64,6 @@ Now let's look at a sample pattern. If you wanted to match all four-digit number ``` exten => _64XX,1,SayDigits(${EXTEN}) - ``` In this example, each **X** represents a single digit, with any value from zero to nine. @@ -87,7 +86,6 @@ Lets use some Character Sets and Wildcards exten => _64X[4-9],1,SayDigits(${EXTEN}) exten => _[6-4]4[4-9],1,SayDigits(${EXTEN}) exten => _64.,1,SayDigits(${EXTEN}) - ``` The first example: The first must be a six, the second digit must be a four, the third digit can be anything from zero to nine, and the fourth digit must be between four and nine @@ -151,7 +149,6 @@ exten => _6.,1,SayAlpha(D) exten => _64NX,1,SayAlpha(E) exten => _6[45]NX,1,SayAlpha(F) exten => _6[34]NX,1,SayAlpha(G) - ``` Can you tell (without reading ahead) which one would match? @@ -170,7 +167,6 @@ exten => _6[34]NX,1,SayAlpha(G) exten => _6[45]NX,1,SayAlpha(F) exten => _6XX1,1,SayAlpha(A) exten => _6.,1,SayAlpha(D) - ``` When Alice dials **6421**, Asterisk searches through its list of sorted extensions and uses the first matching extension. In this case **_64NX** is found. @@ -185,7 +181,6 @@ exten => _6.,1,SayAlpha(D) exten => _64NX,1,SayAlpha(E) exten => _6[45]NX,1,SayAlpha(F) exten => _6[34]NX,1,SayAlpha(G) - ``` Reload the dialplan, and then type **dialplan show 6421@users** at the Asterisk CLI. Asterisk will show you all extensions that match in the **[users]** context. If you were to dial extension **6421** in the **[users]** context the first found extension will execute. @@ -201,7 +196,6 @@ server*CLI> dialplan show 6421@users '_6.' => 1. SayAlpha(D) [pbx_config] -= 6 extensions (6 priorities) in 1 context. =- - ``` ``` server*CLI> dialplan show users @@ -215,7 +209,6 @@ server*CLI> dialplan show users '_6.' => 1. SayAlpha(D) [pbx_config] -= 7 extensions (7 priorities) in 1 context. =- - ``` You can dial extension **6421** to try it out on your own. @@ -227,7 +220,6 @@ Please be aware that because of the way auto-fallthrough works, if Asterisk can' exten => 6410,1,SayDigits(987) exten => _641X,1,SayDigits(12345) exten => _641X,n,SayDigits(54321) - ``` If you were to dial extension **6410**, you'd hear "nine eight seven five four three two one". @@ -252,7 +244,6 @@ same => n,Hangup() exten => 306/_102,1,NoOp() same => n,Background(beep) same => n,Hangup() - ``` The phone with Caller ID 101, when dialing 306, will hear the prompt "year" and will be hung up. The phone with Caller ID 102, when dialing 306, will hear the "beep" sound and will be hung up. The phone with Caller ID 103, or any other caller, when dialing 306, will hear the "goodbye" prompt and will be hung up. @@ -270,6 +261,5 @@ exten => s/_2XX,1,SayDigits(1) same => 2,SayDigits(2) ; <- This is where the dialplan proceeds instead same => 3,SayDigits(3) same => 4,SayDigits(4) - ``` /// diff --git a/docs/Configuration/Dialplan/Subroutines/Gosub.md b/docs/Configuration/Dialplan/Subroutines/Gosub.md index 86fd9b9f6e..47f4610ac7 100644 --- a/docs/Configuration/Dialplan/Subroutines/Gosub.md +++ b/docs/Configuration/Dialplan/Subroutines/Gosub.md @@ -23,7 +23,6 @@ Here is an example of dialplan we could call with `Gosub` when we don't wish to [my-gosub] exten => s,1,Verbose("Here we are in a subroutine! Let's listen to some weasels") same => n,Playback(tt-weasels) - ``` Here is an example where we do wish to return. @@ -33,7 +32,6 @@ Here is an example where we do wish to return. exten => s,1,Verbose("Here we are in a subroutine! Let's listen to some weasels") same => n,Playback(tt-weasels) same => n,Return() - ``` Calling Gosub @@ -43,7 +41,6 @@ Calling Gosub ``` Gosub([[context,]exten,]priority[(arg1[,...][,argN])]) - ``` Here is an example within Asterisk dialplan. @@ -53,7 +50,6 @@ Here is an example within Asterisk dialplan. exten => 7000,1,Verbose("We are going to run a Gosub before Dialing!") same => n,Gosub(my-gosub,s,1) same => n,Dial(PJSIP/ALICE) - ``` Here we are calling the `my-gosub` context at extension `s` , priority `1`. @@ -70,7 +66,6 @@ Here is how we call `Gosub` with an argument. We are substituting the `EXTEN` ch exten => 7000,1,Verbose("We are going to run a Gosub before Dialing!") same => n,Gosub(my-gosub,s,1(${EXTEN})) same => n,Dial(PJSIP/ALICE) - ``` Below we make use of `ARG1` in the `Verbose` message we print during the subroutine execution. @@ -80,7 +75,6 @@ Below we make use of `ARG1` in the `Verbose` message we print during the subrout exten => s,1,Verbose("Here we are in a subroutine! This subroutine was called from extension ${ARG1}") same => n,Playback(tt-weasels) same => n,Return() - ``` To use multiple arguments, simply separate them via commas when defining them in the `Gosub` call. Then within the `Gosub` reference them as `ARG1`, `ARG2`, `ARG3`, etc. diff --git a/docs/Configuration/Dialplan/Subroutines/Hangup-Handlers.md b/docs/Configuration/Dialplan/Subroutines/Hangup-Handlers.md index 9578f7668c..951e27ba1d 100644 --- a/docs/Configuration/Dialplan/Subroutines/Hangup-Handlers.md +++ b/docs/Configuration/Dialplan/Subroutines/Hangup-Handlers.md @@ -38,7 +38,6 @@ Used to push a hangup handler onto a channel. ``` same => n,Set(CHANNEL(hangup_handler_push)=[[context,]exten,]priority[(arg1[,...][,argN])]); - ``` ### hangup_handler_pop @@ -47,7 +46,6 @@ Used to pop a hangup handler off a channel. Optionally, a replacement hangup han ``` same => n,Set(CHANNEL(hangup_handler_pop)=[[[context,]exten,]priority[(arg1[,...][,argN])]]); - ``` ### hangup_handler_wipe @@ -56,7 +54,6 @@ Remove all hangup handlers on the channel. Optionally, a new hangup handler can ``` same => n,Set(CHANNEL(hangup_handler_wipe)=[[[context,]exten,]priority[(arg1[,...][,argN])]]); - ``` ### Examples @@ -86,7 +83,6 @@ same => n,Return() exten => s,1,Verbose(0, Executed Third) same => n,Return() - ``` ##### Removing and replacing hangup handlers @@ -124,7 +120,6 @@ same => n,Return() exten => s,1,Verbose(0, Executed First) same => n,Return() - ``` CLI Commands @@ -136,7 +131,6 @@ Single channel ``` core show hanguphandlers - ``` --- @@ -148,7 +142,6 @@ Channel Handler - ``` --- @@ -157,7 +150,6 @@ All channels ``` core show hanguphandlers all - ``` --- @@ -172,5 +164,4 @@ Channel Handler - ``` diff --git a/docs/Configuration/Dialplan/Subroutines/Macros.md b/docs/Configuration/Dialplan/Subroutines/Macros.md index 114ec493d3..9bf892811f 100644 --- a/docs/Configuration/Dialplan/Subroutines/Macros.md +++ b/docs/Configuration/Dialplan/Subroutines/Macros.md @@ -32,7 +32,6 @@ Macros look like a typical dialplan context, except for two factors: [macro-announcement] exten = s,1,NoOp() same = n,Playback(tt-weasels) - ``` Calling a Macro @@ -42,7 +41,6 @@ Macro syntax is simple, you only need to specify the priority, and then optional ``` Macro(name,[arg1],[argN]) - ``` Here is an example within Asterisk dialplan. @@ -52,7 +50,6 @@ Here is an example within Asterisk dialplan. exten = 7000,1,Verbose("We are going to run a Macro before Dialing!") same = n,Macro(announcement) same = n,Dial(PJSIP/ALICE) - ``` As you can see we are calling the 'announcement' macro at context 'macro-announcement', extension 's' , priority '1'. @@ -69,7 +66,6 @@ Here is how we call Macro with an argument. We are substituting the EXTEN channe exten = 7000,1,Verbose("We are going to run a Macro before Dialing!") same = n,Macro(announcement,${EXTEN}) same = n,Dial(PJSIP/ALICE) - ``` Below notice that make use of ARG1 in the Verbose message we print during the subroutine execution. @@ -79,7 +75,6 @@ Below notice that make use of ARG1 in the Verbose message we print during the su exten = s,1,Verbose("Here we are in a subroutine! This subroutine was called from extension ${ARG1}") same = s,n,Playback(tt-weasels) same = s,n,Return() - ``` To use multiple arguments, simply separate them via commas when defining them in the Macro call. Then within the Macro reference them as ARG1, ARG2, ARG3, etc. diff --git a/docs/Configuration/Dialplan/Subroutines/Pre-Bridge-Handlers.md b/docs/Configuration/Dialplan/Subroutines/Pre-Bridge-Handlers.md index bdea26617a..10905d8e64 100644 --- a/docs/Configuration/Dialplan/Subroutines/Pre-Bridge-Handlers.md +++ b/docs/Configuration/Dialplan/Subroutines/Pre-Bridge-Handlers.md @@ -23,7 +23,6 @@ The M flag allows a [macro](/Configuration/Dialplan/Subroutines/Macros) and argu ``` M(macro[^arg[^...]]) - ``` The variable MACRO_RESULT can be set with certain options inside the specified macro to determine behavior when the macro finishes. The options are documented in the [Dial application documentation](/Latest_API/API_Documentation/Dialplan_Applications/Dial). @@ -34,7 +33,6 @@ The U flag allows a [gosub](/Configuration/Dialplan/Subroutines/Gosub) and argum ``` U(x[^arg[^...]]) - ``` The variable GOSUB_RESULT can be set within certain options inside the specified gosub to determine behavior when the gosub returns. The options are documented in the [Dial application documentation](/Latest_API/API_Documentation/Dialplan_Applications/Dial). @@ -46,7 +44,6 @@ The Queue application, similar to Dial, has two options for handling pre-bridge ``` Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro[,gosub[,rule[,position]]]]]]]]]) - ``` **macro** and **gosub** can both be populated with the name of a macro or gosub routine to execute on the called party channel as described in the overview. @@ -68,7 +65,6 @@ exten = 6001,1,Dial(PJSIP/ALICE,30,M(announcement)) exten = s,1,NoOp() same = n,Playback(tt-weasels) same = n,Hangup() - ``` CLI output @@ -86,7 +82,6 @@ CLI output -- Channel PJSIP/BOB-00000014 left 'native_rtp' basic-bridge <612c2313-98bf-48ce-89b1-d530b06e44d7> -- Channel PJSIP/ALICE-00000015 left 'native_rtp' basic-bridge <612c2313-98bf-48ce-89b1-d530b06e44d7> == Spawn extension (from-internal, 6001, 1) exited non-zero on 'PJSIP/BOB-00000014' - ``` ### Example 2 - Executing a pre-bridge gosub handler from Dial @@ -103,7 +98,6 @@ exten = 6002,1,Dial(PJSIP/BOB,30,U(sub-announcement)) exten = s,1,NoOp() same = n,Playback(tt-weasels) same = n,Return() - ``` CLI output @@ -125,7 +119,6 @@ CLI output -- Channel PJSIP/BOB-00000017 left 'native_rtp' basic-bridge <16e76a40-4a24-441d-a2b2-5c9ddfb21d7a> -- Channel PJSIP/ALICE-00000016 left 'native_rtp' basic-bridge <16e76a40-4a24-441d-a2b2-5c9ddfb21d7a> == Spawn extension (from-internal, 6002, 1) exited non-zero on 'PJSIP/ALICE-00000016' - ``` ### Example 3 - Executing a pre-bridge gosub handler from Queue @@ -144,7 +137,6 @@ exten = s,1,NoOp() exten => 7002,1,Verbose(2,${CALLERID(all)} entering the sales queue) same => n,Queue(sales,,,,,,,sub-announcement) same => n,Hangup() - ``` CLI output @@ -175,7 +167,6 @@ CLI output -- Channel PJSIP/BOB-0000000a left 'native_rtp' basic-bridge -- Channel PJSIP/ALICE-00000009 left 'native_rtp' basic-bridge == Spawn extension (from-internal, 7002, 2) exited non-zero on 'PJSIP/ALICE-00000009' - ``` ### Example 4 - Executing a pre-bridge macro handler from Queue @@ -193,7 +184,6 @@ exten = s,1,NoOp() exten => 7001,1,Verbose(2,${CALLERID(all)} entering the support queue) same => n,Queue(support,,,,,,announcement) same => n,Hangup() - ``` CLI output @@ -220,5 +210,4 @@ CLI output -- Channel PJSIP/ALICE-00000005 left 'native_rtp' basic-bridge <8283212f-b12d-4571-9653-0c8484e88980> -- Channel PJSIP/BOB-00000004 left 'native_rtp' basic-bridge <8283212f-b12d-4571-9653-0c8484e88980> == Spawn extension (from-internal, 7001, 2) exited non-zero on 'PJSIP/BOB-00000004' - ``` diff --git a/docs/Configuration/Dialplan/Subroutines/Pre-Dial-Handlers.md b/docs/Configuration/Dialplan/Subroutines/Pre-Dial-Handlers.md index 7d898bc0c0..ee087d9dec 100644 --- a/docs/Configuration/Dialplan/Subroutines/Pre-Dial-Handlers.md +++ b/docs/Configuration/Dialplan/Subroutines/Pre-Dial-Handlers.md @@ -33,7 +33,6 @@ For [Dial](/Latest_API/API_Documentation/Dialplan_Applications/Dial) or [FollowM ``` b([[context^]exten^]priority[(arg1[^...][^argN])]) B([[context^]exten^]priority[(arg1[^...][^argN])]) - ``` !!! info "" @@ -63,7 +62,6 @@ same => n,Hangup() exten => caller_handler,1,NoOp() same => n,Verbose(0, In caller pre-dial handler!) same => n,Return() - ``` --- @@ -75,7 +73,6 @@ Example 1 CLI Output Executing default,caller_handler,1 In caller pre-dial handler! calling SIP/bar-124 - ``` #### Example 2 - Executing a pre-dial handler on a callee channel @@ -90,7 +87,6 @@ same => n,Hangup() exten => callee_handler,1,NoOp() same => n,Verbose(0, In callee pre-dial handler!) same => n,Return() - ``` --- @@ -102,7 +98,6 @@ Example 2 CLI Output Executing default,callee_handler,1 In callee pre-dial handler! calling SIP/bar-124 - ``` #### Example 3 - Executing a pre-dial handler on multiple callee channels @@ -117,7 +112,6 @@ same => n,Hangup() exten => callee_handler,1,NoOp() same => n,Verbose(0, In callee pre-dial handler!) same => n,Return() - ``` --- @@ -132,5 +126,4 @@ Example 3 CLI Output In callee pre-dial handler! calling SIP/bar-124 calling SIP/baz-125 - ``` diff --git a/docs/Configuration/Dialplan/Switch-Statements.md b/docs/Configuration/Dialplan/Switch-Statements.md index b28aaf8cf2..3368dbf4b2 100644 --- a/docs/Configuration/Dialplan/Switch-Statements.md +++ b/docs/Configuration/Dialplan/Switch-Statements.md @@ -21,7 +21,6 @@ As an example, with remote IAX switching you get transparent access to the remot ``` [iaxprovider] switch => IAX2/user:password@myserver/mycontext - ``` The lswitch statement @@ -31,7 +30,6 @@ An "lswitch" is like a switch but is literal, in that variable substitution is n ``` lswitch => Loopback/12${EXTEN}@othercontext - ``` The eswitch statement @@ -41,5 +39,4 @@ An "eswitch" is like a switch but the evaluation of variable substitution is per ``` eswitch => IAX2/context@${CURSERVER} - ``` diff --git a/docs/Configuration/Dialplan/Variables/Channel-Variables/Case-Sensitivity.md b/docs/Configuration/Dialplan/Variables/Channel-Variables/Case-Sensitivity.md index 7a0b4ffa4c..e71755c38f 100644 --- a/docs/Configuration/Dialplan/Variables/Channel-Variables/Case-Sensitivity.md +++ b/docs/Configuration/Dialplan/Variables/Channel-Variables/Case-Sensitivity.md @@ -37,7 +37,6 @@ In this example, the user retrieves a value from the AstDB and then uses it as t [default] exten => 1000,1,Set(DEST=${DB(egg/salad)}) same => n,Dial(${DEST},15) - ``` Since the `DEST` variable is set and evaluated in the dialplan, its evaluation is case-insensitive. Thus the following would be equivalent: @@ -46,7 +45,6 @@ Since the `DEST` variable is set and evaluated in the dialplan, its evaluation i exten => 1000,1,Set(DEST=${DB(egg/salad)}) same => n,Dial(${dest},15) - ``` As would this: @@ -55,7 +53,6 @@ As would this: exten => 1000,1,Set(DeSt=${DB(egg/salad)}) same => n,Dial(${dEsT},15) - ``` ### Example 2: Using a built-in variable @@ -65,7 +62,6 @@ In this example, the user wishes to use a built-in variable in order to determin ``` exten => _X.,1,Dial(SIP/${EXTEN}) - ``` Since the variable `EXTEN` is a built-in variable, the following would **not** be equivalent: @@ -73,7 +69,6 @@ Since the variable `EXTEN` is a built-in variable, the following would **not** b ``` exten => _X.,1,Dial(SIP/${exten}) - ``` The lowercase `exten` variable would evaluate to an empty string since no previous value was set for `exten`. @@ -86,7 +81,6 @@ In this example, the user wishes to suggest to the SIP channel driver what codec exten => 1000,Set(SIP_CODEC=g729) same => n,Dial(SIP/1000,15) - ``` `SIP_CODEC` is set in the dialplan, but it gets evaluated inside of Asterisk, so the evaluation is case-sensitive. Thus the following dialplan would not be equivalent: @@ -95,7 +89,6 @@ same => n,Dial(SIP/1000,15) exten => 1000,Set(sip_codec=g729) same => n,Dial(SIP/1000,15) - ``` This can lead to some rather confusing situations. Consider that a user wrote the following dialplan. He intended to set the variable `SIP_CODEC` but instead made a typo: @@ -104,7 +97,6 @@ This can lead to some rather confusing situations. Consider that a user wrote th exten => 1000,Set(SIP_CODEc=g729) same => n,Dial(SIP/1000,15) - ``` As has already been discussed, this is not equivalent to using `SIP_CODEC`. The user looks over his dialplan and does not notice the typo. As a way of debugging, he decides to place a `NoOp` in the dialplan: @@ -114,7 +106,6 @@ As has already been discussed, this is not equivalent to using `SIP_CODEC`. The exten => 1000,Set(SIP_CODEc=g729) same => n,NoOp(${SIP_CODEC}) same => n,Dial(SIP/1000,15) - ``` When the user checks the verbose logs, he sees that the second priority has evaluated `SIP_CODEC` to be "g729". This is because the evaluation in the dialplan was done case-insensitively. diff --git a/docs/Configuration/Dialplan/Variables/Channel-Variables/Setting-and-Substituting-Channel-Variables.md b/docs/Configuration/Dialplan/Variables/Channel-Variables/Setting-and-Substituting-Channel-Variables.md index b686b058c8..c9e12a6ece 100644 --- a/docs/Configuration/Dialplan/Variables/Channel-Variables/Setting-and-Substituting-Channel-Variables.md +++ b/docs/Configuration/Dialplan/Variables/Channel-Variables/Setting-and-Substituting-Channel-Variables.md @@ -9,7 +9,6 @@ To **set** a variable to a particular value, do: ``` exten => 1,2,Set(varname=value) - ``` You can **substitute** the value of a variable everywhere using ${variablename}. @@ -19,7 +18,6 @@ Here is a simple example. ``` exten => 1,1,Set(COUNT=3) exten => 1,n,SayNumber(${COUNT}) - ``` In the second line of this example, Asterisk replaces the ${COUNT} text with the value of the COUNT variable, so that it ends up calling SayNumber(3). @@ -28,7 +26,6 @@ For another example, to stringwise append $varname2 to $varname3 and store resul ``` exten => 1,2,Set(varname1=${varname2}${varname3}) - ``` There are two reference modes - reference by value and reference by name. To refer to a variable with its name (as an argument to a function that requires a variable), just write the name. To refer to the variable's value, enclose it inside ${}. For example, Set takes as the first argument (before the =) a variable name, so: @@ -36,7 +33,6 @@ There are two reference modes - reference by value and reference by name. To ref ``` exten => 1,2,Set(varname1=varname2) exten => 1,3,Set(${varname1}=value) - ``` The above dialplan stores to the variable "varname1" the value "varname2" and to variable "varname2" the value "value". diff --git a/docs/Configuration/Dialplan/Variables/Channel-Variables/Variable-Inheritance.md b/docs/Configuration/Dialplan/Variables/Channel-Variables/Variable-Inheritance.md index 8aac050e74..d4d3c73762 100644 --- a/docs/Configuration/Dialplan/Variables/Channel-Variables/Variable-Inheritance.md +++ b/docs/Configuration/Dialplan/Variables/Channel-Variables/Variable-Inheritance.md @@ -10,7 +10,6 @@ Single Inheritance ``` exten = 1234,1,Set(_FOO=bar) - ``` Multiple Inheritance @@ -22,5 +21,4 @@ In the [Dialplan](/Configuration/Dialplan), all references to these variables re ``` exten = 1234,1,Set(__FOO=bar) - ``` diff --git a/docs/Configuration/Dialplan/Variables/Global-Variables-Basics.md b/docs/Configuration/Dialplan/Variables/Global-Variables-Basics.md index 5e584efc84..ad5658b8c6 100644 --- a/docs/Configuration/Dialplan/Variables/Global-Variables-Basics.md +++ b/docs/Configuration/Dialplan/Variables/Global-Variables-Basics.md @@ -8,14 +8,12 @@ Global variables are variables that don't live on one particular channel — the ```conf title=" " linenums="1" [globals] MYGLOBALVAR=somevalue - ``` You can also set global variables from dialplan logic using the **GLOBAL()** dialplan function along with the **Set()** application. Simply use the syntax: ```conf title=" " linenums="1" exten=>6124,1,Set(GLOBAL(MYGLOBALVAR)=somevalue) - ``` To retrieve the value of a global channel variable, use the same syntax as you would if you were retrieving the value of a channel variable. diff --git a/docs/Configuration/Dialplan/Variables/Using-the-CONTEXT-EXTEN-PRIORITY-UNIQUEID-and-CHANNEL-Variables.md b/docs/Configuration/Dialplan/Variables/Using-the-CONTEXT-EXTEN-PRIORITY-UNIQUEID-and-CHANNEL-Variables.md index 4a4563f26a..603fbf5439 100644 --- a/docs/Configuration/Dialplan/Variables/Using-the-CONTEXT-EXTEN-PRIORITY-UNIQUEID-and-CHANNEL-Variables.md +++ b/docs/Configuration/Dialplan/Variables/Using-the-CONTEXT-EXTEN-PRIORITY-UNIQUEID-and-CHANNEL-Variables.md @@ -9,7 +9,6 @@ Asterisk creates channel variables named **CONTEXT**, **EXTEN**, and **PRIORITY* ``` exten=>6123,1,SayNumber(${EXTEN}) - ``` If you were to add this extension to the **[users]** context of your dialplan and reload the dialplan, you could call extension **6123** and hear Asterisk read back the extension number to you. diff --git a/docs/Configuration/Features/Built-in-Dynamic-Features.md b/docs/Configuration/Features/Built-in-Dynamic-Features.md index 070dd23bd7..2961ecb05d 100644 --- a/docs/Configuration/Features/Built-in-Dynamic-Features.md +++ b/docs/Configuration/Features/Built-in-Dynamic-Features.md @@ -18,7 +18,6 @@ Set the parking time of this channel to be 100 seconds if it is parked. exten => s,1,Set(FEATURE(parkingtime)=100) same => n,Dial(SIP/100) same => n,Hangup() - ``` --- @@ -29,5 +28,4 @@ Set the DTMF sequence for attended transfer on this channel to \*9. exten => s,1,Set(FEATUREMAP(atxfer)=*9) same => n,Dial(SIP/100,,T) same => n,Hangup() - ``` diff --git a/docs/Configuration/Features/Call-Parking.md b/docs/Configuration/Features/Call-Parking.md index b40ec548c2..aa5b86d74c 100644 --- a/docs/Configuration/Features/Call-Parking.md +++ b/docs/Configuration/Features/Call-Parking.md @@ -68,7 +68,6 @@ parkingtime => 300 ; Specifies the number of seconds a call will wait in the par findslot => next ; Configures the parking slot selection behavior. For this example, ; the next free slot will be selected when a call is parked. - ``` --- @@ -84,7 +83,6 @@ parkcall => #72 ; Parks the call (one-step parking). For this example, a call wi ; values of this option are defined below: ; K - Allow the calling party to enable parking of the call. ; k - Allow the called party to enable parking of the call. - ``` --- extensions.conf @@ -118,7 +116,6 @@ exten => 5555001,1,NoOp(Route to a local extension.) ; to park it. Assuming the value of LocalExtension is 5001, the Dial() command will look like: Dial(alice,,k) same => n,Dial(PJSIP/alice) same => n,Hangup() - ``` ### Basic Handling for Call Parking Timeouts @@ -188,7 +185,6 @@ comebacktoorigin=yes ; Determines what should be done with a parked call if it i ; originally parked the call, or the PARKER channel variable, using ; an extension it will automatically create in the 'park-dial' ; context. - ``` --- @@ -204,7 +200,6 @@ parkcall => #72 ; Parks the call (one-step parking). For this example, a call wi ; values of this option are defined below: ; K - Allow the calling party to enable parking of the call. ; k - Allow the called party to enable parking of the call. - ``` --- @@ -246,7 +241,6 @@ exten => 5555001,1,NoOp(Route to a local extension.) exten => t,1,NoOp(End of the line for a timed-out parked call.) same => n,Playback(vm-goodbye) same => n,Hangup() - ``` ### Custom Handling for Call Parking Timeouts @@ -313,7 +307,6 @@ comebackcontext=parkedcallstimeout ; The context that a parked call will be rout ; 'comebacktoorigin=no' in your configuration but do not define this ; value, Asterisk will route the call to the 's' extension in the ; default context. - ``` --- @@ -329,7 +322,6 @@ parkcall => #72 ; Parks the call (one-step parking). For this example, a call wi ; values of this option are defined below: ; K - Allow the calling party to enable parking of the call. ; k - Allow the called party to enable parking of the call. - ``` --- @@ -369,5 +361,4 @@ exten => 5555001,1,NoOp(Route to a local extension.) exten => s,1,NoOp(This is all that happens to parked calls if they time out.) same => n,Playback(vm-goodbye) same => n,Hangup() - ``` diff --git a/docs/Configuration/Features/Call-Pickup.md b/docs/Configuration/Features/Call-Pickup.md index cd81208f05..8e385825a5 100644 --- a/docs/Configuration/Features/Call-Pickup.md +++ b/docs/Configuration/Features/Call-Pickup.md @@ -44,14 +44,12 @@ The CHANNEL(callgroup) option specifies which numeric pickup groups that this ch ``` same => n,Set(CHANNEL(callgroup)=1,5-7) - ``` The CHANNEL(namedcallgroup) option specifies which named pickup groups that this channel is a member. ``` same => n,Set(CHANNEL(namedcallgroup)=engineering,sales) - ``` !!! note @@ -68,14 +66,12 @@ The CHANNEL(pickupgroup) option specifies which numeric pickup groups this chann ``` same => n,Set(CHANNEL(pickupgroup)=1,6-8) - ``` The CHANNEL(namedpickupgroup) option specifies which named pickup groups this channel can pickup. ``` same => n,Set(CHANNEL(namedpickupgroup)=engineering,sales) - ``` !!! note @@ -105,7 +101,6 @@ features.conf 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) - ``` ### Numeric call pickup groups @@ -119,7 +114,6 @@ SYNTAX ``` callgroup=[number[-number][,number[-number][,...]]] pickupgroup=[number[-number][,number[-number][,...]]] - ``` * callgroup - specifies which numeric pickup groups that this channel is a member. @@ -132,7 +126,6 @@ Configuration example ``` callgroup=1,5-7 pickupgroup=1 - ``` Configuration should be supported in several channel drivers, including: @@ -153,7 +146,6 @@ Configuration in pjsip.conf ``` call_group=1,5-7 pickup_group=1 - ``` ### Named call pickup groups @@ -167,7 +159,6 @@ SYNTAX ``` namedcallgroup=[name[,name[,...]]] namedpickupgroup=[name[,name[,...]]] - ``` * namedcallgroup - specifies which named pickup groups that this channel is a member. @@ -180,7 +171,6 @@ Configuration Example ``` namedcallgroup=engineering,sales,netgroup,protgroup namedpickupgroup=sales - ``` Configuration should be supported in several channel drivers, including: @@ -195,7 +185,6 @@ pjsip.conf uses snake case: ``` named_call_group=engineering,sales,netgroup,protgroup named_pickup_group=sales - ``` !!! note diff --git a/docs/Configuration/Features/Custom-Dynamic-Features.md b/docs/Configuration/Features/Custom-Dynamic-Features.md index 6632058a4d..af646b08c2 100644 --- a/docs/Configuration/Features/Custom-Dynamic-Features.md +++ b/docs/Configuration/Features/Custom-Dynamic-Features.md @@ -20,7 +20,6 @@ Syntax: = ,[/],[,[,MOH_Class]] = ,[/],[,""[,MOH_Class]] = ,[/],([])[,MOH_Class] - ``` Syntax Fields: @@ -57,7 +56,6 @@ playmonkeys => #9,peer,Playback,tt-monkeys retrieveinfo => #8,peer,Set(ARRAY(CDR(mark),CDR(name))=${ODBC_FOO(${CALLERID(num)})}) pauseMonitor => #1,self/callee,Pausemonitor unpauseMonitor => #3,self/callee,UnPauseMonitor - ``` Example feature descriptions: @@ -82,7 +80,6 @@ extensions.conf ``` Set(__DYNAMIC_FEATURES=playmonkeys#pauseMonitor#unpauseMonitor) - ``` !!! tip Tip: Variable Inheritance diff --git a/docs/Configuration/Features/Feature-Code-Call-Transfers.md b/docs/Configuration/Features/Feature-Code-Call-Transfers.md index 606a1f3c1e..1cf9ddaba7 100644 --- a/docs/Configuration/Features/Feature-Code-Call-Transfers.md +++ b/docs/Configuration/Features/Feature-Code-Call-Transfers.md @@ -48,7 +48,6 @@ In features.conf you must configure the blindxfer or atxfer options in the featu [featuremap] blindxfer = #1 atxfer = *2 - ``` Now that you have the feature enabled you need to configure the dialplan such that a particular channel will be allowed to use the feature. @@ -62,7 +61,6 @@ Setting these options for Dial in extensions.conf would look similar to the foll ``` exten = 102,1,Dial(PJSIP/BOB,30,T) - ``` Asterisk should be restarted or relevant modules should be reloaded for changes to take effect. @@ -101,7 +99,6 @@ atxferabort = *3 atxfercomplete = *4 atxferthreeway = *5 atxferswap = *6 - ``` Configuring attended transfer callbacks @@ -133,7 +130,6 @@ atxfernoanswertimeout = 15 atxferdropcall = no atxferloopdelay = 10 atxfercallbackretries = 2 - ``` Behavior Options @@ -146,7 +142,6 @@ These options are configured in the "[general]" section of features.conf ``` ;transferdigittimeout = 3 ; Number of seconds to wait between digits when transferring a call ; (default is 3 seconds) - ``` ### Attended transfer options @@ -158,7 +153,6 @@ These options are configured in the "[general]" section of features.conf ; 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. - ``` Basic Transfer Examples diff --git a/docs/Configuration/Features/One-Touch-Features.md b/docs/Configuration/Features/One-Touch-Features.md index 7cc35de288..183d93619a 100644 --- a/docs/Configuration/Features/One-Touch-Features.md +++ b/docs/Configuration/Features/One-Touch-Features.md @@ -37,7 +37,6 @@ automon = *1 automixmon = *3 disconnect = *0 parkcall = #72 - ``` Assign each option the DTMF character string that you want users to enter for invoking the feature. @@ -82,7 +81,6 @@ extensions.conf ``` exten = 101,1,Dial(PJSIP/ALICE,30,X) - ``` This would allow the calling party, the party dialing PJSIP/ALICE, to invoke recording on the channel. diff --git a/docs/Configuration/Functions/Asterisk-Dialplan-Function-Examples.md b/docs/Configuration/Functions/Asterisk-Dialplan-Function-Examples.md index cd19e0d191..ecd3c72093 100644 --- a/docs/Configuration/Functions/Asterisk-Dialplan-Function-Examples.md +++ b/docs/Configuration/Functions/Asterisk-Dialplan-Function-Examples.md @@ -26,21 +26,18 @@ Push a [hangup handler](/Configuration/Dialplan/Subroutines/Hangup-Handlers) sub ``` same = n,Set(CHANNEL(hangup_handler_push)=default,s,1) - ``` Using the CHANNEL function along with the Log application, we can log the current state of the channel. ``` same = n,Log(NOTICE, This channel is: ${CHANNEL(state)}) - ``` Set the channel variable myvar to a space-delimited list of all channels. ``` same = n,Set(myvar=${CHANNELS}) - ``` DB and other DB functions @@ -56,26 +53,22 @@ Set the key "testkey" in family "testfamily" to the value "Alice". ``` same = n,Set(DB(testfamily/testkey)=Alice) - ``` Dialing a PJSIP endpoint using the value of the previously set key as the endpoint name. ``` same = n,Dial(PJSIP/${DB(testfamily/testkey)}) - ``` Go to a specific dialplan location (via [label](/Configuration/Dialplan/Contexts-Extensions-and-Priorities)) depending on if the key exists or does not. ``` same = n,Gotoif($[${DB_EXISTS(testfamily/testkey)}]?keyexists:keydoesnotexist) - ``` Delete the entry while logging the value of the key! ``` same = n,Log(NOTICE, Deleting the key testfamily/testkey which had the value: ${DB_DELETE(testfamily/testkey)}) - ``` diff --git a/docs/Configuration/Functions/Manipulating-Party-ID-Information.md b/docs/Configuration/Functions/Manipulating-Party-ID-Information.md index a31636c524..3ad2fb86a1 100644 --- a/docs/Configuration/Functions/Manipulating-Party-ID-Information.md +++ b/docs/Configuration/Functions/Manipulating-Party-ID-Information.md @@ -92,7 +92,6 @@ exten => 1000,n,Set(CONNECTEDLINE(num-pres)=allowed) exten => 1000,n,Answer exten => 1000,n,Playback(tt-weasels) exten => 1000,n,Hangup - ``` ### Straightforward dial through @@ -108,7 +107,6 @@ exten => 1000,n,Set(CONNECTEDLINE(num-pres)=allowed) ; set above when the call is answered. exten => 1000,n,Dial(SIP/1000,20,I) exten => 1000,n,Hangup - ``` ### Use of interception macro @@ -129,7 +127,6 @@ exten => 1000,n,Set(__CONNECTED_LINE_CALLER_SEND_MACRO=add_pfx) exten => 1000,n,Set(__CONNECTED_LINE_CALLER_SEND_MACRO_ARGS=45,4) exten => 1000,n,Dial(SIP/1000,20) exten => 1000,n,Hangup - ``` ### Simple redirection @@ -156,7 +153,6 @@ exten => 1000,n,Set(REDIRECTING(reason,i)=cfu) ; becomes available with a redirecting update. exten => 1000,n,Dial(DAHDI/g1/2000,20) exten => 1000,n,Hangup - ``` Party ID propagation @@ -169,7 +165,6 @@ For normal operations where Party A calls Party B this is what the relationship Incoming channel --- bridge --- Outgoing channel Party A ___ CALLERID() -------------------> CONNECTEDLINE() ___ Party B CONNECTEDLINE() <-------------- CALLERID() - ``` The CALLERID() information is the party identification of the remote party. For Channel A that is Party A. For Channel B that is Party B. @@ -183,7 +178,6 @@ Local;1 Local;2 Outgoing channel --- Incoming channel CONNECTEDLINE() ---> CALLERID() CALLERID() <-------- CONNECTEDLINE() - ``` A normal call where Party A calls Party B with a local channel in the chain. @@ -193,7 +187,6 @@ A normal call where Party A calls Party B with a local channel in the chain. Incoming channel --- bridge --- Outgoing channel --- Incoming channel --- bridge --- Outgoing channel Party A ___ CALLERID() -------------------> CONNECTEDLINE() ---> CALLERID() -------------------> CONNECTEDLINE() ___ Party B CONNECTEDLINE() <-------------- CALLERID() <-------- CONNECTEDLINE() <-------------- CALLERID() - ``` Originated calls make the incoming and outgoing labels a bit confusing because both channels start off as outgoing. Once the originated channel answers it becomes an "incoming" channel to run dialplan. A better way is to just distinguish which channel is running dialplan. For consistency, I'll continue using the incoming and outgoing labels. @@ -205,7 +198,6 @@ An example of originating a normal channel (Channel A) to a dialplan exten. Incoming channel --- bridge --- Outgoing channel Party A ___ CALLERID() -------------------> CONNECTEDLINE() ___ Party B CONNECTEDLINE() <-------------- CALLERID() - ``` An example of originating a local channel (which will always be a Local;1) to a dialplan exten. @@ -215,7 +207,6 @@ An example of originating a local channel (which will always be a Local;1) to a Outgoing channel --- bridge --- Incoming channel --- Incoming channel --- bridge --- Outgoing channel Party A ___ CALLERID() -------------------> CONNECTEDLINE() ---> CALLERID() -------------------> CONNECTEDLINE() ___ Party B CONNECTEDLINE() <-------------- CALLERID() <-------- CONNECTEDLINE() <-------------- CALLERID() - ``` Ideas for usage diff --git a/docs/Configuration/Functions/index.md b/docs/Configuration/Functions/index.md index 5d8d82cad0..dfcbaaa07e 100644 --- a/docs/Configuration/Functions/index.md +++ b/docs/Configuration/Functions/index.md @@ -43,28 +43,24 @@ The general syntax for calling a function follows: ``` FUNCTION(argument1,argument2, ...) - ``` A function's value can be set using the Set application. The example below will show how to set the CHANNEL function argument "tonezone" to the value "de" (for Germany). ``` same => n,Set(CHANNEL(tonezone)=de) - ``` A function's value can be referenced almost anywhere in dialplan where you can use an expression or reference a variable. The value can be referenced by encapsulating the call with curly braces and a leading dollar sign. ```bash title=" " linenums="1" ${FUNCTION(argument)} - ``` For example, if we wanted to log the destination address for the audio stream of the channel: ``` same => n,Log(NOTICE, The destination for the audio stream is: ${CHANNEL(rtp,dest)}) - ``` Help for specific functions diff --git a/docs/Configuration/Interfaces/Asterisk-Calendaring/Configuring-Asterisk-Calendaring.md b/docs/Configuration/Interfaces/Asterisk-Calendaring/Configuring-Asterisk-Calendaring.md index 790cd8bb71..a8297b720c 100644 --- a/docs/Configuration/Interfaces/Asterisk-Calendaring/Configuring-Asterisk-Calendaring.md +++ b/docs/Configuration/Interfaces/Asterisk-Calendaring/Configuring-Asterisk-Calendaring.md @@ -23,7 +23,6 @@ channel = SIP/joe context = calendar_event_notify extension = s waittime = 30 - ``` Module-independent settings @@ -91,7 +90,6 @@ user = example@gmail.com secret = a_very_secure_password refresh = 15 timeframe = 60 - ``` Once you have a configuration you can startup Asterisk or else reload the modules. After this you can check to see if the calendar is being read. Use the commands **"calendar show calendars"** and **"calendar show calendar "** @@ -101,7 +99,6 @@ CentOSLab*CLI> calendar show calendars Calendar Type Status -------- ---- ------ gcal1 ical busy - ``` ``` CentOSLab*CLI> calendar show calendar gcal1 @@ -126,7 +123,6 @@ UID : 6b6ikcvq165i470lq5sdm7r1v4@google.com Start : 2015-11-25 05:40:00 PM -0600 End : 2015-11-25 06:10:00 PM -0600 Alarm : - ``` The output should reflect your calendar settings and if it is reading from the calendar server you should see events that are present (on your calendar) within the configured Timeframe. If you don't see any events then go to your Google calendar and create an event within the timeframe. Save that event, then wait at least the Refresh time before checking the commands again to see if the event shows up. diff --git a/docs/Configuration/Interfaces/Asterisk-Calendaring/index.md b/docs/Configuration/Interfaces/Asterisk-Calendaring/index.md index 41fdc98eaa..fa3e1ace33 100644 --- a/docs/Configuration/Interfaces/Asterisk-Calendaring/index.md +++ b/docs/Configuration/Interfaces/Asterisk-Calendaring/index.md @@ -25,5 +25,4 @@ caldav CalDAV calendars exchange MS Exchange calendars ews MS Exchange Web Service calend ical iCalendar .ics calendars - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-External-Application-Protocol-AEAP.md b/docs/Configuration/Interfaces/Asterisk-External-Application-Protocol-AEAP.md index eb51ccf86c..0ca327e4d2 100644 --- a/docs/Configuration/Interfaces/Asterisk-External-Application-Protocol-AEAP.md +++ b/docs/Configuration/Interfaces/Asterisk-External-Application-Protocol-AEAP.md @@ -43,7 +43,6 @@ offer request ..., }, } - ``` "request", "id", and "version" are all required fields and must be included. The version is a value that represents the current AEAP message version. As well, at least one or more "codecs" must be specified. While the codec "name" is mandatory, codec attributes are optional. However, if a codec attribute is given then both the attribute "name" and "value" must be provided. "params" is optional, but when given each parameter must be specified as a "name"/"value" pair. @@ -59,7 +58,6 @@ Example 1 offer request "version": "0.1.0", "codecs": [ { "name": "ulaw" } ], } - ``` --- @@ -73,7 +71,6 @@ Example 2 offer request "version": "0.1.0", "codecs": [ { "name": "ulaw" }, { "name": "opus", "attributes": { "maxplaybackrate": 8000 } } ], } - ``` --- @@ -88,7 +85,6 @@ Example 3 offer request "codecs": [ { "name": "ulaw" } ], "params": { "language": "en", "gender": "male" }, } - ``` A "setup" response must only be sent in response to a "setup" request, and must be formatted as follows: @@ -109,7 +105,6 @@ offer response okay }], } } - ``` Much like the initial request, "response", "id", and "codecs" are required fields. The codec "name" is also required, and must match one of the names given in the request's codec list. "attributes" are again optional. @@ -124,7 +119,6 @@ Example 1 offer response okay "id": "7180e464-c022-40e6-a49c-9d2007f008a7", "codecs": [{ "name": "ulaw" }], } - ``` Get @@ -142,7 +136,6 @@ get request "id": , "params": [, ...], } - ``` All fields are required, and at least one parameter name to retrieve must be specified. Parameter names should be the name of the attribute, setting, etc... to be retrieved. @@ -157,7 +150,6 @@ Example 1 get request "id": "f066e049-d4ef-4093-a05b-0effef1bc077", "params": ["language"], } - ``` A "get" response is similar, but retrieved "params" are made available in name/value pairs: @@ -172,7 +164,6 @@ get response okay "id": , "params": { : , ... }, } - ``` Be aware that the returned value's type is named parameter dependent. For instance, depending on the given "param" the returned "value" could be a string, an integer, or even an array of values. @@ -187,7 +178,6 @@ Example 1 get response okay "id": "f066e049-d4ef-4093-a05b-0effef1bc077", "params": { "language" : "en" }, } - ``` Set @@ -205,7 +195,6 @@ set request "id": , "params": { : . ... }, } - ``` All fields are required. Similar to "get", a named parameter's value type varies based on the parameters themselves. @@ -220,7 +209,6 @@ Example 1 set request "id": "9f424395-736b-412c-b8f4-a67a3497415b", "params": { "language" : "en" }, } - ``` A "set" response to a successful request is just a basic acknowledgment that only contains response name and id: @@ -234,7 +222,6 @@ set response "response": "set", "id": , } - ``` --- @@ -246,7 +233,6 @@ Example 1 set response okay "response": "set", "id": "9f424395-736b-412c-b8f4-a67a3497415b", } - ``` Errors @@ -264,7 +250,6 @@ error response "id": , "error_msg": } - ``` --- @@ -277,7 +262,6 @@ Example 1 setup error "id": "b3eda99f-464f-477e-b8a3-4ebafda0b482", "error_msg": "No supported codec(s)" } - ``` --- @@ -290,7 +274,6 @@ Example 2 get error "id": "f066e049-d4ef-4093-a05b-0effef1bc077", "error_msg": "No language parameter available" } - ``` --- @@ -303,5 +286,4 @@ Example 3 set error "id": "9f424395-736b-412c-b8f4-a67a3497415b", "error_msg": "Unable to set language to 'en-US'" } - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Asterisk-Configuration-for-ARI.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Asterisk-Configuration-for-ARI.md index edfb6d41c5..a7c49a706a 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Asterisk-Configuration-for-ARI.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Asterisk-Configuration-for-ARI.md @@ -46,7 +46,6 @@ http.conf enabled = yes bindaddr = 0.0.0.0 bindport = 8088 - ``` !!! note Use TLS!** It is **highly @@ -97,7 +96,6 @@ type = user read_only = no password = $6$nqvAB8Bvs1dJ4V$8zCUygFXuXXp8EU3t2M8i.N8iCsY4WRchxe2AYgGOzHAQrmjIPif3DYrvdj5U2CilLLMChtmFyvFa3XHSxBlB/ password_format = crypt - ``` Configuring the Dialplan for ARI @@ -128,7 +126,6 @@ exten => ivr,1,NoOp() exten => conference,1,NoOp() same => n,Stasis(Super-Conference,100) same => n,Hangup() - ``` When a channel enters into a Stasis application, Asterisk will check to see if a WebSocket connection has been established for that application. If so, the channel is handed over to ARI for control, a subscription for the channel is made for the WebSocket, and a [StasisStart](/Latest_API/API_Documentation/Asterisk_REST_Interface/Asterisk_REST_Data_Models/#stasisstart) event is sent to the WebSocket notifying it that a channel has entered into its application. diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/Using-Swagger-to-Drive-ARI.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/Using-Swagger-to-Drive-ARI.md index 888ca09b1c..749ff465ca 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/Using-Swagger-to-Drive-ARI.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/Using-Swagger-to-Drive-ARI.md @@ -32,7 +32,6 @@ allowed_origins=http://ari.asterisk.org type=user password=peekaboo ;read_only=no ; Set to yes for read-only applications - ``` ![Getting Started with ARI](swagger-ui-screenshot.png) diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/index.md index 864c7e5fa0..5f70dead2b 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/index.md @@ -36,13 +36,11 @@ ARI needs a WebSocket connection to receive events. For the sake of this example ```bash title=" " linenums="1" $ apt-get install npm - ``` 2. **Install** the `ws` node package: ```bash title=" " linenums="1" $ npm install -g wscat - ``` /// tip @@ -60,7 +58,6 @@ In order to control a channel in the Stasis dialplan application through ARI, we ```bash title=" " linenums="1" $ apt-get install curl - ``` ### Configuring Asterisk diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-Transfer-Handling/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-Transfer-Handling/index.md index bdf04a46ad..1a2523d23d 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-Transfer-Handling/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-Transfer-Handling/index.md @@ -140,7 +140,6 @@ telePhone A --- Kamailio --- Asterisk 1 --- Kamailio - >--- telePhone B / telePhone C --- Kamailio --- Asterisk 2 --- Kamailio - - ``` Each Asterisk (1 and 2) is involved but cannot know the other Call ID or Channel. The ARI application must be the central point in this case. @@ -150,7 +149,6 @@ telePhone A --- Kamailio --- Asterisk 1 --- Kamailio ---- >-- ARI application >--- telePhone B / / telePhone C --- Kamailio --- Asterisk 2 --- Kamailio ----- - ``` Both channels to telephone B are placed by the same ARI application (or they share the same knowledge about ongoing calls). @@ -162,5 +160,4 @@ telePhone A --- Kamailio --- Asterisk 1 -------------- >-- ARI Application | SIP Channel / / telePhone C --- Kamailio --- Asterisk 2 -------------- - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Basic-Mixing-Bridges.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Basic-Mixing-Bridges.md index d751985423..acb02ecddc 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Basic-Mixing-Bridges.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Basic-Mixing-Bridges.md @@ -238,7 +238,6 @@ PJSIP/Alice-00000001 entered our application Dialing PJSIP/Bob PJSIP/Bob-00000002 answered; bridging with PJSIP/Alice-00000001 Hung up PJSIP/Bob-00000002 - ``` ### JavaScript (Node.js) @@ -270,7 +269,6 @@ function stasisStart(event, channel) { }); } } - ``` We then prepare an object with a locally generate Id for the dialed channel and register event callbacks either channels hanging up and the dialed channel entering into the Stasis application. We then originate a call to the endpoint specified by the first command line argument to the script passing in a Stasis application argument of dialed so we can skip the dialed channel when the original StasisStart event callback fires for it: @@ -298,7 +296,6 @@ function originate(channel) { } }); } - ``` We then handle either channel hanging up by hanging up the other channel. Note that we skip any errors that occur on hangup since it is possible that the channel we are attempting to hang up is the one that has already left and would result in an HTTP error as it is no longer a Statis channel: @@ -541,7 +538,6 @@ function clientLoaded (err, client) { client.start('bridge-dial'); } - ``` #### bridge-dial.js in action @@ -555,5 +551,4 @@ Adding channel PJSIP/alice-00000001 and dialed channel PJSIP/bob-00000002 to bri Dialed channel PJSIP/bob-00000002 has left our application, destroying bridge 30430e82-83ed-4242-9f37-1bc040f70724 Dialed channel PJSIP/bob-00000002 has been hung up, hanging up channel PJSIP/alice-00000001 Channel PJSIP/alice-00000001 left our application, hanging up dialed channel undefined - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Bridge-Operations.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Bridge-Operations.md index 45e6d55dd4..5dec0eb46c 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Bridge-Operations.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Bridge-Operations.md @@ -32,7 +32,6 @@ extensions.conf exten => 1000,1,NoOp() same => n,Stasis(bridge-move,inbound,PJSIP/bob) same => n,Hangup() - ``` Python @@ -67,7 +66,6 @@ def find_or_create_holding_bridge(): holding_bridge = bridge return holding_bridge - ``` When the inbound channel enters the application, we'll place it into our waiting bridge: @@ -75,7 +73,6 @@ When the inbound channel enters the application, we'll place it into our waiting ```python wait_bridge = find_or_create_holding_bridge() wait_bridge.addChannel(channel=channel.id) - ``` When the dialed channel answers, we can remove the inbound channel from the waiting bridge - since there is only one waiting bridge being used, we can use `find_or_create_holding_bridge` to obtain it. We then place it into a newly created mixing bridge along with the dialed channel, in the same fashion as the `bridge-dial.py` example. @@ -89,7 +86,6 @@ print "{} answered; bridging with {}".format(outgoing.json.get('name'), bridge = client.bridges.create(type='mixing') bridge.addChannel(channel=[channel.id, outgoing.id]) - ``` ### bridge-move.py @@ -209,7 +205,6 @@ def stasis_start_cb(channel_obj, ev): client.on_channel_event('StasisStart', stasis_start_cb) client.run(apps='bridge-move') - ``` ### bridge-move.py in action @@ -221,7 +216,6 @@ PJSIP/Alice-00000001 entered our application Dialing PJSIP/Bob PJSIP/Bob-00000002 answered; bridging with PJSIP/Alice-00000001 Hung up PJSIP/Bob-00000002 - ``` JavaScript (Node.js) @@ -253,7 +247,6 @@ function findOrCreateHoldingBridge(channel) { } }); } - ``` We then add the channel to the holding bridge and start music on hold before continuing with dialing we we did in the bridge-dial.js example: @@ -267,7 +260,6 @@ holdingBridge.addChannel({channel: channel.id}, function(err) { // ignore error }); }); - ``` Once the endpoint has answered and a mixing bridge has been created, we proceed by first removing the original channel from the holding bridge and then adding both channels to the mixing bridge as before: @@ -290,7 +282,6 @@ function moveToMixingBridge(channel, dialed, mixingBridge, holdingBridge) { }); }); } - ``` Note that we need to keep track of one more variable as we go down the application flow to ensure we have a reference to both the holding and mixing bridge. Again we use anonymous functions to pass extra arguments to callback handlers to keep the nested callbacks to a minimum. @@ -466,7 +457,6 @@ function clientLoaded (err, client) { client.start('bridge-move'); } - ``` ### bridge-move.js in action @@ -481,5 +471,4 @@ Adding channel PJSIP/alice-00000001 and dialed channel PJSIP/bob-00000002 to bri Dialed channel PJSIP/bob-00000002 has left our application, destroying mixing bridge 5ae49fee-e353-4ad9-bfa7-f8306d9dfd1e Hanging up channel PJSIP/alice-00000001 Hanging up channel undefined - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Holding-Bridges.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Holding-Bridges.md index 7a585faa82..2750e61de8 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Holding-Bridges.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/ARI-and-Bridges-Holding-Bridges.md @@ -19,7 +19,6 @@ To add a channel as a participant to a holding bridge, you can either not specif ``` POST /bridges/{bridge_id}/addChannel?channel=12345 POST /bridges/{bridge_id}/addChannel?channel=12345&role=participant - ``` On This PageAdding a channel as an announcer @@ -29,7 +28,6 @@ To add a channel as an announcer to a holding bridge, you must specify a role of ``` POST /bridges/{bridge_id}/addChannel?channel=56789&role=announcer - ``` !!! tip When is an Announcer channel useful? @@ -75,7 +73,6 @@ extensions.conf exten => 1000,1,NoOp() same => n,Stasis(bridge-infinite-wait) same => n,Hangup() - ``` Python @@ -138,7 +135,6 @@ def find_or_create_bridge(): announcer_timer = threading.Timer(30, play_announcement, [holding_bridge]) announcer_timer.start() return bridge - ``` The function that does this work, `find_or_create_bridge`, is called from our `StasisStart` event handler. The bridge that it returns will have the new channel added to it. @@ -155,7 +151,6 @@ def stasis_start_cb(channel_obj, ev): channel.answer() bridge.addChannel(channel=channel.id) - ``` In the `find_or_create_bridge` function, we also subscribed for the `ChannelLeftBridge` event. We'll add a callback handler for this in that function as well. When the channel leaves the bridge, we'll check to see if there are no more channels in the bridge and - if so - destroy the bridge. @@ -178,7 +173,6 @@ def on_channel_left_bridge(bridge, ev): print "Destroying bridge %s" % bridge.id holding_bridge.destroy() holding_bridge = None - ``` ### bridge-infinite-wait.py @@ -296,7 +290,6 @@ client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='bridge-infinite-wait') - ``` ### bridge-infinite-wait.py in action @@ -308,7 +301,6 @@ Letting the everyone know we care... Channel PJSIP/alice-00000000 left bridge 950c4805-c33c-4895-ad9a-2798055e4939 Destroying bridge 950c4805-c33c-4895-ad9a-2798055e4939 Channel PJSIP/alice-00000000 just left our application - ``` JavaScript (Node.js) @@ -376,7 +368,6 @@ console.log('Channel %s just entered our application', channel.name); } }); } - ``` The joinBridge function involves registered a callback for the ChannelLeftBridge event and adds the channel to the bridge. @@ -398,7 +389,6 @@ function joinBridge(bridge) { } }); } - ``` Notice that we use an anonymous function to pass the bridge as an extra parameter to the ChannelLeftBridge callback so we can keep the handler at the same level as joinBridge and avoid another indentation level of callbacks. Finally, we can handle destroying the bridge when the last channel contained in it has left: @@ -425,7 +415,6 @@ Notice that we use an anonymous function to pass the bridge as an extra paramete }); } } - ``` ### bridge-infinite-wait.js @@ -560,7 +549,6 @@ function clientLoaded (err, client) { console.log('starting'); client.start('bridge-infinite-wait'); } - ``` ### bridge-infinite-wait.js in action @@ -573,5 +561,4 @@ Created bridge 31a4a193-36a7-412b-854b-cf2cf5f90bbd Letting everyone know we care... Channel PJSIP/alice-00000001 left bridge 31a4a193-36a7-412b-854b-cf2cf5f90bbd Channel PJSIP/alice-00000001 just left our application - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/index.md index ce168b5478..b240707ee4 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Bridges/index.md @@ -57,7 +57,6 @@ exten => 1000,1,NoOp() same => n,Answer() same => n,Stasis(bridge-hold) same => n,Hangup() - ``` Python @@ -85,7 +84,6 @@ import logging logging.basicConfig(level=logging.ERROR) client = ari.connect('http://localhost:8088', 'asterisk', 'asterisk') - ``` Once we've made our connection, our first task is to look for an existing holding bridge - if there is no existing holding bridge - we need to create it. The bridges resource has an operation for listing existing bridges - `GET /bridges`. Using ari-py we need to use the operation nickname - `list`. We can then use another bridges resource operation to create a holding bridge if none was found - `POST /bridges`. Using ari-py, we need to use the operation nickname - `create`. @@ -100,7 +98,6 @@ if bridges: else: bridge = client.bridges.create(type='holding') print "Created bridge %s" % bridge.id - ``` The `GET /channels` operation returns back a list of `Bridge` resources. Those resources, however, are returned as JSON from the operation, and while the `ari-py` library converts the `uniqueid` of those into an attribute on the object, it leaves the rest of them in the JSON dictionary. @@ -110,7 +107,6 @@ Our next step involves adding channels that enter our Stasis application to the ```python client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) - ``` We need two handler functions - `stasis_start_cb` for the `StasisStart` event and `stasis_end_cb` for the `StasisEnd` event: @@ -130,14 +126,12 @@ def stasis_end_cb(channel, ev): """Handler for StasisEnd event""" print "Channel %s just left our application" % channel.json.get('name') - ``` Finally, we need to tell the `client` to run our application. Once we call `client.run`, the websocket connection will be made and our application will wait on events infinitely. We can use `Ctrl+C` to kill it and break the connection. ```python client.run(apps='bridge-hold') - ``` ### bridge-hold.py @@ -184,7 +178,6 @@ client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='bridge-hold') - ``` ### bridge-hold.py in action @@ -196,7 +189,6 @@ asterisk:~$ python bridge-hold.py Created bridge 79f3ad78-b124-4d7b-a629-a53b7e7f50cd Channel PJSIP/alice-00000001 just entered our application, adding it to bridge 79f3ad78-b124-4d7b-a629-a53b7e7f50cd Channel PJSIP/alice-00000001 just left our application - ``` JavaScript (Node.js) @@ -231,7 +223,6 @@ function clientLoaded (err, client) { throw err; } } - ``` Once we've made our connection, our first task is to look for an existing holding bridge - if there is no existing holding bridge - we need to create it. The bridges resource has an operation for listing existing bridges - `GET /bridges`. Using ari-client we need to use the operation nickname - `list`. We can then use another bridges resource operation to create a holding bridge if none was found - `POST /bridges`. Using ari-client, we need to use the operation nickname - `create`. @@ -258,7 +249,6 @@ client.bridges.list(function(err, bridges) { }); } }); - ``` The `GET /channels` operation returns back a an error if it occurred and a list of `Bridge` resources. `ari-client` will return a JavaScript object for each `Bridge` resource. Properties such as `bridge_type` can be accessed on the object directly. @@ -268,7 +258,6 @@ Our next step involves adding channels that enter our Stasis application to the ```javascript client.on('StasisStart', stasisStart); client.on('StasisEnd', stasisEnd); - ``` We need two callback functions - `stasisStart` for the `StasisStart` event and `stasisEnd` for the `StasisEnd` event: @@ -305,14 +294,12 @@ function stasisEnd(event, channel) { console.log(util.format( 'Channel %s just left our application', channel.name)); } - ``` Finally, we need to tell the `client` to start our application. Once we call `client.start`, a websocket connection will be established and the client will emit Node.js events as events come in through the websocket. We can use `Ctrl+C` to kill it and break the connection. ```javascript client.start('bridge-hold'); - ``` ### bridge-hold.js @@ -396,7 +383,6 @@ function clientLoaded (err, client) { client.start('bridge-hold'); } - ``` ### bridge-hold.js in action @@ -408,5 +394,4 @@ asterisk:~$ node bridge-hold.js Created bridge 41208316-174c-4e40-90bb-c45cca6579d4 Channel PJSIP/alice-00000001 just entered our application, adding it to bridge 41208316-174c-4e40-90bb-c45cca6579d4 Channel PJSIP/alice-00000001 just left our application - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Handling-DTMF.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Handling-DTMF.md index b1ab7fd071..3dfacdaca9 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Handling-DTMF.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Handling-DTMF.md @@ -32,7 +32,6 @@ extensions.conf: exten => 1000,1,NoOp() same => n,Stasis(channel-aa) same => n,Hangup() - ``` ### Python @@ -59,7 +58,6 @@ To start, we'll define in a list at the top of our script the sounds that make u ```python linenums="1" sounds = ['press-1', 'or', 'press-2'] - ``` Since we'll want to maintain some state, we'll create a small object to do that for us. In Python, tuples are immutable - and we'll want to mutate the state in callbacks when certain operations happen. As such, it makes sense to use a small class for this with two properties: @@ -76,7 +74,6 @@ class MenuState(object): def __init__(self, current_sound, complete): self.current_sound = current_sound self.complete = complete - ``` To start, we'll write a function, `play_intro_menu`, that starts the menu on a channel. It will simply initialize the state of the menu, and get the ball rolling on the channel by calling `queue_up_sound`. @@ -100,7 +97,6 @@ def play_intro_menu(channel): ... queue_up_sound(channel, menu_state) - ``` `queue_up_sound` will be responsible for starting the next sound file on the channel and handling the manipulation of that sound file. Since there's a fair amount of checking that goes into this, we'll put the actual act of starting the sound in `play_next_sound`, which will return the `Playback` object from ARI. We'll prep the `menu_state` object for the next sound file playback, and pass it to the `PlaybackFinished` handler for the current sound being played back to the channel. @@ -121,7 +117,6 @@ def queue_up_sound(channel, menu_state): menu_state.current_sound += 1 current_playback.on_event('PlaybackFinished', on_playback_finished, callback_args=[menu_state]) - ``` `play_next_sound` will do two things: @@ -147,7 +142,6 @@ def play_next_sound(menu_state): except: current_playback = None return current_playback - ``` Our playback finished handler is very simple: since we've already incremented the state of the menu, we just call `queue_up_sound` again: @@ -161,7 +155,6 @@ def on_playback_finished(playback, ev, menu_state): menu_state The current state of the menu """ queue_up_sound(channel, menu_state) - ``` To recap, our `play_intro_menu` function has three nested functions: @@ -209,7 +202,6 @@ def queue_up_sound(channel, menu_state): callback_args=[current_playback, menu_state]) channel.on_event('StasisEnd', cancel_menu, callback_args=[current_playback, menu_state]) - ``` #### Timing out @@ -257,14 +249,12 @@ def queue_up_sound(channel, menu_state): callback_args=[current_playback, menu_state]) channel.on_event('StasisEnd', cancel_menu, callback_args=[current_playback, menu_state]) - ``` Now that we've introduced timers, we know we're going to need to stop them if the user does something. We'll store the timers in a dictionary indexed by channel ID, so we can get them from various parts of the script: ```python linenums="1" channel_timers = {} - ``` #### Handling the DTMF options @@ -308,7 +298,6 @@ def stasis_start_cb(channel_obj, ev): channel.on_event('ChannelDtmfReceived', on_dtmf_received) play_intro_menu(channel) - ``` Cancelling the timer is done in a fashion similar to other examples. If the channel has a Python timer associated with it, we cancel the timer and remove it from the dictionary. @@ -324,7 +313,6 @@ def cancel_timeout(channel): if timer: timer.cancel() del channel_timers[channel.id] - ``` Finally, we need to actually do *something* when the user presses a 1 or a 2. We could do anything here - but in our case, we're merely going to play back the number that they pressed and restart the menu. @@ -349,7 +337,6 @@ def handle_extension_two(channel): channel.play(media='sound:you-entered') channel.play(media='digits:2') play_intro_menu(channel) - ``` #### channel-aa.py @@ -541,7 +528,6 @@ client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='channel-aa') - ``` #### channel-aa.py in action @@ -556,7 +542,6 @@ Channel PJSIP/alice-00000001 entered 8 Channel PJSIP/alice-00000001 entered an invalid option! Channel PJSIP/alice-00000001 stopped paying attention... PJSIP/alice-00000001 has left the application - ``` ### JavaScript (Node.js) @@ -588,7 +573,6 @@ var menu = { // note: this uses the 'extra' sounds package sounds: ['sound:press-1', 'sound:or', 'sound:press-2'] }; - ``` To start with, well register a callback to handle a StasisStart and StasisEnd event on any channel that enters into our application: @@ -615,7 +599,6 @@ function stasisEnd(event, channel) { channel.removeListener('ChannelDtmfReceived', dtmfReceived); cancelTimeout(channel); } - ``` Note that we register a callback to handle ChannelDtmfReceived events on a channel entering our application in StasisStart and then unregister that callback on StasisEnd. For long running, non-trivial applications, this allows the JavaScript garbage collector to clean up our callback. This is important since every channel entering into our application will register its own copy of the callback which is not be garbage collected until it is unregistered. @@ -638,7 +621,6 @@ var state = { currentPlayback: undefined, done: false }; - ``` `playIntroMenu will` start the menu on a channel. It will simply initialize the state of the menu, and get the ball rolling on the channel by calling `queueUpSound` which is a nested function within playIntroMenu. @@ -655,7 +637,6 @@ function playIntroMenu(channel) { channel.on('StasisEnd', cancelMenu); queueUpSound(); ... - ``` We'll cover cancelMenu shortly, but first let's discuss queueUpSound. `queueUpSound` will be responsible for starting the next sound file on the channel and handling the manipulation of that sound file. queueUpSound is also responsible for starting a timeout once all sounds for the menu prompt have completed to handle reminding the user that they must choose a menu option. We'll cover that part shortly but first, we'll cover handling progerssing through the sounds that make up the menu prompt. We first initiate playback on the current sound in the sequence. We then register a callback to handle that playback finishing, which will trigger queueUpSound to be called again, moving on to the next sound in the sequence. Finally, we update the state object to reflect the next sound to be played in the menu prompt sequence. @@ -683,7 +664,6 @@ function queueUpSound() { } } } - ``` Notice that when registering our PlaybackFinished callback handler, we use the once method on the resource instance instead of on. This ensures that the callback will be invoked once and then automatically be unregistered. Since a PlaybackFinished event will only be invoked once for a given Playback instance, it makes sense to use this method which will also enable the callback to be garbage collected once it has been invoked. @@ -709,7 +689,6 @@ function cancelMenu() { channel.removeListener('ChannelDtmfReceived', cancelMenu); channel.removeListener('StasisEnd', cancelMenu); } - ``` Note that once the cancelMenu callback is invoked, we unregister both the ChannelDtmfReceived and StasisEnd events. This is performed so that once this particular menu instance stops, we do not leave registered callbacks behind that will never be garbage collected. @@ -730,14 +709,12 @@ function stillThere() { playIntroMenu(channel); }); } - ``` Now that we've introduced timers, we know we're going to need to stop them if the user does something. We'll store the timers in an object indexed by channel ID, so we can get them from various parts of the script: ```javascript linenums="1" var timers = {}; - ``` #### Handling the DTMF options @@ -773,7 +750,6 @@ function dtmfReceived(event, channel) { }); } } - ``` Cancelling the timer is done in a fashion similar to other examples. If the channel has a JavaScript timeout associated with it, we cancel the timer and remove it from the object. @@ -787,7 +763,6 @@ function cancelTimeout(channel) { delete timers[channel.id]; } } - ``` Finally, we need to actually do *something* when the user presses a 1 or a 2. We could do anything here - but in our case, we're merely going to play back the number that they pressed and restart the menu. @@ -806,7 +781,6 @@ function handleDtmf(channel, digit) { }); }); } - ``` #### channel-aa.js @@ -990,7 +964,6 @@ function clientLoaded (err, client) { client.start('channel-aa'); } - ``` #### channel-aa.js in action @@ -1005,5 +978,4 @@ Channel PJSIP/alice-00000001 entered 8 Channel PJSIP/alice-00000001 entered an invalid option! Channel PJSIP/alice-00000001 stopped paying attention... PJSIP/alice-00000001 has left the application - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Manipulating-Channel-State.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Manipulating-Channel-State.md index 5b9f45e26c..96c6246dec 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Manipulating-Channel-State.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Manipulating-Channel-State.md @@ -51,7 +51,6 @@ extensions.conf exten => 1000,1,NoOp() same => n,Stasis(channel-state) same => n,Hangup() - ``` ### Python @@ -68,7 +67,6 @@ We can store the timers that we've set up for a channel using a dictionary of ch ```python linenums="1" channel_timers = {} - ``` And we can register for our three events: @@ -77,7 +75,6 @@ And we can register for our three events: client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('ChannelStateChange', channel_state_change_cb) client.on_channel_event('StasisEnd', stasis_end_cb) - ``` The `StasisStart` event is the most interesting part. @@ -202,7 +199,6 @@ def channel_state_change_cb(channel, ev): client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='channel-state') - ``` #### channel-state.py in action @@ -215,7 +211,6 @@ Answering channel PJSIP/alice-00000001 Channel PJSIP/alice-00000001 is now: Up Hanging up channel PJSIP/alice-00000001 Channel PJSIP/alice-00000001 just left our application - ``` ### JavaScript (Node.js) @@ -278,7 +273,6 @@ function answer() { var timer = setTimeout(hangup, 4000); timers[channel.id] = timer; } - ``` 3. After we've answered the channel, we kick off another timer to hang up the channel in 4 seconds. When that timer fires, it will call `the hangup callback`. This does the final action on the channel by hanging it up: @@ -306,7 +300,6 @@ function stasisEnd(event, channel) { delete timers[channel.id]; } } - ``` Finally, we want to print out the state of the channel in the `ChannelStateChanged` callback. This will tell us exactly when our channel has been answered: @@ -317,7 +310,6 @@ function channelStateChange(event, channel) { console.log(util.format( 'Channel %s is now: %s', channel.name, channel.state)); } - ``` #### channel-state.js @@ -406,7 +398,6 @@ function clientLoaded (err, client) { client.start('channel-state'); } - ``` #### channel-state.js in action @@ -419,5 +410,4 @@ Answering channel PJSIP/alice-00000001 Channel PJSIP/alice-00000001 is now: Up Hanging up channel PJSIP/alice-00000001 Channel PJSIP/alice-00000001 just left our application - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Simple-Media-Manipulation.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Simple-Media-Manipulation.md index 8f8bbe6894..584b4a5cae 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Simple-Media-Manipulation.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/ARI-and-Channels-Simple-Media-Manipulation.md @@ -44,7 +44,6 @@ For this example, we need to just drop the channel into Stasis, specifying our a exten => 1000,1,NoOp() same => n,Stasis(channel-tones) same => n,Hangup() - ``` ### Python @@ -127,7 +126,6 @@ client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='channel-tones') - ``` #### channel-tones.py in action @@ -139,7 +137,6 @@ Channel PJSIP/alice-00000000 has entered the application Answering channel PJSIP/alice-00000000 Hanging up channel PJSIP/alice-00000000 Channel PJSIP/alice-00000000 just left our application - ``` ### JavaScript (Node.js) @@ -258,7 +255,6 @@ function clientLoaded (err, client) { client.on('StasisEnd', stasisEnd); client.start('channel-tones'); } - ``` #### channel-tones.js in action @@ -287,7 +283,6 @@ For this example, we need to just drop the channel into Stasis, specifying our a exten => 1000,1,NoOp() same => n,Stasis(channel-playback-monkeys) same => n,Hangup() - ``` ### Python @@ -366,7 +361,6 @@ The following shows the output of the `channel-playback-monkeys`.py script when Monkeys! Attack PJSIP/alice-00000000! Monkeys successfully vanquished PJSIP/alice-00000000; hanging them up Channel PJSIP/alice-00000000 just left our application - ``` ### JavaScript (Node.js) diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/index.md index 17ca9562f3..80df2c5637 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Channels/index.md @@ -62,7 +62,6 @@ exten => 1000,1,NoOp() same => n,Answer() same => n,Stasis(channel-dump) same => n,Hangup() - ``` ### Python @@ -89,7 +88,6 @@ import logging logging.basicConfig(level=logging.ERROR) client = ari.connect('http://localhost:8088', 'asterisk', 'asterisk') - ``` Once we've made our connection, our first task is to print out all existing channels or - if there are no channels - print out that there are no channels. The `channels` resource has an operation for this - `GET /channels`. Since the `ari-py` library will dynamically construct operations on objects that map to resource calls using the nickname of an operation, we can use the `list` method on the `channels` resource to get all current channels in Asterisk: @@ -102,7 +100,6 @@ else: print "Current channels:" for channel in current_channels: print channel.json.get('name') - ``` The `GET /channels` operation returns back a list of `Channel` resources. Those resources, however, are returned as JSON from the operation, and while the `ari-py` library converts the `uniqueid` of those into an attribute on the object, it leaves the rest of them in the JSON dictionary. Since what we want is the name, we can just extract it ourselves out of the JSON and print it out. @@ -112,7 +109,6 @@ Our next step involves a bit more - we want to print out all the information abo ```python client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) - ``` We need two handler functions - `stasis_start_cb` for the `StasisStart` event and `stasis_end_cb` for the `StasisEnd` event: @@ -131,14 +127,12 @@ def stasis_end_cb(channel, ev): """Handler for StasisEnd event""" print "%s has left the application" % channel.json.get('name') - ``` Finally, we need to tell the `client` to run our application. Once we call `client.run`, the websocket connection will be made and our application will wait on events infinitely. We can use `Ctrl+C` to kill it and break the connection. ```python client.run(apps='channel-dump') - ``` #### channel-dump.py @@ -185,7 +179,6 @@ client.on_channel_event('StasisStart', stasis_start_cb) client.on_channel_event('StasisEnd', stasis_end_cb) client.run(apps='channel-dump') - ``` #### channel-dump.py in action @@ -205,7 +198,6 @@ connected: {u'name': u'', u'number': u''} dialplan: {u'priority': 3, u'exten': u'1000', u'context': u'default'} id: asterisk-01-1402353503.1 PJSIP/alice-00000001 has left the application - ``` ### JavaScript (Node.js) @@ -239,7 +231,6 @@ function clientLoaded (err, client) { throw err; } } - ``` Once we've made our connection, our first task is to print out all existing channels or - if there are no channels - print out that there are no channels. The `channels` resource has an operation for this - `GET /channels`. Since the `ari-client` library will dynamically construct a client with operations on objects that map to resource calls using the nickname of an operation, we can use the `list` method on the `channels` resource to get all current channels in Asterisk: @@ -255,7 +246,6 @@ client.channels.list(function(err, channels) { }); } }); - ``` The `GET /channels` operation expects a callback that will be called with an error if one occurred and a list of `Channel` resources. `ari-client` will return a JavaScript object for each `Channel` resource. Properties such as `name` can be accessed on the object directly. @@ -265,7 +255,6 @@ Our next step involves a bit more - we want to print out all the information abo ```javascript client.on('StasisStart', stasisStart); client.on('StasisEnd', stasisEnd); - ``` We need two callback functions - `stasisStart` for the `StasisStart` event and `stasisEnd` for the `StasisEnd` event: @@ -285,14 +274,12 @@ function stasisEnd(event, channel) { console.log(util.format( 'Channel %s has left the application', channel.name)); } - ``` Finally, we need to tell the `client` to start our application. Once we call `client.start`, a websocket connection will be established and the client will emit Node.js events as events come in through the websocket. We can use `Ctrl+C` to kill it and break the connection. ```javascript client.start('channel-dump'); - ``` #### channel-dump.js @@ -347,7 +334,6 @@ function clientLoaded (err, client) { client.start('channel-dump'); } - ``` #### channel-dump.js in action @@ -367,5 +353,4 @@ connected: {u'name': u'', u'number': u''} dialplan: {u'priority': 3, u'exten': u'1000', u'context': u'default'} id: asterisk-01-1402353503.1 PJSIP/alice-00000001 has left the application - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-1-Recording.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-1-Recording.md index 381f6f456f..4511aa0ceb 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-1-Recording.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-1-Recording.md @@ -248,7 +248,6 @@ class HungUpState(object): def enter(self): channel_name = self.call.channel.json.get('name') print("Channel {0} hung up".format(channel_name)) - ``` ```javascript title="hungup_state.js" linenums="1" @@ -302,7 +301,6 @@ var HungUpState = require('./hungup_state'); this.state_machine.add_transition(recording_state, Event.HANGUP, hungup_state) this.state_machine.start(recording_state) } - ``` The following is a sample output of a user calling the application and pressing the # key when finished recording @@ -314,7 +312,6 @@ Recording voicemail at voicemail/305/1411497846.53 Accepted recording voicemail/305/1411497846.53 Cleaning up event handlers Ending voice mail call from PJSIP/200-00000003 - ``` ### Reader Exercise 1 @@ -590,7 +587,6 @@ def setup_state_machine(self): self.state_machine.add_transition(reviewing_state, Event.DTMF_STAR, recording_state) self.state_machine.start(recording_state) - ``` ```javascript title="vm-call.js" linenums="1" @@ -613,7 +609,6 @@ this.setup_state_machine = function() { this.state_machine.add_transition(reviewing_state, Event.DTMF_STAR, recording_state); this.state_machine.start(recording_state); } - ``` The following is the output from a sample call. The user records audio, then presses #. Upon hearing the recording, the user decides to record again, so the user presses *. After re-recording, the user presses #. The user hears the new version of the recording played back and is satisfied with it, so the user presses # to accept the recording. @@ -633,7 +628,6 @@ Cleaning up event handlers Entering reviewing state Accepted recording voicemail/305/1411501058.42 on DTMF # Ending voice mail call from PJSIP/200-00000009 - ``` ### Reader Exercise 5 diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-2-Playbacks.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-2-Playbacks.md index 9dc16237cc..3380a657ea 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-2-Playbacks.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/ARI-and-Media-Part-2-Playbacks.md @@ -121,7 +121,6 @@ function GreetingState(call) { } } module.exports = GreetingState; - ``` The `sounds.get()` method employed here allows for a single sound to be retrieved based on input parameters. Here, we simply specify the name of the recording we want to ensure that it exists in some form on the system. By checking for the sound's existence in the initialization of `GreetingState`, we can abort the call early if the sound is not installed. @@ -181,7 +180,6 @@ this.setup_state_machine = function() { this.state_machine.add_transition(greeting_state, Event.PLAYBACK_COMPLETE, recording_state); this.state_machine.start(greeting_state); } - ``` Here is a sample run where the user cuts off the greeting by pressing the # key, records a greeting and presses the # key, and after listening to the recording presses the # key once more. @@ -197,7 +195,6 @@ Cleaning up event handlers Entering reviewing state Accepted recording voicemail/305/1411503204.75 on DTMF # Ending voice mail call from PJSIP/200-0000000b - ``` ### Reader Exercise 1 @@ -530,7 +527,6 @@ class PreambleState(object): if digit == '#': self.cleanup() self.call.state_machine.change_state(Event.DTMF_OCTOTHORPE) - ``` ```javascript title="preamble_state.js" linenums="1" diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/index.md index 88530907b7..9951595a60 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Introduction-to-ARI-and-Media-Manipulation/index.md @@ -55,7 +55,6 @@ class Event(object): PLAYBACK_COMPLETE = "playback_complete" # Mailbox has been emptied MAILBOX_EMPTY = "empty" - ``` ```javascript title="event.js" linenums="1" var Event = { @@ -82,7 +81,6 @@ var Event = { MAILBOX_EMPTY: "empty" } module.exports = Event; - ``` There is no hard requirement for our application that we define events as named constants, but doing so makes it easier for tools like pylint and jslint to find potential mistakes. @@ -110,7 +108,6 @@ class StateMachine(object): def start(self, initial_state): self.current_state = initial_state self.current_state.enter() - ``` ```javascript title="state_machine.js" linenums="1" function StateMachine() { @@ -136,7 +133,6 @@ function StateMachine() { } module.exports = StateMachine; - ``` The state machine code is pretty straightforward. The state machine has transitions added to it with the `add_transition()` method and can be started with the `start()` method. Our use of the state machine will always be to define all transitions, and then to start the state machine. diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/ARI-Push-Configuration.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/ARI-Push-Configuration.md index c58a2d7af7..7d8484eb9a 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/ARI-Push-Configuration.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/ARI-Push-Configuration.md @@ -49,7 +49,6 @@ identify=astdb,ps_endpoint_id_ips [res_pjsip_outbound_registration] registration=astdb,ps_registrations - ``` /// warning @@ -103,7 +102,6 @@ rtp_symmetric=yes context=default auth=alice aors=alice - ``` If we then ask Asterisk what endpoints we have, it will show us something like the following: @@ -182,7 +180,6 @@ $ curl -X PUT -H "Content-Type: application/json" -u asterisk:secret \ {"attribute":"auth_type","value":"userpass"},{"attribute":"password","value":"secret"}, {"attribute":"nonce_lifetime","value":"32"},{"attribute":"username","value":"alice"} ] - ``` We can note a few things from this: @@ -208,7 +205,6 @@ $ curl -X PUT -H "Content-Type: application/json" -u asterisk:secret \ {"attribute":"authenticate_qualify","value":"false"},{"attribute":"contact","value":""}, {"attribute":"max_contacts","value":"1"},{"attribute":"remove_existing","value":"true"} ] - ``` Finally, we can push in Alice's endpoint: @@ -312,7 +308,6 @@ $ curl -X PUT -H "Content-Type: application/json" -u asterisk:secret \ {"attribute":"callerid_privacy","value":"allowed_not_screened"}, {"attribute":"cos_audio","value":"0"} ] - ``` We can now verify that Alice's endpoint exists: @@ -332,7 +327,6 @@ We can now verify that Alice's endpoint exists: Endpoint: alice/unknown Invalid 0 of inf InAuth: alice/alice Aor: alice 1 - ``` /// warning | Order Matters! @@ -358,7 +352,6 @@ If we no longer want Alice to have an endpoint, we can remove it and its related $ curl -X DELETE -u asterisk:secret https://localhost:8088/ari/asterisk/config/dynamic/res_pjsip/endpoint/alice $ curl -X DELETE -u asterisk:secret https://localhost:8088/ari/asterisk/config/dynamic/res_pjsip/aor/alice $ curl -X DELETE -u asterisk:secret https://localhost:8088/ari/asterisk/config/dynamic/res_pjsip/auth/alice - ``` And we can confirm that Alice no longer exists: diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/index.md index 95c884e9cf..463d22ff0c 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/The-Asterisk-Resource/index.md @@ -54,5 +54,4 @@ $ curl -X GET -u asterisk:SECRET https://localhost:8088/ari/asterisk/info } } } - ``` diff --git a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/index.md b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/index.md index 13252ca662..19943b0c92 100644 --- a/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/index.md +++ b/docs/Configuration/Interfaces/Asterisk-REST-Interface-ARI/index.md @@ -124,7 +124,6 @@ ari = ARI('localhost', ('username', 'password')) channels = ari.get('channels') for channel in channels: ari.delete('channels', channel['id']) - ``` In other words: **use one of the aforementioned libraries or write your own!** diff --git a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/Followme-Realtime.md b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/Followme-Realtime.md index 1f6bb675dd..f3c5eedf65 100644 --- a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/Followme-Realtime.md +++ b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/Followme-Realtime.md @@ -28,7 +28,6 @@ followme: hold_prompt Message played to the caller while dialing the followme steps. status_prompt Normally, "Party is not at their desk". sorry_prompt Normally, "Unable to locate party". - ``` ``` @@ -39,5 +38,4 @@ followme_numbers: phonenumber The telephone number(s) you would like to call, separated by '&'. timeout Timeout associated with this step. See the followme documentation for more information on how this value is handled. - ``` diff --git a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/LDAP-Realtime-Driver.md b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/LDAP-Realtime-Driver.md index e3cc29b858..100a352f94 100644 --- a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/LDAP-Realtime-Driver.md +++ b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/LDAP-Realtime-Driver.md @@ -23,7 +23,6 @@ cd contrib/scripts sudo cp asterisk.ldap-schema /etc/ldap/schema/ sudo service slapd restart sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ./asterisk.ldif - ``` Let's edit the extconfig.conf file to specify LDAP as our realtime storage engine and where Asterisk will look for data. @@ -32,7 +31,6 @@ Let's edit the extconfig.conf file to specify LDAP as our realtime storage engin sippeers = ldap,"ou=sip,dc=example,dc=domain",sip sipusers = ldap,"ou=sip,dc=example,dc=domain",sip extensions = ldap,"ou=extensions,dc=example,dc=domain",extensions - ``` !!! note @@ -61,14 +59,12 @@ AstAccountRegistrationServer: 0 AstAccountType: 0 AstAccountUserAgent: 0 AstExtension: 1000 - ``` Let's add the record to the LDAP server: ``` sudo ldapadd -D "cn=admin,dc=example,dc=domain" -x -W -f createduser.ldif - ``` When creating your own record schema, you'll obviously want to incorporate authentication. Asterisk + LDAP requires that the user secrets be stored as an MD5 hash. MD5 hashes can be created using 'md5sum'. @@ -77,12 +73,10 @@ For AstAccountRealmedPassword authentication use this. ``` printf "" | md5sum - ``` For AstMD5secret authentication use this. ``` printf "password" | md5sum - ``` diff --git a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Configuring-res_odbc.md b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Configuring-res_odbc.md index 6910f176bd..588669dc2a 100644 --- a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Configuring-res_odbc.md +++ b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Configuring-res_odbc.md @@ -36,7 +36,6 @@ dsn => your-configured-dsn-name username => your-database-username password => insecurepassword pre-connect => yes - ``` Then start up Asterisk and assuming res_odbc loads properly on the CLI you can use odbc show to verify a DSN is configured and shows up: @@ -48,7 +47,6 @@ ODBC DSN Settings Name: asterisk DSN: your-configured-dsn-name Last connection attempt: 1969-12-31 18:00:00 - ``` To verify the connection works you should use func_odbc or something similar to query the data source from Asterisk. diff --git a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Getting-Asterisk-Connected-to-MySQL-via-ODBC.md b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Getting-Asterisk-Connected-to-MySQL-via-ODBC.md index 59f281d576..c45931154f 100644 --- a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Getting-Asterisk-Connected-to-MySQL-via-ODBC.md +++ b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/ODBC/Getting-Asterisk-Connected-to-MySQL-via-ODBC.md @@ -17,7 +17,6 @@ On This Page### Install MySQL server package and start the DB service ```bash title=" " linenums="1" # sudo yum install mysql-server # sudo service mysqld start - ``` ### Secure the installation if appropriate @@ -26,7 +25,6 @@ If you intend to push this install into production or practice as if you were th ```bash title=" " linenums="1" # sudo /usr/bin/mysql_secure_installation - ``` ### Configure a user and database for Asterisk in MySQL @@ -37,7 +35,6 @@ We'll have you login into the mysql command console, create a user, create a dat ```bash title=" " linenums="1" # mysql -u root -p - ``` Now verify you are at the MySQL command prompt. It should look like "mysql>". Then enter the following commands: @@ -47,7 +44,6 @@ Now verify you are at the MySQL command prompt. It should look like "mysql>". Th # CREATE DATABASE asterisk; # GRANT ALL PRIVILEGES ON asterisk.* TO 'asterisk'@'%'; # exit - ``` After each of the CREATE and GRANT commands you should see output indicating that the Query was OK including many rows were affected.If you want, you can test out the new permissions by logging in as your user to the asterisk database and then logout again. @@ -55,7 +51,6 @@ After each of the CREATE and GRANT commands you should see output indicating tha ```bash title=" " linenums="1" # mysql -u asterisk -p asterisk # exit - ``` ## Install ODBC and the MariaDB ODBC connector @@ -73,14 +68,12 @@ The development packages are necessary as well, since later Asterisk will need t ```bash title=" " linenums="1" # sudo yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel - ``` ### Install the latest MariaDB ODBC connector ```bash title=" " linenums="1" # sudo yum install mariadb-connector-odbc - ``` ## Configure ODBC and the MariaDB ODBC connector @@ -99,14 +92,12 @@ Description=ODBC for MariaDB Driver=/usr/lib64/libmaodbc.so Setup=/usr/lib64/libodbcmyS.so UsageCount=1 - ``` You can also call **`odbcinst`** to query the driver, verifying that the configuration is found. ```bash title=" " linenums="1" # odbcinst -q -d - ``` The output should read simply "[MySQL]" @@ -125,7 +116,6 @@ Database = asterisk Server = localhost Port = 3306 Socket = /var/lib/mysql/mysql.sock - ``` !!! note @@ -143,7 +133,6 @@ So, for our purposes you would enter: ```bash title=" " linenums="1" # isql -v asterisk-connector asterisk replace_with_strong_password - ``` !!! tip @@ -155,7 +144,6 @@ At this point you should get an SQL prompt. Run the following command: ``` SQL> select 1 - ``` You should see some simple results if the query is successful. Then you can exit. @@ -171,7 +159,6 @@ SQLRowCount returns 1 1 rows fetched SQL> quit - ``` ## Configuring Asterisk to Use the New ODBC and MySQL Install @@ -186,7 +173,6 @@ If you already had Asterisk installed from source and the modules you need are a # cd ~/asterisk-source/ # ./configure # make && make install - ``` Make sure that at least the func_odbc, res_odbc and res_odbc_transaction modules are built and installed. You may also need the following modules depending on your use case: res_config_odbc, cdr_odbc, cdr_adaptive_odbc, cel_odbc. diff --git a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/cURL.md b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/cURL.md index a84516f152..8253bd9801 100644 --- a/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/cURL.md +++ b/docs/Configuration/Interfaces/Back-end-Database-and-Realtime-Connectivity/cURL.md @@ -28,14 +28,12 @@ If you use a distribution with aptitude-based packaging (Debian, Ubuntu, Mint, e ``` apt-get install libcurl4-openssl-dev - ``` If you use a distribution with yum-based packaging (CentOS, RHEL, Fedora, et al), then use this command to install: ``` yum -y install libcurl-devel - ``` Both of the above commands assume that you have permission to install the packages. You may need to prepend the command with "sudo" in order to be able to install the packages. @@ -44,7 +42,6 @@ Once you have the libcurl development libraries installed, you need to run Aster ```bash title=" " linenums="1" $ ./configure - ``` In addition to the libcurl development library, `res_config_curl.so` relies on two other modules within Asterisk: `res_curl.so` and `func_curl.so`. `res_curl.so` initializes the cURL library within Asterisk. `func_curl.so` provides dialplan functions ( `CURL` and `CURLOPT`) that are used directly by `res_config_curl.so`. @@ -53,21 +50,18 @@ After running the configure script, run ```bash title=" " linenums="1" $ make menuselect - ``` to select which modules to build. Ensure that you can select `res_curl` and `res_config_curl` from the "Resource Modules" menu and that you can select `func_curl` from the "Dialplan Functions" menu. Once you have ensured that these have been selected, save your changes ('x' key if using curses-based menuselect or select the "Save & Exit" option if using newt-based or gtk-based menuselect). After, you just need to run ```bash title=" " linenums="1" $ make && make install - ``` in order to build Asterisk and install it on the system. You may need to prepend "sudo" to the "make install" command if there are permission problems when attempting to install. Once you have installed Asterisk, you can test that `res_config_curl.so` has been installed properly by starting Asterisk: ```bash title=" " linenums="1" $ asterisk -c - ``` Once Asterisk has started, type the following on the CLI: @@ -77,7 +71,6 @@ Once Asterisk has started, type the following on the CLI: Module Description Use Count Status res_config_curl.so Realtime Curl configuration 0 Running 1 modules loaded - ``` The output when you run the command should look like what is shown above. If it does, then Asterisk is capable of using cURL for realtime. @@ -99,14 +92,12 @@ Unlike other realtime backends, Asterisk does not have a specific configuration voicemail = curl,http://myserver.com:8000/voicemail sippeers = curl,http://myserver.com:8000/sippeers queues = curl,http://myserver.com:8000/my_queues - ``` The basic syntax when using cURL is: ``` realtime_data = curl, - ``` There are no hard-and-fast rules on what URL you place here. In the above sample, each of the various realtime stores correspond to resources on the same HTTP server. However, it would be perfectly valid to specify completely different servers for different realtime stores. Notice also that there is no requirement for the name of the realtime store to appear in the HTTP URL. In the above example the "queues" realtime store maps to the resource "my_queues" on the HTTP server. @@ -142,7 +133,6 @@ Our `extconfig.conf` file looks like this: ``` [settings] mailboxes => curl,http://myserver.com:8000/mwi - ``` ### single @@ -160,7 +150,6 @@ Content-Length: 8 Content-Type: application/x-www-form-urlencoded id=Dazed - ``` In this case, the request from Asterisk wants a single object whose id is "Dazed". Given the data we have stored, we would respond like so: @@ -172,7 +161,6 @@ Content-Length: 30 Content-Type: text/html msgs_new=5&msgs_old=4&id=Dazed - ``` The parameters describing the requested mailbox are returned on a single line in the HTTP response body. The order that the parameters are listed in is irrelevant. @@ -194,7 +182,6 @@ Content-Length: 13 Content-Type: application/x-www-form-urlencoded id%20LIKE=%25 - ``` The "multi" resource is one where Asterisk shows a weakness when not dealing with a relational database as its realtime backend. In this case, Asterisk has requested multiple rows with "id LIKE=%". What this means is that Asterisk wants to retrieve every object from the particular realtime store with an id equal to anything. Other queries Asterisk may send may be more like "foo LIKE=%bar%". In this case, Asterisk would be requesting all objects with a foo parameter that has "bar" as part of its value (so something with foo=barbara would match the query). @@ -209,7 +196,6 @@ Content-Type: text/html msgs_new=5&msgs_old=4&id=Dazed msgs_new=6&msgs_old=8&id=Confused - ``` Each returned object is on its own line of the response. @@ -229,7 +215,6 @@ Content-Length: 30 Content-Type: application/x-www-form-urlencoded id=Shocked&msgs_old=5&msgs_new=7 - ``` In this case, Asterisk is attempting to store a new object with id "Shocked", 5 old messages and 7 new messages. Our realtime backend should reply with the number of objects stored. @@ -241,7 +226,6 @@ Content-Length: 1 Content-Type: text/html 1 - ``` Since we have stored one new object, we return "1" as our response. @@ -263,7 +247,6 @@ Content-Length: 24 Content-Type: application/x-www-form-urlencoded msgs_old=25&msgs_new=300 - ``` In this case, the URL parameter "id=Dazed" tells us that Asterisk wants us to update all objects whose id is "Dazed". For any objects that match the criteria, we should update the number of old messages to 25 and the number of new messages to 300. @@ -277,7 +260,6 @@ Content-Length: 1 Content-Type: text/html 1 - ``` If there are no items that match the criteria, you may either respond with a "0" response body or return an HTTP error. @@ -297,7 +279,6 @@ Content-Length: 9 Content-Type: application/x-www-form-urlencoded id=Dazed - ``` In this case, Asterisk has requested that we delete the object with the id of "Dazed". @@ -311,7 +292,6 @@ Content-Length: 1 Content-Type: text/html 1 - ``` If asked to delete an object that does not exist, you may either respond with a "0" body or with an HTTP error. @@ -370,7 +350,6 @@ This schema is identical to the `pjsip.conf` configuration file: type=endpoint allow=ulaw context=fabulous - ``` Asterisk uses an HTTP GET to request static realtime data, using a URL parameter to indicate which filename it cares about. Here is an example of such a request: @@ -380,7 +359,6 @@ GET /astconfig/static?file=pjsip.conf HTTP/1.1 User-Agent: asterisk-libcurl-agent/1.0 Host: localhost:8000 Accept */* - ``` In this case, Asterisk wants all static realtime objects whose filename is "pjsip.conf". Note that the HTTP request calls the parameter "file", whereas the actual name of the parameter returned from the realtime store is called "filename". @@ -396,7 +374,6 @@ Content-Type: text/html category=alice&commented=0&var_metric=0&var_name=type&var_val=endpoint&id=0&filename=pjsip.conf&cat_metric=0 category=alice&commented=0&var_metric=1&var_name=allow&var_val=ulaw&id=1&filename=pjsip.conf&cat_metric=0 category=alice&commented=0&var_metric=2&var_name=context&var_val=fabulous&id=2&filename=pjsip.conf&cat_metric=0 - ``` Unlike other realtime responses, the static realtime response needs to present the data in a particular order: @@ -427,7 +404,6 @@ Content-Length: 42 Content-Type: application/x-www-form-urlencoded paused=integer1%3A1&uniqueid=uinteger2%3A5 - ``` Decoded, the body is "paused=integer1:1&uniqueid=uinteger2:5". The types that Asterisk can ask for are the following: @@ -466,7 +442,6 @@ Content-Length: 1 Content-Type: text/html 0 - ``` Other Information diff --git a/docs/Configuration/Interfaces/Distributed-Device-State/Corosync.md b/docs/Configuration/Interfaces/Distributed-Device-State/Corosync.md index d7ae06a307..142d7adbec 100644 --- a/docs/Configuration/Interfaces/Distributed-Device-State/Corosync.md +++ b/docs/Configuration/Interfaces/Distributed-Device-State/Corosync.md @@ -32,7 +32,6 @@ Debian / Ubuntu ``` apt-get install corosync corosync-dev - ``` Red Hat / Fedora @@ -40,7 +39,6 @@ Red Hat / Fedora ``` yum install corosync corosynclib corosynclib-devel - ``` * ###### Authkey @@ -50,7 +48,6 @@ To create an authentication key for secure communications between your nodes you ``` corosync-keygen - ``` This creates a key in /etc/corosync/authkey. @@ -58,7 +55,6 @@ This creates a key in /etc/corosync/authkey. ``` asterisk_active:~# scp /etc/corosync/authkey asterisk_standby: - ``` Now, on the standby node, you'll need to stick the authkey in it's new home and fix it's permissions / ownership. @@ -68,7 +64,6 @@ Now, on the standby node, you'll need to stick the authkey in it's new home and asterisk_standby:~# mv ~/authkey /etc/corosync/authkey asterisk_standby:~# chown root:root /etc/corosync/authkey asterisk_standby:~# chmod 400 /etc/corosync/authkey - ``` * ###### /etc/corosync/corosync.conf @@ -138,7 +133,6 @@ The interface section under the totem block defines the communication path(s) to ``` service corosync start - ``` ###### Asterisk @@ -152,7 +146,6 @@ In your Asterisk source directory: ./configure make make install - ``` * ###### /etc/asterisk/res_corosync.conf @@ -190,7 +183,6 @@ publish_event = device_state ; Subscribe to Device State (presence) events from the cluster. subscribe_event = device_state ; - ``` In the general section of the res_corosync.conf file we are specifying which events we'd like to publish and subscribe to (at the moment this is either device_state or mwi). @@ -212,7 +204,6 @@ If everything is set up correctly, you should see this output after executing a === --> Address 1: === ============================================================= - ``` After starting Corosync and Asterisk on your second node, the 'corosync show members' output should look something like this: @@ -233,5 +224,4 @@ After starting Corosync and Asterisk on your second node, the 'corosync show mem === --> Address 1: === ============================================================= - ``` diff --git a/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-AIS.md b/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-AIS.md index 0f8597249b..5ed62b5c29 100644 --- a/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-AIS.md +++ b/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-AIS.md @@ -76,7 +76,6 @@ totem { mcastport: 5405 } } - ``` The default mcastaddr and mcastport is probably fine. You need to change the bindnetaddr to match the address of the network interface that this node will use to communicate with other nodes in the cluster. @@ -137,7 +136,6 @@ $ sudo ${EDITOR:-vim} /etc/asterisk/asterisk.conf [options] entity_id=01:23:45:67:89:ab - ``` Edit the Asterisk ais.conf to enable distributed events. For example, if you would like to enable distributed device state, you should add the following section to the file: @@ -150,7 +148,6 @@ $ sudo ${EDITOR:-vim} /etc/asterisk/ais.conf type=event_channel publish_event=device_state subscribe_event=device_state - ``` For more information on the contents and available options in this configuration file, please see the sample configuration file: @@ -219,7 +216,6 @@ The easiest way to test distributed device state is to use the DEVICE_STATE() di [devstate_test] exten => 1234,hint,Custom:mystate - ``` Now, you can test that the cluster-wide state of "Custom:mystate" is what you would expect after going to the CLI of each server and adjusting the state. diff --git a/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-XMPP-PubSub.md b/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-XMPP-PubSub.md index 7bca081433..7fda0cd5b2 100644 --- a/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-XMPP-PubSub.md +++ b/docs/Configuration/Interfaces/Distributed-Device-State/Distributed-Device-State-with-XMPP-PubSub.md @@ -171,7 +171,6 @@ status=available usetls=no usesasl=yes buddy=server2@asterisk.mydomain.tld/astvoip2 - ``` \*Asterisk Server 2\* @@ -201,7 +200,6 @@ status=available usetls=no usesasl=yes buddy=server1@asterisk.mydomain.tld/astvoip1 - ``` # Basic Testing of Asterisk with XMPP PubSub diff --git a/docs/Configuration/Interfaces/Utilizing-the-StatsD-Dialplan-Application.md b/docs/Configuration/Interfaces/Utilizing-the-StatsD-Dialplan-Application.md index 636728c960..5f946d5d2b 100644 --- a/docs/Configuration/Interfaces/Utilizing-the-StatsD-Dialplan-Application.md +++ b/docs/Configuration/Interfaces/Utilizing-the-StatsD-Dialplan-Application.md @@ -56,7 +56,6 @@ server = 127.0.0.1 ; server[:port] of statsd server to use. ;add_newline = no ; Append a newline to every event. This is ; useful if you want to run a fake statsd ; server using netcat (nc -lu 8125) - ``` If you wish to add a port, such as 8126, to the server address, then you would add it at the end of the address with a colon, like so: *127.0.0.1:8126*. @@ -76,7 +75,6 @@ exten => 100,1,NoOp() exten => 200,1,NoOp() same => n,StatsD(g,confBridgeUsers,-1,1) same => n,Hangup() - ``` Example diff --git a/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/PostgreSQL-CDR-Backend.md b/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/PostgreSQL-CDR-Backend.md index 253e7ca0f2..08dc314afa 100644 --- a/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/PostgreSQL-CDR-Backend.md +++ b/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/PostgreSQL-CDR-Backend.md @@ -21,7 +21,6 @@ dbname=asterisk password=password user=postgres table=cdr - ``` Now create a table in postgresql for your cdrs @@ -46,7 +45,6 @@ CREATE TABLE cdr ( uniqueid varchar (150) NOT NULL , userfield varchar (255) NOT NULL ); - ``` ##### In 1.8 and later @@ -58,5 +56,4 @@ The following columns can also be defined: peeraccount varchar(20) NOT NULL linkedid varchar(150) NOT NULL sequence int NOT NULL - ``` diff --git a/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/RADIUS-CDR-Backend.md b/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/RADIUS-CDR-Backend.md index 9bee050e2f..39c5734b51 100644 --- a/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/RADIUS-CDR-Backend.md +++ b/docs/Configuration/Reporting/Call-Detail-Records-CDR/CDR-Storage-Backends/RADIUS-CDR-Backend.md @@ -20,7 +20,6 @@ From ``` root@localhost:/usr/local/src# tar xvfz radiusclient-ng-0.5.2.tar.gz - ``` ##### Compile and install the library: @@ -31,7 +30,6 @@ root@localhost:/usr/local/src# cd radiusclient-ng-0.5.2 root@localhost:/usr/local/src/radiusclient-ng-0.5.2#./configure root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make install - ``` ##### Configuration of the Radiusclient library @@ -43,7 +41,6 @@ File "radiusclient.conf" Open the file and find lines containing the following: ``` authserver localhost - ``` This is the hostname or IP address of the RADIUS server used for authentication. You will have to change this unless the server is running on the same host as your Asterisk PBX. @@ -51,7 +48,6 @@ This is the hostname or IP address of the RADIUS server used for authentication. ``` acctserver localhost - ``` This is the hostname or IP address of the RADIUS server used for accounting. You will have to change this unless the server is running on the same host as your Asterisk PBX. @@ -69,7 +65,6 @@ Each line contains hostname of a RADIUS server and shared secret used in communi ``` File "dictionary" - ``` Asterisk uses some attributes that are not included in the dictionary of radiusclient library, therefore it is necessary to add them. A file called dictionary.digium (kept in the contrib dir) was created to list all new attributes used by Asterisk. Add to the end of the main dictionary @@ -78,7 +73,6 @@ file /usr/local/etc/radiusclient-ng/dictionary the line: ```bash title=" " linenums="1" $INCLUDE /path/to/dictionary.digium - ``` ### Install FreeRADIUS Server (Version 1.1.1) @@ -96,7 +90,6 @@ root@localhost:/usr/local/src# cd freeradius-1.1.1 root@localhost"/usr/local/src/freeradius-1.1.1# ./configure root@localhost"/usr/local/src/freeradius-1.1.1# make root@localhost"/usr/local/src/freeradius-1.1.1# make install - ``` All the configuration files of FreeRADIUS server will be in /usr/local/etc/raddb directory. @@ -114,7 +107,6 @@ Example: ``` client myhost { secret = mysecret shortname = foo } - ``` This fragment allows access from RADIUS clients on "myhost" if they use "mysecret" as the shared secret. The file already contains an entry for localhost (127.0.0.1), so if you are running the RADIUS server on the same host as your Asterisk server, then modify the existing entry instead, replacing the default password. @@ -132,7 +124,6 @@ File /usr/local/etc/raddb/dictionary contains the dictionary of FreeRADIUS serve ```bash title=" " linenums="1" $INCLUDE /path/to/dictionary.digium - ``` That will include the same new attribute definitions that are used in radiusclient-ng library so the client and server will understand each other. diff --git a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/MSSQL-CEL-Backend.md b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/MSSQL-CEL-Backend.md index e1a85e8de3..d446ca6a3f 100644 --- a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/MSSQL-CEL-Backend.md +++ b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/MSSQL-CEL-Backend.md @@ -23,7 +23,6 @@ The following provide some examples known to get asterisk working with mssql. ``` tar -zxvf unixODBC-2.2.9.tar.gz && cd unixODBC-2.2.9 && ./configure --sysconfdir=/etc --prefix=/usr --disable-gui && make && make install - ``` ### Compile, configure, and install the latest FreeTDS package: @@ -31,7 +30,6 @@ tar -zxvf unixODBC-2.2.9.tar.gz && cd unixODBC-2.2.9 && ./configure --sysconfdir ``` tar -zxvf freetds-0.62.4.tar.gz && cd freetds-0.62.4 && ./configure --prefix=/usr --with-tdsver=7.0 \ --with-unixodbc=/usr/lib && make && make install - ``` ### Compile, or recompile, asterisk so that it will now add support for cel_odbc. @@ -39,7 +37,6 @@ tar -zxvf freetds-0.62.4.tar.gz && cd freetds-0.62.4 && ./configure --prefix=/us ``` make clean && ./configure --with-odbc && make update && make && make install - ``` ### Setup odbc configuration files. @@ -55,7 +52,6 @@ Description = FreeTDS ODBC driver for MSSQL Driver = /usr/lib/libtdsodbc.so Setup = /usr/lib/libtdsS.so FileUsage = 1 - ``` /etc/odbc.ini @@ -70,7 +66,6 @@ port = 1433 database = voipdb tds_version = 7.0 language = us_english - ``` !!! warning @@ -99,7 +94,6 @@ dsn=MSSQL-asterisk username=voipdbuser password=voipdbpass loguniqueid=yes - ``` ### And finally, create the 'cel' table in your mssql database. @@ -125,7 +119,6 @@ CREATE TABLE cel ( [peer] [varchar] (80) NOT NULL , [userfield] [varchar] (255) NOT NULL ) ; - ``` Start asterisk in verbose mode, you should see that asterisk logs a connection to the database and will now record every desired channel event at the moment it occurs. @@ -137,7 +130,6 @@ Start asterisk in verbose mode, you should see that asterisk logs a connection t ``` tar -zxvf freetds-0.62.4.tar.gz && cd freetds-0.62.4 && ./configure --prefix=/usr --with-tdsver=7.0 make && make install - ``` ### Compile, or recompile, asterisk so that it will now add support for cel_tds. @@ -145,7 +137,6 @@ tar -zxvf freetds-0.62.4.tar.gz && cd freetds-0.62.4 && ./configure --prefix=/us ``` make clean && ./configure --with-tds && make update && make && make install - ``` !!! warning @@ -171,7 +162,6 @@ dbname=voipdb user=voipdbuser password=voipdpass charset=BIG5 - ``` ### And finally, create the 'cel' table in your mssql database. @@ -197,7 +187,6 @@ CREATE TABLE cel ( [userfield] [varchar] (255) NULL , [peer] [varchar] (80) NULL ) ; - ``` Start asterisk in verbose mode, you should see that asterisk logs a connection to the database and will now record every call to the database when it's complete. diff --git a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/PostgreSQL-CEL-Backend.md b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/PostgreSQL-CEL-Backend.md index 4491d0befd..9069fb8b83 100644 --- a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/PostgreSQL-CEL-Backend.md +++ b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/PostgreSQL-CEL-Backend.md @@ -21,7 +21,6 @@ dbname=asterisk password=password user=postgres table=cel - ``` Now create a table in postgresql for your cels @@ -51,5 +50,4 @@ CREATE TABLE cel ( userfield varchar (255) NOT NULL , peer varchar (80) NOT NULL ); - ``` diff --git a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/RADIUS-CEL-Backend.md b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/RADIUS-CEL-Backend.md index 881bef88a4..42221dd6c0 100644 --- a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/RADIUS-CEL-Backend.md +++ b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Configuration-Examples/RADIUS-CEL-Backend.md @@ -20,7 +20,6 @@ From ``` root@localhost:/usr/local/src# tar xvfz radiusclient-ng-0.5.2.tar.gz - ``` ##### Compile and install the library: @@ -31,7 +30,6 @@ root@localhost:/usr/local/src# cd radiusclient-ng-0.5.2 root@localhost:/usr/local/src/radiusclient-ng-0.5.2#./configure root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make install - ``` ##### Configuration of the Radiusclient library @@ -43,7 +41,6 @@ File "radiusclient.conf" Open the file and find lines containing the following: ``` authserver localhost - ``` This is the hostname or IP address of the RADIUS server used for authentication. You will have to change this unless the server is running on the same host as your Asterisk PBX. @@ -51,7 +48,6 @@ This is the hostname or IP address of the RADIUS server used for authentication. ``` acctserver localhost - ``` This is the hostname or IP address of the RADIUS server used for accounting. You will have to change this unless the server is running on the same host as your Asterisk PBX. @@ -69,7 +65,6 @@ Each line contains hostname of a RADIUS server and shared secret used in communi ``` File "dictionary" - ``` Asterisk uses some attributes that are not included in the dictionary of radiusclient library, therefore it is necessary to add them. A file called dictionary.digium (kept in the contrib dir) was created to list all new attributes used by Asterisk. Add to the end of the main dictionary @@ -78,7 +73,6 @@ file /usr/local/etc/radiusclient-ng/dictionary the line: ```bash title=" " linenums="1" $INCLUDE /path/to/dictionary.digium - ``` ### Install FreeRADIUS Server (Version 1.1.1) @@ -96,7 +90,6 @@ root@localhost:/usr/local/src# cd freeradius-1.1.1 root@localhost"/usr/local/src/freeradius-1.1.1# ./configure root@localhost"/usr/local/src/freeradius-1.1.1# make root@localhost"/usr/local/src/freeradius-1.1.1# make install - ``` All the configuration files of FreeRADIUS server will be in /usr/local/etc/raddb directory. @@ -114,7 +107,6 @@ Example: ``` client myhost { secret = mysecret shortname = foo } - ``` This fragment allows access from RADIUS clients on "myhost" if they use "mysecret" as the shared secret. The file already contains an entry for localhost (127.0.0.1), so if you are running the RADIUS server on the same host as your Asterisk server, then modify the existing entry instead, replacing the default password. @@ -132,7 +124,6 @@ File /usr/local/etc/raddb/dictionary contains the dictionary of FreeRADIUS serve ```bash title=" " linenums="1" $INCLUDE /path/to/dictionary.digium - ``` That will include the same new attribute definitions that are used in radiusclient-ng library so the client and server will understand each other. diff --git a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Design-Goals.md b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Design-Goals.md index 90b818e0e1..76923fd1dc 100644 --- a/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Design-Goals.md +++ b/docs/Configuration/Reporting/Channel-Event-Logging-CEL/CEL-Design-Goals.md @@ -89,7 +89,6 @@ Note that the actual CEL events below are in CSV format and do not include the ; "EV_CHAN_END","2007-05-09 12:50:13","","152","151","","","","extension","Zap/52-1","Bridged Call","Zap/50-1","DOCUMENTATION","","1178736475.7","","" ;;; 152 channel ends "EV_HANGUP","2007-05-09 12:50:13","fxs.50","150","150","","","h","extension","Zap/50-1","","","DOCUMENTATION","","1178736471.6","","" ;;; 150 hangs up "EV_CHAN_END","2007-05-09 12:50:13","fxs.50","150","150","","","h","extension","Zap/50-1","","","DOCUMENTATION","","1178736471.6","","" ;;; 150 ends - ``` In terms of Manager events, the above Events correspond to the following 80 Manager events shown in the expansion link. @@ -708,7 +707,6 @@ Channel: Zap/50-1 Uniqueid: 1178801218.8 Cause: 16 Cause-txt: Normal Clearing - ``` And, humorously enough, the above 80 manager events, or 42 CEL events, correspond to the following two CDR records (at the moment!): @@ -716,5 +714,4 @@ And, humorously enough, the above 80 manager events, or 42 CEL events, correspon ``` ""fxs.52" 152","152","h","extension","Zap/52-1","Zap/51-1","NoOp","More Hangup message after hopping around"","2007-05-09 17:35:56","2007-05-09 17:36:20","2007-05-09 17:36:36","40","16","ANSWERED","DOCUMENTATION","","1178753756.0","" ""fxs.50" 150","150","152","extension","Zap/50-1","Zap/51-1","NoOp","More Hangup message after hopping around"","2007-05-09 17:37:59","2007-05-09 17:38:06","2007-05-09 17:39:11","72","65","ANSWERED","DOCUMENTATION","","1178753871.3","" - ``` diff --git a/docs/Configuration/WebRTC/Configuring-Asterisk-for-WebRTC-Clients.md b/docs/Configuration/WebRTC/Configuring-Asterisk-for-WebRTC-Clients.md index 946da7550d..3fa3bc1116 100644 --- a/docs/Configuration/WebRTC/Configuring-Asterisk-for-WebRTC-Clients.md +++ b/docs/Configuration/WebRTC/Configuring-Asterisk-for-WebRTC-Clients.md @@ -83,7 +83,6 @@ total 32 -rw------- 1 root root 1736 Mar 4 2019 ca.crt -rw------- 1 root root 3311 Mar 4 2019 ca.key -rw------- 1 root root 123 Mar 4 2019 tmp.cfg - ``` We'll use the `asterisk.crt` and `asterisk.key` files later to configure the HTTP server. @@ -138,7 +137,6 @@ Enabled URI's: /ari/... => Asterisk RESTful API /ws => Asterisk HTTP WebSocket - ``` Note that the HTTPS Server is enabled and bound to `[::]:8089` and that the `/ws` URI is enabled. diff --git a/docs/Configuration/WebRTC/Installing-and-Configuring-CyberMegaPhone.md b/docs/Configuration/WebRTC/Installing-and-Configuring-CyberMegaPhone.md index 62106cc2b3..1fad8a18be 100644 --- a/docs/Configuration/WebRTC/Installing-and-Configuring-CyberMegaPhone.md +++ b/docs/Configuration/WebRTC/Installing-and-Configuring-CyberMegaPhone.md @@ -53,7 +53,6 @@ tlscafile= enablestatic = yes ; Create an alias that will allow us to easily load the client in a web browser. redirect = /cmp2k /static/cyber_mega_phone_2k/index.html - ``` Restart Asterisk or issue the CLI command "`config reload /etc/asterisk/http.conf`" @@ -93,7 +92,6 @@ Enabled URI's: Enabled Redirects: /cmp2k => /static/cyber_mega_phone_2k/index.html - ``` Notice that there's a new Redirect entry. @@ -103,7 +101,6 @@ For security reasons, the HTTP server will not serve arbitrary paths so the `/s ```bash title="Shell Prompt " linenums="1" # cd /var/lib/asterisk/static-http # ln -s /usr/src/asterisk/cyber_mega_phone_2k - ``` OK, let's test. From your web browser, visit `https://pbx.example.com:8089/cmp2k` remembering to substitute your hostname or ip address as appropriate. @@ -140,7 +137,6 @@ allow=opus,g722,ulaw,vp9,vp8,h264 ; we need to indicate the maximum number of streams allowed for audio and video. max_audio_streams = 1 max_video_streams = 15 - ``` You may already have some of the config from previous webrtc endpoints for certificates, keys, encryption, ice support etc and think you don't need to add the magical `webrtc=yes` but you do! The `webrtc=yes` flag does more than just shortcut already existing flags which are needed for proper SFU support. @@ -163,7 +159,6 @@ type=bridge ; SFU is Selective Forwarding Mode ; Basically all participant's video streams are relayed to all other participants. video_mode = sfu - ``` One more change... @@ -180,7 +175,6 @@ Now we need to configure an extension that, when dialed, will put us into the vi ``` [default] exten = my_video_conference,1,Confbridge(MYCONF,default_bridge,default_user,sample_user_menu) - ``` NOW, restart Asterisk! diff --git a/docs/Configuration/WebRTC/WebRTC-tutorial-using-SIPML5.md b/docs/Configuration/WebRTC/WebRTC-tutorial-using-SIPML5.md index f63820ac53..c922969fb6 100644 --- a/docs/Configuration/WebRTC/WebRTC-tutorial-using-SIPML5.md +++ b/docs/Configuration/WebRTC/WebRTC-tutorial-using-SIPML5.md @@ -26,7 +26,6 @@ We'll make a simple dialplan for receiving a test call from the sipml5 client. exten => 200,1,Answer() same => n,Playback(demo-congrats) same => n,Hangup() - ``` This instructs Asterisk to Answer a call to "200," to play a file named "demo-congrats" (included in Asterisk's core sound file packages), and to hang up. To make the extension active, either restart Asterisk or issue a "dialplan reload" command from the Asterisk CLI. @@ -83,7 +82,6 @@ You should see a corresponding connection happen on the Asterisk CLI. You can l ```bash title=" " linenums="1" # asterisk -vvvr - ``` Then, you can LogOut and Login and see something like: @@ -92,7 +90,6 @@ Then, you can LogOut and Login and see something like: == WebSocket connection from '192.168.147.245:49976' for protocol 'sip' accepted using version '13' -- Added contact 'sips:webrtc_client@192.168.147.245:49976;transport=ws;rtcweb-breaker=no' to AOR 'webrtc_client' with expiration of 200 seconds == Endpoint webrtc_client is now Reachable - ``` Make a test call diff --git a/docs/Deployment/Asterisk-Security-Framework/Asterisk-Security-Event-Logger.md b/docs/Deployment/Asterisk-Security-Framework/Asterisk-Security-Event-Logger.md index 4191378978..8fed85d71a 100644 --- a/docs/Deployment/Asterisk-Security-Framework/Asterisk-Security-Event-Logger.md +++ b/docs/Deployment/Asterisk-Security-Framework/Asterisk-Security-Event-Logger.md @@ -7,5 +7,4 @@ In addition to the infrastructure for generating the security events, an event l ``` security_log => security - ``` diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Background-and-WaitExten-Applications.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Background-and-WaitExten-Applications.md index fc71a1daa0..f069ecb18b 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Background-and-WaitExten-Applications.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Background-and-WaitExten-Applications.md @@ -29,5 +29,4 @@ exten => timeout-handler,1) same => n,Dial(${GLOBAL(OPERATOR)},30) same => n,Voicemail(operator@default,${IF($[${DIALSTATUS} = BUSY]?b:u)}) same => n,Hangup() - ``` diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Creating-a-Simple-IVR-Menu.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Creating-a-Simple-IVR-Menu.md index efbc15eec7..165eb5bf9d 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Creating-a-Simple-IVR-Menu.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Creating-a-Simple-IVR-Menu.md @@ -23,14 +23,12 @@ exten => 1,1,Playback(you-entered) exten => 2,1,Playback(you-entered) same => n,SayNumber(2) same => n,Goto(s,loop) - ``` Before we can use the demo menu above, we need to add an extension to the **[docs:users]** context to redirect the caller to our menu. Add this line to the **[docs:users]** context in your dialplan: ``` exten => 6598,1,Goto(demo-menu,s,1) - ``` Reload your dialplan, and then try dialing extension **6598** to test your auto-attendant menu. diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Goto-Application-and-Priority-Labels.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Goto-Application-and-Priority-Labels.md index c44c271252..9435646046 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Goto-Application-and-Priority-Labels.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Goto-Application-and-Priority-Labels.md @@ -28,5 +28,4 @@ exten => start,1,NoOp() exten => start,1,NoOp() same => n,Playback(hello-world) same => n,Hangup() - ``` diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Handling-Special-Extensions.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Handling-Special-Extensions.md index 114405d6bf..3e48611e2b 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Handling-Special-Extensions.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Handling-Special-Extensions.md @@ -28,7 +28,6 @@ exten => i,1,Playback(option-is-invalid) exten => t,1,Playback(are-you-still-there) same => n,Goto(s,loop) - ``` Now dial your auto-attendant menu again (by dialing extension **6598**), and try entering an invalid option (such as **3**) at the auto-attendant menu. If you watch the Asterisk command-line interface while you dial and your verbosity level is three or higher, you should see something similar to the following: @@ -50,7 +49,6 @@ Now dial your auto-attendant menu again (by dialing extension **6598**), and try -- Playing 'press-1.gsm' (language 'en') -- Playing 'or.gsm' (language 'en') -- Playing 'press-2.gsm' (language 'en') - ``` If you don't enter anything at the auto-attendant menu and instead wait approximately ten seconds, you should hear (and see) Asterisk go to the **t** extension as well. diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Record-Application.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Record-Application.md index 7382a554e8..efe24de90f 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Record-Application.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/Record-Application.md @@ -13,7 +13,6 @@ exten => 6597,1,Answer(500) same => n,Wait(1) same => n,Playback(custom-menu) same => n,Hangup() - ``` /// tip | Recording Formats diff --git a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/SayDigits-SayNumber-SayAlpha-and-SayPhonetic-Applications.md b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/SayDigits-SayNumber-SayAlpha-and-SayPhonetic-Applications.md index 6db22bbaf4..17b0dfe842 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/SayDigits-SayNumber-SayAlpha-and-SayPhonetic-Applications.md +++ b/docs/Deployment/Basic-PBX-Functionality/Auto-attendant-and-IVR-Menus/SayDigits-SayNumber-SayAlpha-and-SayPhonetic-Applications.md @@ -16,5 +16,4 @@ exten => 6592,1,SayDigits(123) exten => 6593,1,SayNumber(123) exten => 6594,1,SayAlpha(hello) exten => 6595,1,SayPhonetic(hello) - ``` diff --git a/docs/Deployment/Basic-PBX-Functionality/Creating-Dialplan-Extensions.md b/docs/Deployment/Basic-PBX-Functionality/Creating-Dialplan-Extensions.md index 501989b560..dea07cd1e0 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Creating-Dialplan-Extensions.md +++ b/docs/Deployment/Basic-PBX-Functionality/Creating-Dialplan-Extensions.md @@ -29,7 +29,6 @@ Underneath that context name, we'll create an extesion numbered **6001** which a [from-internal] exten=>6001,1,Dial(SIP/demo-alice,20) exten=>6002,1,Dial(SIP/demo-bob,20) - ``` /// note @@ -48,7 +47,6 @@ After adding that section to **extensions.conf**, go to the Asterisk command-lin '6002' => 1. Dial(SIP/demo-bob,20) [pbx_config] -= 2 extensions (2 priorities) in 1 context. =- - ``` Now we're ready to make a test call! diff --git a/docs/Deployment/Basic-PBX-Functionality/Making-a-Phone-Call.md b/docs/Deployment/Basic-PBX-Functionality/Making-a-Phone-Call.md index aac4937765..094a1f1bc6 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Making-a-Phone-Call.md +++ b/docs/Deployment/Basic-PBX-Functionality/Making-a-Phone-Call.md @@ -12,7 +12,6 @@ server*CLI> -- Executing [6002@from-internal:1] Dial("SIP/demo-alice-0000000 -- SIP/demo-bob-00000001 answered SIP/demo-alice-00000000 -- Native bridging SIP/demo-alice-00000000 and SIP/demo-bob-00000001 == Spawn extension (from-internal, 6002, 1) exited non-zero on 'SIP/demo-alice-00000000' - ``` As you can see, Alice called extension **6002** in the [from-internal] context, which in turn used the **Dial** application to call Bob's phone. Bob's phone rang, and then answered the call. Asterisk then bridged the two calls (one call from Alice to Asterisk, and the other from Asterisk to Bob), until Alice hung up the phone. diff --git a/docs/Deployment/Basic-PBX-Functionality/Registering-Phones-to-Asterisk.md b/docs/Deployment/Basic-PBX-Functionality/Registering-Phones-to-Asterisk.md index d990cc9f4d..76d2c600bc 100644 --- a/docs/Deployment/Basic-PBX-Functionality/Registering-Phones-to-Asterisk.md +++ b/docs/Deployment/Basic-PBX-Functionality/Registering-Phones-to-Asterisk.md @@ -20,7 +20,6 @@ Name/username Host Dyn NAT ACL Port Status demo-alice (Unspecified) D A 5060 Unmonitored demo-bob 192.168.5.105 D A 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] - ``` In the example above, you can see that Alice's phone has not registered, but Bob's phone has registered. @@ -40,5 +39,4 @@ NOTICE[22214]: chan_sip.c:20824 handle_request_register: Registration from '"Ali --- As you can see, Asterisk has detected that the password entered into the phone doesn't match the secret setting in the [demo-alice] section of sip.conf. - ``` diff --git a/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/DUNDi-Dialplan-Functions.md b/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/DUNDi-Dialplan-Functions.md index db0625369c..f3e7633bc9 100644 --- a/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/DUNDi-Dialplan-Functions.md +++ b/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/DUNDi-Dialplan-Functions.md @@ -14,5 +14,4 @@ exten => 1,n,While($[${X} <= ${NUM}]) exten => 1,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID},${X})}) exten => 1,n,Set(X=$[${X} + 1]) exten => 1,n,EndWhile - ``` diff --git a/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/Digium-General-Peering-Agreement.md b/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/Digium-General-Peering-Agreement.md index 9b9482e3e2..1d416ce8a4 100644 --- a/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/Digium-General-Peering-Agreement.md +++ b/docs/Deployment/Distributed-Universal-Number-Discovery-DUNDi/Digium-General-Peering-Agreement.md @@ -502,5 +502,4 @@ member of the Peering System and be able to make Routes available in accordance with this GPA. DUNDi, IAX, Asterisk and GPA are trademarks of Digium, Inc. - ``` diff --git a/docs/Deployment/Enhanced-Messaging/Conference-Bridge-Messaging.md b/docs/Deployment/Enhanced-Messaging/Conference-Bridge-Messaging.md index d7132833ad..9b2d935640 100644 --- a/docs/Deployment/Enhanced-Messaging/Conference-Bridge-Messaging.md +++ b/docs/Deployment/Enhanced-Messaging/Conference-Bridge-Messaging.md @@ -66,7 +66,6 @@ When Bob joins the ConfBridge he receives the ConfbridgeWelcome event: } ] } - ``` In the ConfbridgeWelcome event, the "channels" arrays contains all of the channels currently in the bridge, including Bob himself. In this case, Alice was already in the conference when Bob joined. @@ -98,7 +97,6 @@ The ConfbridgeJoin event is sent to all other participants when someone joins th } ] } - ``` Since this is an event related to a specific participant, the "channels" array just has Bob's channel in it. @@ -136,7 +134,6 @@ enable_events=yes ; If enabled, recipients who joined the bridge via a channel d ; event. The Content-Type header will be ; "application/x-asterisk-confbridge-event+json". ; This feature must also be enabled in user profiles. - ``` Of course, your configuration will be different but those are the parameters that need to be set. diff --git a/docs/Deployment/Enhanced-Messaging/Conference-Participant-Messaging.md b/docs/Deployment/Enhanced-Messaging/Conference-Participant-Messaging.md index 780d832866..04ceb9330c 100644 --- a/docs/Deployment/Enhanced-Messaging/Conference-Participant-Messaging.md +++ b/docs/Deployment/Enhanced-Messaging/Conference-Participant-Messaging.md @@ -91,7 +91,6 @@ CyberMegaPhone.prototype.sendMessage = function (string_msg, options = {} ) { console.log("Dialog Error sending message"); }, }}); - ``` Congratulations, you have just sent a text message! Assuming the user called a conference bridge in the first place, all the other participants should receive it. The code to retrieve the message is even simpler than the code to send it. Once again, in this CyberMegaPhone example, this._ua is the JsSIP.UA instance. @@ -112,5 +111,4 @@ Congratulations, you have just sent a text message! Assuming the user called a that.raise('messageReceived', msg); } }); - ``` diff --git a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Civic-Address.md b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Civic-Address.md index 88ed78f7bd..b0e16a7a00 100644 --- a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Civic-Address.md +++ b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Civic-Address.md @@ -85,7 +85,6 @@ location_refinement = FLR=4, ROOM=4B20 type = profile location_reference = building1 location_refinement = FLR=32, ROOM=32A6 - ``` ### PIDF-LO XML Examples @@ -126,7 +125,6 @@ Here's what Alice's PIDF-LO would look like: 2022-04-22T20:57:29Z - ``` Here's what Bob's PIDF-LO would look like: @@ -165,7 +163,6 @@ Here's what Bob's PIDF-LO would look like: 2022-04-22T20:57:29Z - ``` Note that the only civicAddress difference between the two are the `FLR` and `ROOM`. diff --git a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Geography-Markup-Language.md b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Geography-Markup-Language.md index bc4270cb76..8fe036bb15 100644 --- a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Geography-Markup-Language.md +++ b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/Geography-Markup-Language.md @@ -78,5 +78,4 @@ location_info = shape=Ellipse, crs=2d, pos="39.12345 -105.98766" semiMajorAxis=" location_info = shape=ArcBand, crs=2d, pos="39.12345 -105.98766" innerRadius="1200", outerRadius="1500", startAngle="90", openingAngle="120" location_info = shape=Polygon, crs=2d, pos="39.12345 -105.98766", pos=40.7890 -105.98766", pos="40.7890 -106.3456", pos=39.12345 -106.3456" location_info = shape=Prism, crs=3d, pos="39.12345 -105.98766 1890", pos="40.7890 -105.98766 1890", pos="40.7890 -106.3456 1890", pos=39.12345 -106.3456 1890", height="45" - ``` diff --git a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/URI.md b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/URI.md index b4e9dc53d7..563055270c 100644 --- a/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/URI.md +++ b/docs/Deployment/Geolocation/Asterisk-Geolocation-Implementation/URI.md @@ -30,7 +30,6 @@ location = URI='https://my.company.com/location_query?DID=${CALLERID(num)}' [employees-outbound] type = profile location_reference = did-xref - ``` In pjsip.conf, you'd add a `geoloc_outgoing_call_profile` parameter to your *outgoing* endpoint definition: @@ -40,14 +39,12 @@ In pjsip.conf, you'd add a `geoloc_outgoing_call_profile` parameter to your *out type = endpoint ... geoloc_outgoing_call_profile = employees-outbound - ``` Now let's say that Bob has DID `12125551212` assigned to him and he makes an outgoing call which is routed to "my-provider". Asterisk would automatically add the following header to the INVITE: ``` Geolocation: - ``` The recipient could then make a simply query using that URI and get Bob's location in whatever format was agreed upon with you and them. @@ -74,5 +71,4 @@ exten = _X.,1,Return(0) exten = _X.,1,NoOp(Outgoing call) ; 'b' will run the pre-dial-handler on the outgoing channel. same = n,Dial(PJSIP/${EXTEN},5,b(pre-dial-handler)) - ``` diff --git a/docs/Deployment/Internationalization-and-Localization/Asterisk-Sounds-Packages/About-the-Sounds-Tools.md b/docs/Deployment/Internationalization-and-Localization/Asterisk-Sounds-Packages/About-the-Sounds-Tools.md index 4ecbefb025..f7bcd560cd 100644 --- a/docs/Deployment/Internationalization-and-Localization/Asterisk-Sounds-Packages/About-the-Sounds-Tools.md +++ b/docs/Deployment/Internationalization-and-Localization/Asterisk-Sounds-Packages/About-the-Sounds-Tools.md @@ -16,7 +16,6 @@ The audiofilter application is used by the 'converter' script located in the scr ``` audiofilter -n 0.86916 -1.73829 0.86916 -d 1.00000 -1.74152 0.77536 - ``` The two options -n and -d are 'numerator' and 'denominator'. Per the author, Jean-Marc Valin, "These values are filter coefficients (-n means numerator, -d is denominator) expressed in the z-transform domain. There represent an elliptic filter that I designed with Octave such that 'the result sounds good'." diff --git a/docs/Deployment/PSTN-Connectivity/Signaling-System-Number-7.md b/docs/Deployment/PSTN-Connectivity/Signaling-System-Number-7.md index beed49b808..c62baf91c3 100644 --- a/docs/Deployment/PSTN-Connectivity/Signaling-System-Number-7.md +++ b/docs/Deployment/PSTN-Connectivity/Signaling-System-Number-7.md @@ -64,7 +64,6 @@ You must then do a `make; make install` in each of the directories that you inst --- This should build DAHDI, libss7, and Asterisk with SS7 support. - ``` In the past, there was a special asterisk-ss7 branch to use which contained the SS7 code. That code has been merged back into the trunk version of Asterisk, and the old asterisk-ss7 branch has been deprecated and removed. If you are still using the asterisk-ss7 branch, it will not work against the current version of libss7, and you should switch to asterisk-trunk instead. @@ -116,7 +115,6 @@ sigchan = 48 ; This would put two signalling channels in our linkset, one at ; ISUP traffic. ; End of chan_dahdi.conf - ``` This is how a basic linkset is set up. For more detailed chan_dahdi.conf SS7 config information as well as other options available for that file, see the default chan_dahdi.conf that comes with the samples in asterisk. If you would like, you can do a `make samples` in your asterisk-trunk directory and it will install a sample chan_dahdi.conf for you that contains diff --git a/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Background-on-Translation.md b/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Background-on-Translation.md index 5911d0a657..3d0acdb13c 100644 --- a/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Background-on-Translation.md +++ b/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Background-on-Translation.md @@ -13,7 +13,6 @@ A +------------+ B | Asterisk | ulaw--->slin--->GSM--->| |<---GSM +------------+ - ``` The arrows indicate the direction of audio flow. Each channel has a write path (the top arrow) and a read path (the bottom arrow). In this setup, PLC can be used when sending audio to A, but it cannot be used when sending audio to B. The reason is simple, the write path to A's channel contains a slin step, but the write path to B contains no slin step. Such a translation setup is perfectly valid, and Asterisk can potentially set up such a path depending on circumstances. When we use PLC, however, we want slin audio to be present on the write paths of both A and B. A visual representation of what we want is the following: @@ -26,7 +25,6 @@ A +------------+ B | Asterisk | ulaw--->slin--->| |<---slin<---GSM +------------+ - ``` In this scenario, the write paths for both A and B begin with slin, and so PLC may be applied to either channel. This translation behavior has, in the past been doable with the transcode_via_sln option in asterisk.conf. Recent changes to the PLC code have also made the `genericplc` option in codecs.conf imply the `transcode_via_sln` option. The result is that by enabling `genericplc` in codecs.conf, the translation path set up in Fig. 2 should automatically be used as long as the two codecs required transcoding in the first place. diff --git a/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Tips.md b/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Tips.md index de2af2d13b..5984e17013 100644 --- a/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Tips.md +++ b/docs/Deployment/Packet-Loss-Concealment-PLC/PLC-Tips.md @@ -10,7 +10,6 @@ One of the restrictions mentioned is that PLC will only be used when two audio c [example] exten => 1,1,Playback(tt-weasels) exten => 2,1,Dial(Local/1@example/nj) - ``` When dialing extension 1, PLC cannot be used because there will be only a single channel involved. When dialing extension 2, however, Asterisk will create a bridge between the incoming channel and the Local channel, thus allowing PLC to be used. diff --git a/docs/Deployment/Performance-Tuning/Performance-Tuning-Asterisk-Versions-20.17.0-22.7.0-and-23.1.0.md b/docs/Deployment/Performance-Tuning/Performance-Tuning-Asterisk-Versions-20.17.0-22.7.0-and-23.1.0.md index 4171afb2ff..e8e5f87fc2 100644 --- a/docs/Deployment/Performance-Tuning/Performance-Tuning-Asterisk-Versions-20.17.0-22.7.0-and-23.1.0.md +++ b/docs/Deployment/Performance-Tuning/Performance-Tuning-Asterisk-Versions-20.17.0-22.7.0-and-23.1.0.md @@ -54,7 +54,6 @@ threadpool_idle_timeout=120 ; attempting to use more memory than can be allocated to a 32-bit process. If memory starts ; increasing, lowering this value might actually help. threadpool_max_size=100 - ``` ### Stasis Threadpool @@ -72,7 +71,6 @@ idle_timeout_sec = 120 ; The notes about the pjsip max size apply here as well. Increasing to 100 threads is probably ; safe, but anything more will probably cause the same thrashing and memory over-utilization, max_size = 60 - ``` If you don't need AMI, CDR, or CEL then disabling those modules will reduce resource usage. The CDR module uses a lot of processing to create the CDR records and can easily get backed up on a busy system. @@ -102,7 +100,6 @@ timer_t1=100 ; memory so on a busy PBX, a setting of 32 seconds will probably result in higher than ; necessary memory utilization. For most installations, 6400ms is fine. timer_b=6400 - ``` ### Identification Priority @@ -117,7 +114,6 @@ type=global ; The order should be from the most likely to be used, to the least likely to be used ; which in this case would put username first for the phones, and ip second for providers. endpoint_identifier_order=username,ip,anonymous - ``` ## Sorcery/Database @@ -176,7 +172,6 @@ identify=realtime,ps_endpoint_id_ips ; the provider requires them. registration/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=900 registration=realtime,ps_registrations - ``` ### Flushing the caches: diff --git a/docs/Deployment/Performance-Tuning/index.md b/docs/Deployment/Performance-Tuning/index.md index f3fd251f67..10fe5e0244 100644 --- a/docs/Deployment/Performance-Tuning/index.md +++ b/docs/Deployment/Performance-Tuning/index.md @@ -44,7 +44,6 @@ taskpool_idle_timeout=60 ; Number of seconds before an idle taskprocessor ; should be disposed of (default: "60") taskpool_max_size=50 ; Maximum number of taskprocessors in the res_pjsip taskpool ; A value of 0 indicates no maximum (default: "50") - ``` ### Stasis Taskpool @@ -62,7 +61,6 @@ idle_timeout_sec = 20 ; Number of seconds a taskprocessor should be idle befor max_size = 50 ; Maximum number of taskprocessors in the Stasis taskpool. ; 0 means no limit to the number of taskprocessors in the ; taskpool. - ``` Just like threadpool, things that you don't need should be disabled to improve performance. For example, the AMI, CDR, and CEL modules can be quite taxing. It's best to disable them if they aren't being used. @@ -92,7 +90,6 @@ timer_t1=100 ; memory so on a busy PBX, a setting of 32 seconds will probably result in higher than ; necessary memory utilization. For most installations, 6400ms is fine. timer_b=6400 - ``` ### Identification Priority @@ -107,7 +104,6 @@ type=global ; The order should be from the most likely to be used, to the least likely to be used ; which in this case would put username first for the phones, and ip second for providers. endpoint_identifier_order=username,ip,anonymous - ``` ## Sorcery/Database @@ -166,7 +162,6 @@ identify=realtime,ps_endpoint_id_ips ; the provider requires them. registration/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=900 registration=realtime,ps_registrations - ``` ### Flushing the caches: diff --git a/docs/Deployment/Phone-Provisioning-in-Asterisk/Configuration-of-users.conf.md b/docs/Deployment/Phone-Provisioning-in-Asterisk/Configuration-of-users.conf.md index 283a2557c0..ca618599ef 100644 --- a/docs/Deployment/Phone-Provisioning-in-Asterisk/Configuration-of-users.conf.md +++ b/docs/Deployment/Phone-Provisioning-in-Asterisk/Configuration-of-users.conf.md @@ -19,7 +19,6 @@ To enable auto-provisioning of a phone, the user in users.conf needs to have: autoprov=yes macaddress=deadbeef4dad profile=polycom - ``` The profile is optional if a default_profile is set in phoneprov.conf. The following is a sample users.conf entry, with the template variables commented next to the settings: @@ -49,7 +48,6 @@ username = 6001 ; ${USERNAME} macaddress = deadbeef4dad ; ${MAC} label = 6001 ; ${LABEL} cid_number = 6001 ; ${CALLERID} - ``` The variables above, are the user-specfic variables that can be substituted into dynamic filenames and config templates. diff --git a/docs/Deployment/Phone-Provisioning-in-Asterisk/Creating-Phone-Profiles.md b/docs/Deployment/Phone-Provisioning-in-Asterisk/Creating-Phone-Profiles.md index 001f72e490..a28421ae0a 100644 --- a/docs/Deployment/Phone-Provisioning-in-Asterisk/Creating-Phone-Profiles.md +++ b/docs/Deployment/Phone-Provisioning-in-Asterisk/Creating-Phone-Profiles.md @@ -21,7 +21,6 @@ ${TOLOWER(${MAC})}.cfg => 000000000000.cfg ${TOLOWER(${MAC})}-phone.cfg => 000000000000-phone.cfg config/ ${TOLOWER(${MAC})} => polycom.xml ${TOLOWER(${MAC})}-directory.xml => 000000000000-directory.xml - ``` A static_file is set by specifying the file name, relative to AST_DATA_DIR/phoneprov. The mime-type of the file can optionally be specified after a comma. If staticdir is set, all static files will be relative to the subdirectory of AST_DATA_DIR/phoneprov specified. diff --git a/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/Installing-Blink-SIP-client.md b/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/Installing-Blink-SIP-client.md index 97e2f7784c..e95aacb64e 100644 --- a/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/Installing-Blink-SIP-client.md +++ b/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/Installing-Blink-SIP-client.md @@ -21,7 +21,6 @@ Install some dependencies ``` sudo apt-get update sudo apt-get install python-sipsimple python-gnutls python-eventlib python-application python-cjson python-eventlet python-qt4 python-twisted-core python-zope.interface - ``` If you have issues see: @@ -45,7 +44,6 @@ running install_data running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/blink-0.6.0.egg-info Writing /usr/local/lib/python2.7/dist-packages/blink-0.6.0.egg-info - ``` Run Blink! ---------- @@ -56,7 +54,6 @@ Run Blink! root@newtonr-laptop:/usr/src/blink-0.6.0# blink using set_wakeup_fd "sni-qt/6493" WARN 08:11:15.444 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE - ``` 2. Blink should launch and show up within your graphical desktop. diff --git a/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/index.md b/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/index.md index d5eea97bbd..ef8f60770f 100644 --- a/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/index.md +++ b/docs/Deployment/Secure-Calling/Secure-Calling-Tutorial/index.md @@ -29,14 +29,12 @@ First, let's make a place for our keys. ``` mkdir /etc/asterisk/keys - ``` Next, use the "ast_tls_cert" script in the "contrib/scripts" Asterisk source directory to make a self-signed certificate authority and an Asterisk certificate. ``` ./ast_tls_cert -C pbx.mycompany.com -O "My Super Company" -d /etc/asterisk/keys -b 2048 - ``` * The "-C" option is used to define our host - DNS name or our IP address. @@ -53,7 +51,6 @@ Next, we generate a client certificate for our SIP device. ``` ./ast_tls_cert -m client -c /etc/asterisk/keys/ca.crt -k /etc/asterisk/keys/ca.key -C phone1.mycompany.com -O "My Super Company" -d /etc/asterisk/keys -o malcolm -b 2048 - ``` * The "-m client" option tells the script that we want a client certificate, not a server certificate. @@ -81,7 +78,6 @@ ca.cfg ca.crt ca.key tmp.cfg - ``` Next, copy the malcolm.pem and ca.crt files to the computer running the Blink soft client. @@ -94,7 +90,6 @@ Next, copy the malcolm.pem and ca.crt files to the computer running the Blink so # openssl pkcs12 -export -out MySuperClientCert.p12 -inkey ca.key -in ca.crt -certfile asterisk.crt --- - ``` Asterisk chan_pjsip configuration @@ -112,7 +107,6 @@ bind=0.0.0.0:5061 cert_file=/etc/asterisk/keys/asterisk.crt priv_key_file=/etc/asterisk/keys/asterisk.key method=sslv23 - ``` Note the **protocol**, **cert_file**, **priv_key_file**, and **method** options. Here, we're using the TLS protocol, we're specifying the keys that we generated earlier for **cert_file** and **priv_key_file** and we're setting the **method** to SSLv23. @@ -140,7 +134,6 @@ disallow=all allow=g722 dtmf_mode=rfc4733 media_encryption=sdes - ``` Note the **media_encryption** option for the endpoint. In this case, we've configured an endpoint that will be using SDES encryption for RTP. @@ -159,7 +152,6 @@ tlsenable=yes tlsbindaddr=0.0.0.0 tlscertfile=/etc/asterisk/keys/asterisk.pem tlscafile=/etc/asterisk/keys/ca.crt - ``` Here, we're enabling TLS support. @@ -176,7 +168,6 @@ dtmfmode=rfc2833 disallow=all allow=g722 transport=tls - ``` Notice the **transport** option. The Asterisk SIP channel driver supports three types: udp, tcp and tls. Since we're configuring for TLS, we'll set that. It's also possible to list several supported transport types for the peer by separating them with commas. @@ -211,7 +202,6 @@ Depending on your Asterisk CLI logging levels, you should see something like: ``` -- Registered SIP 'malcolm' at 10.24.250.178:5061 > Saved useragent "Blink 0.22.2 (MacOSX)" for peer malcolm - ``` Notice that we registered on port 5061, the TLS port. @@ -230,7 +220,6 @@ When calling **from** Asterisk to Blink or another client, you might run into an ``` [Jan 29 16:04:11] DEBUG[11217]: tcptls.c:248 handle_tcptls_connection: SSL Common Name compare s1='10.24.18.124' s2='phone1.mycompany.com' [Jan 29 16:04:11] ERROR[11217]: tcptls.c:256 handle_tcptls_connection: Certificate common name did not match (10.24.18.124) - ``` This is the opposite scenario, where Asterisk is acting as the client and by default attempting to verify the destination server against the cert. @@ -243,7 +232,6 @@ You can set **tlsdontverifyserver=yes** in sip.conf to prevent Asterisk from att ; a client. If you don't have the server's CA certificate you can ; set this and it will connect without requiring tlscafile to be set. ; Default is no. - ``` Part 2 (SRTP) @@ -255,7 +243,6 @@ SRTP support is provided by libsrtp. libsrtp has to be installed on the machine ``` [Jan 24 09:29:16] ERROR[10167]: chan_sip.c:27987 setup_srtp: No SRTP module loaded, can't setup SRTP session. - ``` on your Asterisk CLI. If you do see that, install libsrtp (and the development headers), and then reinstall Asterisk (./configure; make; make install). @@ -274,7 +261,6 @@ allow=g722 transport=tls encryption=yes context=local - ``` Next, we'll set Blink to use SRTP: diff --git a/docs/Deployment/Troubleshooting/Troubleshooting-Asterisk-Module-Loading.md b/docs/Deployment/Troubleshooting/Troubleshooting-Asterisk-Module-Loading.md index 56a1239364..e00b2c7c56 100644 --- a/docs/Deployment/Troubleshooting/Troubleshooting-Asterisk-Module-Loading.md +++ b/docs/Deployment/Troubleshooting/Troubleshooting-Asterisk-Module-Loading.md @@ -13,7 +13,6 @@ Example`:` ``` No such command 'sip show peers' - ``` We can presume that something is wrong with **chan_sip** module since we know it provides the 'sip' commands and sub-commands. @@ -47,7 +46,6 @@ Previous to Asterisk 12, you could only see if the module is loaded. However it Module Description Use Count chan_sip.so Session Initiation Protocol (SIP) 0 1 modules loaded - ``` In Asterisk 12 and beyond you can quickly see if a module is loaded and whether it is running or not. @@ -57,7 +55,6 @@ In Asterisk 12 and beyond you can quickly see if a module is loaded and whether Module Description Use Count Status chan_sip.so Session Initiation Protocol (SIP) 0 Not Running 1 modules loaded - ``` Make sure Asterisk is configured to load the module @@ -71,7 +68,6 @@ Verify that there is **not** a '**noload'** line for the module that is failing ``` noload => chan_sip.so - ``` That would tell Asterisk not to load chan_sip.so. @@ -80,7 +76,6 @@ If you are not using **autoload**, then be sure you have a **load** line for the ``` load => chan_sip.so - ``` Check For Module Loading Issues on Asterisk Startup @@ -94,14 +89,12 @@ Be sure Asterisk is stopped to avoid issues with making the logs confusing. ``` asterisk -rx "core stop now" - ``` or ``` service asterisk stop - ``` ### Enable logging channels @@ -111,7 +104,6 @@ You can read in detail about [Logging facilities](/Operation/Logging) on the wik ``` [logfiles] full => notice,warning,error,debug,verbose - ``` ### Clear out old logs @@ -122,7 +114,6 @@ Remove the most recent log file, or else move it somewhere you want to keep it. ```bash title=" " linenums="1" # rm /var/log/asterisk/full - ``` ### Start Asterisk with appropriate log levels @@ -131,7 +122,6 @@ It is important to start Asterisk with [log levels](/Operation/Logging/Basic-Log ```bash title=" " linenums="1" # asterisk -cvvvvvddd - ``` You'll see a lot of information output in the terminal as Asterisk loads. @@ -142,7 +132,6 @@ After the output calms down and Asterisk has finished loading, go ahead and stop ``` *CLI> core stop now - ``` ### Search logs for lines related to suspect module @@ -162,7 +151,6 @@ Search the [log file](/Fundamentals/Directory-and-File-Structure) using keywords [Oct 9 14:54:55] DEBUG[21809] config.c: Parsing /etc/asterisk/sip.conf [Oct 9 14:54:55] VERBOSE[21809] config.c: == Parsing '/etc/asterisk/sip.conf': Found [Oct 9 14:54:55] WARNING[21809] config.c: parse error: No category context for line 1 of /etc/asterisk/sip.conf - ``` Based on the lines found, you can then use an editor like VIM to view the full log and jump to where the relevant messages are. @@ -173,14 +161,12 @@ Based on the lines found, you can then use an editor like VIM to view the full l [Oct 9 14:54:43] VERBOSE[21809] config.c: == Parsing '/etc/asterisk/sip.conf': Found [Oct 9 14:54:43] WARNING[21809] config.c: parse error: No category context for line 1 of /etc/asterisk/sip.conf [Oct 9 14:54:43] ERROR[21809] chan_sip.c: Contents of sip.conf are invalid and cannot be parsed - ``` In this case, not much more is revealed past what we saw with grep. You can see that Asterisk tries to load and run chan_sip, it fails because the contents of sip.conf are invalid and cannot be parsed. The most specific clue is the WARNING: ``` WARNING[21809] config.c: parse error: No category context for line 1 of /etc/asterisk/sip.conf - ``` ### Edit the related config file to resolve the issue @@ -191,7 +177,6 @@ If we look at line 1 of sip.conf we'll spot the root problem. general] context=public allowoverlap=no - ``` For our example, a square bracket is missing from the context definition! Fix this issue, restart Asterisk and things should work assuming I don't have any other syntax errors. diff --git a/docs/Deployment/Troubleshooting/Unable-to-connect-to-remote-Asterisk.md b/docs/Deployment/Troubleshooting/Unable-to-connect-to-remote-Asterisk.md index db2a31f70c..59829d61d0 100644 --- a/docs/Deployment/Troubleshooting/Unable-to-connect-to-remote-Asterisk.md +++ b/docs/Deployment/Troubleshooting/Unable-to-connect-to-remote-Asterisk.md @@ -12,7 +12,6 @@ You may see the below message after running some variation of `asterisk -r` ``` Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) - ``` First, let's break down the message. diff --git a/docs/Development/Debugging/CLI-commands-useful-for-debugging.md b/docs/Development/Debugging/CLI-commands-useful-for-debugging.md index d0e44da911..4842b1c0c0 100644 --- a/docs/Development/Debugging/CLI-commands-useful-for-debugging.md +++ b/docs/Development/Debugging/CLI-commands-useful-for-debugging.md @@ -51,7 +51,6 @@ ubuntu*CLI> core show locks === ------------------------------------------------------------------- === ======================================================================= - ``` Example output with DEBUG_THREADS and BETTER_BACKTRACES @@ -85,7 +84,6 @@ ubuntu*CLI> core show locks === ------------------------------------------------------------------- === ======================================================================= - ``` ### core show taskprocessors @@ -107,7 +105,6 @@ ubuntu*CLI> core show taskprocessors iax2_transmit 0 0 0 +---------------------+-----------------+------------+-------------+ 7 taskprocessors - ``` Example command output (Asterisk 13) @@ -140,7 +137,6 @@ subp:PJSIP/linphone-00000022 3 0 1 450 500 subp:PJSIP/sipp-00000020 3 0 1 450 500 subp:PJSIP/weblooper-00000024 6 0 1 450 500 118 taskprocessors - ``` ### core show threads @@ -162,7 +158,6 @@ ubuntu*CLI> core show threads 0x7f869abdb700 25093 lock_broker started at [ 509] func_lock.c load_module() ... - ``` ### core show fd @@ -186,5 +181,4 @@ Current maxfiles: unlimited 22 chan_unistim.c:6795 (reload_config ): socket(PF_INET,SOCK_DGRAM,"udp") 23 asterisk.c:4489 (main ): pipe({23,24}) 24 asterisk.c:4489 (main ): pipe({23,24}) - ``` diff --git a/docs/Development/Debugging/Function-Tracing.md b/docs/Development/Debugging/Function-Tracing.md index 65e4d630e9..b0984418d8 100644 --- a/docs/Development/Debugging/Function-Tracing.md +++ b/docs/Development/Debugging/Function-Tracing.md @@ -142,7 +142,6 @@ $ sudo perf report -i perf.out --call-graph=none -c asterisk --percentage relati 0.70% 0.76% [kernel.kallsyms] [k] psi_group_change 0.68% 0.59% asterisk [.] utf8_check_first 0.60% 0.72% libasteriskpj.so.2 [.] pj_pool_alloc_from_block - ``` Now the report shows only the instructions directly executed by the function. diff --git a/docs/Development/Debugging/Getting-a-Backtrace-Asterisk-versions-13.14.0-and-14.3.0.md b/docs/Development/Debugging/Getting-a-Backtrace-Asterisk-versions-13.14.0-and-14.3.0.md index a97b1350a3..d05d0673c7 100644 --- a/docs/Development/Debugging/Getting-a-Backtrace-Asterisk-versions-13.14.0-and-14.3.0.md +++ b/docs/Development/Debugging/Getting-a-Backtrace-Asterisk-versions-13.14.0-and-14.3.0.md @@ -24,7 +24,6 @@ If you're not sure if Asterisk is running with the -g option, type the following USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 3018 1.1 2.7 636212 27768 pts/1 Sl+ 08:06 0:00 asterisk -vvvvvg -c [...] - ``` The interesting information is located in the last column. @@ -72,7 +71,6 @@ This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... - ``` If you don't have gdb installed, go install gdb. You should be able to install using something like: apt-get install gdb **or** yum install gdb @@ -84,7 +82,6 @@ If you don't have gdb installed, go install gdb. You should be able to install u ```bash title=" " linenums="1" # gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core > /tmp/backtrace.txt - ``` Now load the core file in gdb with the following command. This will also save the output of gdb to the /tmp/backtract.txt file. @@ -98,7 +95,6 @@ Reading symbols from /usr/lib/asterisk/modules/app_externalivr.so...done. Loaded symbols for /usr/lib/asterisk/modules/app_externalivr.so #0 0x29b45d7e in ?? () (gdb) - ``` In order to make extracting the gdb output easier, you may wish to turn on logging using "set logging on". This command will save all output to the default file of gdb.txt, which in the end can be uploaded as an attachment to the bug tracker. @@ -126,7 +122,6 @@ Now at the gdb prompt, type: bt You would see output similar to: #16 0x40028e51 in pthread_start_thread () from /lib/libpthread.so.0 #17 0x401ec92a in clone () from /lib/libc.so.6 (gdb) - ``` The bt's output is the information that we need on the bug tracker. @@ -173,7 +168,6 @@ No symbol table info available. #17 0x401ec92a in clone () from /lib/libc.so.6 No symbol table info available. (gdb) - ``` The final "extraction" would be to know all traces by all threads. Even if Asterisk runs on the same thread for each call, it could have created some new threads. @@ -203,7 +197,6 @@ Thread 1 (process 26252): #16 0x40028e51 in pthread_start_thread () from /lib/libpthread.so.0 #17 0x401ec92a in clone () from /lib/libc.so.6 (gdb) - ``` That output tells us crucial information about each thread. @@ -222,14 +215,12 @@ Whenever collecting information about a deadlock it is useful to have additional ```bash title=" " linenums="1" # gdb -ex "thread apply all bt" --batch /usr/sbin/asterisk `pidof asterisk` > /tmp/backtrace-threads.txt - ``` **Collecting output from the "core show locks" CLI command :** After getting the backtrace with GDB, immediately run the following command from your Linux shell: ```bash title=" " linenums="1" # asterisk -rx "core show locks" > /tmp/core-show-locks.txt - ``` For more info on: [Locking in Asterisk](/Development/Reference-Information/Other-Reference-Information/Locking-in-Asterisk) @@ -243,7 +234,6 @@ Check your backtrace files to make sure you compiled with **DONT_OPTIMIZE**: ``` - ``` If you are seeing the above text in your backtrace, then you likely haven't compiled with DONT_OPTIMIZE. The impact of DONT_OPTIMIZE is negligible on most systems, so go ahead and enable it as with optimizations the backtraces are often not useful to the developers. Be sure you've enabled the DONT_OPTIMIZE flag within the Compiler Flags section of menuselect. After doing so, be sure to run 'make && make install' and restart Asterisk. @@ -253,7 +243,6 @@ If you are getting a backtrace for a deadlock then be sure you compiled with **D ```bash title=" " linenums="1" #2 0x0813c6c7 in ast_reentrancy_lock (lt=0x6b736972) at /usr/local/src/asterisk-11.14/asterisk-11.14.0-rc1/include/asterisk/lock.h:420 res = 135518668 - ``` If unsure, simply add the [compiler flag in menuselect](/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Using-Menuselect-to-Select-Asterisk-Options) and [recompile then reinstall Asterisk](/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Building-and-Installing-Asterisk). diff --git a/docs/Development/Debugging/MALLOC_DEBUG-Compiler-Flag.md b/docs/Development/Debugging/MALLOC_DEBUG-Compiler-Flag.md index 9943dd8fab..f527a53e8c 100644 --- a/docs/Development/Debugging/MALLOC_DEBUG-Compiler-Flag.md +++ b/docs/Development/Debugging/MALLOC_DEBUG-Compiler-Flag.md @@ -37,7 +37,6 @@ Click to show usage... Usage: memory show summary [] Summarizes heap memory allocations by file, or optionally by line, if a file is specified. - ``` * memory show allocations @@ -49,7 +48,6 @@ Usage: memory show allocations [|anomalies] Defaults to listing all memory allocations. - Restricts output to memory allocated by the file. anomalies - Only check for fence violations. - ``` * memory atexit list @@ -58,7 +56,6 @@ Click to show usage... ``` Usage: memory atexit list {on|off} Enable dumping a list of still allocated memory segments at exit. - ``` * memory atexit summary @@ -72,7 +69,6 @@ Usage: memory atexit summary {off|byline|byfunc|byfile} byfunc - Enable at exit summary by function name. byfile - Enable at exit summary by file. Note: byline, byfunc, and byfile are cumulative enables. - ``` * memory backtrace @@ -83,5 +79,4 @@ Usage: memory backtrace {on|off} Enable dumping an allocation backtrace with memory diagnostics. Note that saving the backtrace data for each allocation can be CPU intensive. - ``` diff --git a/docs/Development/Debugging/Reference-Count-Debugging.md b/docs/Development/Debugging/Reference-Count-Debugging.md index 1c38889f25..265a20a56c 100644 --- a/docs/Development/Debugging/Reference-Count-Debugging.md +++ b/docs/Development/Debugging/Reference-Count-Debugging.md @@ -12,7 +12,6 @@ Below is an example 'bad magic number' log message: ``` astobj2.c: bad magic number for object 0xfb5230. Object is likely destroyed - ``` In such cases, its often very useful to determine what in Asterisk manipulated the reference count on the object. The `astobj2` API supports creating a reference count log for all objects managed by the API. @@ -73,7 +72,6 @@ Options: -s, --suppress-skewed If specified, don't output objects with a skewed lifetime - ``` Interpreting a Raw Reference Count Log @@ -98,7 +96,6 @@ Each change in the reference count value of an `ao2` object will generate one li 0x7f9dbc002048,-1,19256,chan_sip.c,3335,dialog_unlink_all,2,when you delete the autokillid sched, you should dec the refcount for the stored dialog ptr 0x7f9dbc002048,-1,19256,chan_sip.c,3352,dialog_unlink_all,**destructor**,Let's unbump the count in the unlink so the poor pvt can disappear if it is time ... - ``` * The first column is the object address. diff --git a/docs/Development/Debugging/Using-the-Hoard-Memory-Allocator-with-Asterisk.md b/docs/Development/Debugging/Using-the-Hoard-Memory-Allocator-with-Asterisk.md index aeec909c6b..d8630d0c75 100644 --- a/docs/Development/Debugging/Using-the-Hoard-Memory-Allocator-with-Asterisk.md +++ b/docs/Development/Debugging/Using-the-Hoard-Memory-Allocator-with-Asterisk.md @@ -20,7 +20,6 @@ For example: ``` ./configure --with-hoard=/usr/src/hoard-371/src/ - ``` Note that we don't specify the full path to libhoard.so, just the directory where it resides. @@ -36,5 +35,4 @@ Run the standard build commands: ```bash title=" " linenums="1" # make # make install - ``` diff --git a/docs/Development/Open-Features-and-Improvements.md b/docs/Development/Open-Features-and-Improvements.md index 1ff53d657d..b758c88d73 100644 --- a/docs/Development/Open-Features-and-Improvements.md +++ b/docs/Development/Open-Features-and-Improvements.md @@ -11,7 +11,6 @@ JIRA filter used for this list: project = ASTERISK AND issuetype in (Improvement, "New Feature") AND status in (Open, Reopened, Triage) AND NOT reporter in (membersOf("digium")) ORDER BY created DESC - ``` Community Reported Features and Improvements in Open Status diff --git a/docs/Development/Policies-and-Procedures/Asterisk-Sounds-Submission-Process.md b/docs/Development/Policies-and-Procedures/Asterisk-Sounds-Submission-Process.md index 3e62f142c9..06d02c353c 100644 --- a/docs/Development/Policies-and-Procedures/Asterisk-Sounds-Submission-Process.md +++ b/docs/Development/Policies-and-Procedures/Asterisk-Sounds-Submission-Process.md @@ -42,7 +42,6 @@ Example: Financial Contributions by: Digium, Inc. (http://www.digium.com) bash-3.2# - ``` 5. Create a file called "LICENSE" and include the license text (listed below these instructions) which are the Creative Commons Attribution-ShareAlike v3 license terms. 6. Ensure you have a .txt file that describes all of the sound files by name and by textual description. **UTF-8 is mandatory**. See "core-sounds-en.txt" as a template. Another option (possibly easier and preferred) is to submit an OpenOffice ODS formatted spreadsheet with three columns (Col 1: module name most associated with file, col 2: filename in ASCII, col 3: text of sound file in your localized language - see doc/lang/*.ods for examples) and it will be converted during import to UTF-8 format. @@ -418,5 +417,4 @@ Creative Commons Notice Creative Commons may be contacted at http://creativecommons.org/ -- end printout -- - ``` diff --git a/docs/Development/Policies-and-Procedures/Commit-Messages.md b/docs/Development/Policies-and-Procedures/Commit-Messages.md index 226bc4efb0..4983159dd9 100644 --- a/docs/Development/Policies-and-Procedures/Commit-Messages.md +++ b/docs/Development/Policies-and-Procedures/Commit-Messages.md @@ -86,5 +86,4 @@ UserNote: The Foo dialplan application now takes an additional argument UpgradeNote: The X argument to the OldFoo application has been removed and will cause an error if supplied. - ``` diff --git a/docs/Development/Policies-and-Procedures/Release-Management.md b/docs/Development/Policies-and-Procedures/Release-Management.md index 5eb1dcd151..9ebd2a48b4 100644 --- a/docs/Development/Policies-and-Procedures/Release-Management.md +++ b/docs/Development/Policies-and-Procedures/Release-Management.md @@ -137,7 +137,6 @@ Detail: UserNote: The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used by itself or in conert with the existing AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion. - ``` To keep the Release Announcements posted to the mailing lists and community forums brief, they won't contain the detail commit section. diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Asterisk-Channel-Data-Stores.md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Asterisk-Channel-Data-Stores.md index dba6d63565..f6793830e7 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Asterisk-Channel-Data-Stores.md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Asterisk-Channel-Data-Stores.md @@ -20,7 +20,6 @@ static const struct example_datastore { .type = "example", .destroy = callback_destroy }; - ``` This is a needed structure that contains information about a datastore, it's used by many API calls. @@ -52,7 +51,6 @@ struct ast_datastore *datastore = NULL; datastore = ast_datastore_alloc(&example_datastore, NULL); datastore->data = mysillydata; ast_channel_datastore_add(chan, datastore); - ``` !!! note diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Create-a-new-resource-with-ARI.md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Create-a-new-resource-with-ARI.md index 5cc900bdae..f569f2b494 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Create-a-new-resource-with-ARI.md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Create-a-new-resource-with-ARI.md @@ -56,7 +56,6 @@ true{ } } } - ``` Add it to `resources.json` @@ -84,7 +83,6 @@ diffIndex: rest-api/resources.json } ] } - ``` Generate the code @@ -106,7 +104,6 @@ Writing ./res/res_ari_fizzbuzz.c Writing ./res/ari/resource_fizzbuzz.h Writing ./res/ari/resource_fizzbuzz.c Writing ./res/ari.make - ``` Implement the API @@ -153,7 +150,6 @@ void ast_ari_fizzbuzz(struct ast_variable *headers, } ast_ari_response_ok(response, json); } - ``` Recommended practices diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/External-Media-and-ARI.md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/External-Media-and-ARI.md index c0d27f4a64..74ed3b9b2c 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/External-Media-and-ARI.md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/External-Media-and-ARI.md @@ -43,7 +43,6 @@ An example request: ``` POST /channels/externalMedia?app=MyApp&external_host=127.0.0.1%3A60000&format=ulaw # The %3A is the encoding for the ':' host/port separator. - ``` The returned object will be an ExternalMedia object that contains a standard Channel object that can be operated on like any other channel. The most common scenario will be to add it to a bridge. Once you're done with the channel, simply DELETE it to hang it up. diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Modules.md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Modules.md index 1ff6f64f89..9cf6eb81f3 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Modules.md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Modules.md @@ -11,7 +11,6 @@ Load Module ``` static int load_module(): - ``` Module loading including tests for configuration or dependencies. This function can return **AST_MODULE_LOAD_FAILURE**, **AST_MODULE_LOAD_DECLINE**, or **AST_MODULE_LOAD_SUCCESS**. If a dependency or environment variable fails tests return **AST_MODULE_LOAD_FAILURE**. If the module can not load the configuration file or other non-critical problem return **AST_MODULE_LOAD_DECLINE**. On success return **AST_MODULE_LOAD_SUCCESS**. @@ -43,7 +42,6 @@ static int load_module(void) return AST_MODULE_LOAD_SUCCESS; } - ``` Unload Module @@ -52,7 +50,6 @@ Unload Module ``` static int unload_module(): - ``` The module will soon be unloaded. If any channels are using your features, you should give them a softhangup in an effort to keep the program from crashing. Generally, unload_module is only called when the usecount is 0 or less, but the user can force unloading at their discretion, and thus a module should do its best to comply (although in some cases there may be no way to avoid a crash). This function should return 0 on success and non-zero on failure (i.e. it cannot yet be unloaded). @@ -73,7 +70,6 @@ static int unload_module(void) return 0; } - ``` Module Information @@ -84,7 +80,6 @@ Module Information AST_MODULE_INFO_STANDARD(keystr, desc); ... or ... AST_MODULE_INFO(keystr, flags_to_set, desc, load_func, unload_func, reload_func, load_pri); - ``` **AST_MODULE_INFO_STANDARD** diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Templates-for-ao2-hash-sort-and-callback-functions..md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Templates-for-ao2-hash-sort-and-callback-functions..md index 116437505a..e4ea77e1f0 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Templates-for-ao2-hash-sort-and-callback-functions..md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Templates-for-ao2-hash-sort-and-callback-functions..md @@ -50,7 +50,6 @@ int ao2_hash_fn(const void *obj, int flags) } return ast_str_hash(key); } - ``` ### Sort Function @@ -85,7 +84,6 @@ int ao2_sort_fn(const void *obj_left, const void *obj_right, int flags) } return cmp; } - ``` ### Sorted vs. Unsorted Container Searching @@ -107,7 +105,6 @@ int ao2_callback_fn_sorted_cmp(void *obj, void *arg, int flags) { return CMP_MATCH; } - ``` Unsorted containers must do more work selecting objects since traversals will either traverse the whole container or one hash bucket. @@ -153,5 +150,4 @@ int ao2_callback_fn_unsorted_cmp(void *obj, void *arg, int flags) */ return ao2_callback_fn_sorted_cmp(obj, arg, flags); } - ``` diff --git a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Using-the-Configuration-Framework.md b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Using-the-Configuration-Framework.md index 998f33fcca..86dca75b64 100644 --- a/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Using-the-Configuration-Framework.md +++ b/docs/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Using-the-Configuration-Framework.md @@ -55,7 +55,6 @@ my_module.conf foobar = True foo = 1 bar = Some string value - ``` So that's fairly straight forward. How would we consume it in a module in Asterisk? @@ -137,7 +136,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "my_module", .reload = reload_module, .load_pri = AST_MODPRI_DEFAULT, ); - ``` That's fairly simple. So, what do we have? @@ -222,7 +220,6 @@ cleanup: ast_config_destroy(cfg); return res; } - ``` The function `load_configuration` boils down to two operations: @@ -247,7 +244,6 @@ A Bad my_module.conf foobar = False foo = Oh snap I'm not an integer bar = I'm a new string value - ``` Since `foo` is a string and not an integer, the `load_configuration` function will fail and cause the module reload operation to be declined. Ideally, if that happens, none of the values in the module should change - we don't want operations currently using the module to start having weird behavior just because an administrator entered some invalid data. What would the actual state of the module be? @@ -263,7 +259,6 @@ Resulting Values in the Module after the Failed Load foobar = False foo = 1 bar = Some string value - ``` Yikes. @@ -394,7 +389,6 @@ cleanup: } /* ... module callback handlers .. */ - ``` So, that's a little bit better, and now we can guarantee that a reload won't mess with `log_module_values`. That's nice, but now we have to put a lock around every access to `foo`, `bar`, and `foobar`. That can get tricky - and expensive - very quickly. And it doesn't solve the previous problem of inconsistent module state when an off nominal reload occurs. @@ -457,7 +451,6 @@ static struct aco_type general_option { .category = "^general$", .category_match = ACO_WHITELIST, }; - ``` So, that looks different! Let's run down what we have. @@ -502,7 +495,6 @@ static void module_config_destructor(void *obj) struct module_config *cfg = obj; ao2_cleanup(cfg->general); } - ``` Note that as part of creating the `module_config` object, we also create the general settings object. Because we want the lifetime of the general settings to be tied to the lifetime of the `module_config` object, we explicitly handle its destruction in `module_config_destructor`, rather than pass a destructor function to `ao2_alloc` when we create it. @@ -522,7 +514,6 @@ CONFIG_INFO_STANDARD(cfg_info, module_configs, module_config_alloc, ); static struct aco_type *general_options[] = ACO_TYPES(&general_option); - ``` That isn't a lot of code, but what is there does a lot of powerful stuff. Let's go down the list: @@ -586,7 +577,6 @@ load_error: aco_info_destroy(&cfg_info); return AST_MODULE_LOAD_DECLINE; } - ``` Recall that `foo` has to be an integer between `-32` and `32`, and that `foobar` should be a boolean value with a default value of `1`. Using the Configuration Framework, we've specified how we want those parameters to be extracted in `aco_option_register`. Once we've registered the configuration items to be extracted, all of the configuration parsing and loading into the in-memory objects is handled by `aco_process_config`. Once `aco_process_config` is finished, the `module_configs` `ao2` container will have an instance of `module_config` inside of it populated with the configuration information from the configuration file `my_module.conf`. @@ -624,7 +614,6 @@ static int reload_module(void) return 0; } - ``` Let's take those in reverse order. @@ -815,7 +804,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "my_module", .reload = reload_module, .load_pri = AST_MODPRI_DEFAULT, ); - ``` Conclusions diff --git a/docs/Development/Reference-Information/Other-Reference-Information/Alembic-Scripts.md b/docs/Development/Reference-Information/Other-Reference-Information/Alembic-Scripts.md index 996fc1e285..6c4965b2bb 100644 --- a/docs/Development/Reference-Information/Other-Reference-Information/Alembic-Scripts.md +++ b/docs/Development/Reference-Information/Other-Reference-Information/Alembic-Scripts.md @@ -21,7 +21,6 @@ AST_BOOL_VALUES = [ '0', '1', def upgrade(): ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False) op.add_column('ps_aors', sa.Column('remove_unavailable', ast_bool_values)) - ``` Merging Alembic Scripts @@ -47,7 +46,6 @@ Create Date: 2014-03-03 12:26:25.261640 # revision identifiers, used by Alembic. revision = '28887f25a46f' down_revision = '21e526ad3040' <---- change this version to the previous head - ``` 4) If the above fails consult the alembic tutorial here for more information about resolving the conflict in the working with branches section: diff --git a/docs/Development/Reference-Information/Other-Reference-Information/Build-System-Architecture.md b/docs/Development/Reference-Information/Other-Reference-Information/Build-System-Architecture.md index df2ec569fb..644e3353fa 100644 --- a/docs/Development/Reference-Information/Other-Reference-Information/Build-System-Architecture.md +++ b/docs/Development/Reference-Information/Other-Reference-Information/Build-System-Architecture.md @@ -65,5 +65,4 @@ Modules that have a dependency must have a special comment block in them that is /*** MODULEINFO libname * */ - ``` diff --git a/docs/Development/Reference-Information/Other-Reference-Information/Locking-in-Asterisk.md b/docs/Development/Reference-Information/Other-Reference-Information/Locking-in-Asterisk.md index 0e8da60003..cc4995706f 100644 --- a/docs/Development/Reference-Information/Other-Reference-Information/Locking-in-Asterisk.md +++ b/docs/Development/Reference-Information/Other-Reference-Information/Locking-in-Asterisk.md @@ -15,7 +15,6 @@ When more that one lock is involved in a given code path, there is the potential ------------ ------------ Holds Lock A Holds Lock B Waiting for Lock B Waiting for Lock A - ``` In this case, there is a deadlock between threads 1 and 2. This deadlock would have been avoided if both threads had agreed that one must acquire Lock A before Lock B. @@ -64,7 +63,6 @@ c unlock(pvt); lock(ast_channel); lock(pvt); - ``` is *not* correct for two reasons: @@ -83,7 +81,6 @@ while (trylock(ast_channel) == FAILURE) { usleep(1); /* yield to other thread */ lock(pvt); } - ``` Here the trylock() is non blocking, so we do not deadlock if the ast_channel is already locked by someone else: in this case, we try to unlock the PVT (which happens only if the PVT lock counter is 1), yield the CPU to give other threads a chance to run, and then acquire the lock again. @@ -102,7 +99,6 @@ if (trylock(ast_channel) == FAILURE) { lock(ast_channel); lock(pvt); } - ``` which has the same issues as the while(trylock...) code, but just deadlocks instead of looping forever in case of lock counts > 1. @@ -118,7 +114,6 @@ if (trylock(ast_channel) == FAILURE) { lock(pvt); } } - ``` The issue with unexpected unlocks remains, though. @@ -133,7 +128,6 @@ If we are sure that we do not hold any of these locks, then the following constr c lock(MIN(chan1, chan2)); lock(MAX(chan1, chan2)); - ``` That type of code would follow an established locking order of always locking the channel that has a lower address first. Also keep in mind @@ -181,7 +175,6 @@ foo(/* .. */) { unlock(xyz); return ret; } - ``` and call them according to the needs. diff --git a/docs/Development/Reference-Information/Other-Reference-Information/Measuring-SIP-Channel-Performance.md b/docs/Development/Reference-Information/Other-Reference-Information/Measuring-SIP-Channel-Performance.md index b22e4f5d25..9933144a1e 100644 --- a/docs/Development/Reference-Information/Other-Reference-Information/Measuring-SIP-Channel-Performance.md +++ b/docs/Development/Reference-Information/Other-Reference-Information/Measuring-SIP-Channel-Performance.md @@ -39,7 +39,6 @@ context test11 Hangup(); } } - ``` Basically, incoming SIP calls are answered, and the demo-instruct sound file is played endlessly to the caller. This test depends on the calling party to hang up, thus allowing sipp to determine the length of a call. @@ -56,7 +55,6 @@ user=sipp directmedia=no disallow=all allow=ulaw - ``` Note that it's pretty simplistic; no authentication beyond the host ip, and it uses ulaw, which is pretty efficient, low-cpu-intensive codec. @@ -70,7 +68,6 @@ Call processing power is measured with extremely short duration calls: ``` ./sipp -sn uac 192.168.134.252 -s 12 -d 100 -l 256 - ``` The above tells sipp to call your asterisk test machine (192.168.134.252) at extension 12, each call lasts just .1 second, with a limit of 256 simultaneous calls. The simultaneous calls will be the rate/sec of incoming calls times the call length, so 1 simultaneous call at 10 calls/sec, and 45 at 450 calls/sec. Setting the limit to 256 implies you do not intend to test above 2560 calls/sec. @@ -82,7 +79,6 @@ Simultaneous calls can be measured with very long duration calls: ``` ./sipp -sn uac 192.168.134.252 -s 12 -d 100000 -l 270 - ``` This will place 100 sec duration calls to Asterisk. The number of simultaneous calls will increase until the maximum of 270 is reached. If Asterisk survives this number and is not at 100% cpu utilization, you can stop sipp and run it again with a higher -l argument. diff --git a/docs/Development/Reference-Information/Other-Reference-Information/Upgrading-pjproject-Bundled.md b/docs/Development/Reference-Information/Other-Reference-Information/Upgrading-pjproject-Bundled.md index 2a64b817e7..cec2d881a7 100644 --- a/docs/Development/Reference-Information/Other-Reference-Information/Upgrading-pjproject-Bundled.md +++ b/docs/Development/Reference-Information/Other-Reference-Information/Upgrading-pjproject-Bundled.md @@ -28,7 +28,6 @@ The build process for bundled software currently expects tarballs compressed usi --- If you don't see fileformat=unix, you will need to convert formats. - ``` Lastly add the \*.tar.bz2 tarball and checksum file to your repository, push the changes, and then create a pull request on github. @@ -44,7 +43,6 @@ pjproject example ``` $ cp MD5SUM.TXT ~/src/asterisk/third-party/pjproject/pjproject-2.10.tar.bz2.md5 - ``` Be sure to also remove the previous version of that file from the source tree: @@ -55,7 +53,6 @@ pjproject example ``` $ git rm ~/src/asterisk/third-party/pjproject/pjproject-2.9.tar.bz2.md5 - ``` Next modify the *versions.mak* file, which can be found in the third-party directory of your Asterisk directory, to the version number being upgraded to: @@ -66,7 +63,6 @@ pjproject example ``` PJPROJECT_VERSION = 2.10 - ``` Now remove any patches found beneath the ./third-party/{project}/patches directory that have been added since the last version, **and** are now included in this new version. Again, only remove those patches that are currently included in the new version of the released software being upgraded to. diff --git a/docs/Development/Reference-Information/Repotools.md b/docs/Development/Reference-Information/Repotools.md index 484041e26b..d8e971d371 100644 --- a/docs/Development/Reference-Information/Repotools.md +++ b/docs/Development/Reference-Information/Repotools.md @@ -12,7 +12,6 @@ Installation requires that you have repotools checked out (or otherwise availabl ```bash title=" " linenums="1" $ sudo apt-get install expect - ``` Once expect is installed, the mergetools can be installed with the following steps: @@ -22,7 +21,6 @@ $ svn co http://svn.asterisk.org/svn/repotools $ cd repotools $ ./configure $ sudo make install - ``` Other Requirements @@ -37,14 +35,12 @@ Scripts that retrieve issue information from JIRA now require the jira-python mo ```bash title=" " linenums="1" $ sudo apt-get install python-pip - ``` Once pip is installed, installing jira-python is simple (and similar) ```bash title=" " linenums="1" $ sudo pip install jira-python - ``` pysvn, diffstat, and links2 @@ -54,5 +50,4 @@ If you want to run the release summary building script, these tools are necessar ```bash title=" " linenums="1" $ sudo apt-get install python-svn diffstat links2 - ``` diff --git a/docs/Development/Roadmap/Asterisk-10-Projects/Media-Architecture-Proposal.md b/docs/Development/Roadmap/Asterisk-10-Projects/Media-Architecture-Proposal.md index 1ee04dc943..81ef126a32 100644 --- a/docs/Development/Roadmap/Asterisk-10-Projects/Media-Architecture-Proposal.md +++ b/docs/Development/Roadmap/Asterisk-10-Projects/Media-Architecture-Proposal.md @@ -137,7 +137,6 @@ uint64_t ast_format_to_iax2(struct ast_format *format); * \retval on failure, NULL */ struct ast_format *ast_format_from_iax2(uint64_t src, struct ast_format *dst); - ``` ## Introducing the Format Attribute Structure @@ -192,7 +191,6 @@ int ast_format_attr_reg_interface(struct ast_format_attr_interface *interface); * \retval -1 failure */ int ast_format_attr_unreg_interface(struct ast_format_attr_interface *interface); - ``` ## The New Format Unique Identifier @@ -220,7 +218,6 @@ Since the number of formats that can be represented will likely never be exhaust #define AST_FORMAT_VIDEO_MASK ((((1ULL << 25)-1) & ~(AST_FORMAT_AUDIO_MASK)) | 0x7FFF000000000000ULL) #define AST_FORMAT_H263_PLUS (1ULL << 20) #define AST_FORMAT_MP4_VIDEO (1ULL << 22) - ``` ``` /*NEW */ @@ -247,7 +244,6 @@ enum ast_format_id { /* Determine what category a format type is i */ #define AST_FORMAT_GET_TYPE(format) (((unsigned int) (format->uid / AST_FORMAT_INC)) * AST_FORMAT_INC) - ``` ## New Format Representation Code Examples and Use cases. @@ -259,13 +255,11 @@ Example 1: One to one mapping of old format_t usage with ast_format structure an /* OLD: Media formats are represented by a bit in the format_t bit field */ format_t read_format; read_format = AST_FORMAT_ULAW; - ``` ``` /* NEW: Media formats are represented using the ast_format struct and are stored in an ast_cap object */ struct ast_format read_format; ast_format_set(&read, AST_FORMAT_ULAW); - ``` Example 2: Set an optional format attribute structure for a SILK ast_format structure capable of a dynamic sample rate. @@ -278,7 +272,6 @@ ast_format_set(&read, AST_FORMAT_SILK, AST_FORMAT_SILK_RATE, 12000, AST_FORMAT_SILK_RATE, 8000, AST_FORMAT_END); - ``` Example 3: Set the sample rate of SILK ast_frame representing the sample rate of the frame's payload. Then compare the format of the ast_frame with a read format determine if translation is required. @@ -305,7 +298,6 @@ if ((ast_format_cmp(&read_format, frame->subclass.format) < 0)) { /* Frame's format is either identical or a subset of the read_format * requiring no translation path */ } - ``` Example 4. Determine if a format is of type audio. @@ -316,7 +308,6 @@ format_t format = AST_FORMAT_ULAW; if (format & AST_FORMAT_AUDO_MASK) { /* this is of type audi */ } - ``` ``` /*NEW */ @@ -325,7 +316,6 @@ ast_format_set(&format, AST_FORMAT_ULAW); if (AST_FORMAT_GET_TYPE(&format) == AST_FORMAT_TYPE_AUDIO) { /* this is of type audi */ } - ``` Example 5: Media format seamlessly changes parameters midstream. @@ -361,7 +351,6 @@ capabilities |= AST_FORMAT_GSM; * attribute to be associated with it. * capabilities |= AST_FORMAT_SILK; */ - ``` ``` /* ---NEW: Media formats are represented using the ast_format struct and are stored in an ast_cap object. */ @@ -378,7 +367,6 @@ ast_format_set(&tmp, AST_FORMAT_SILK, AST_FORMAT_SILK_CAP_RATE, 8000, AST_FORMAT_ATTR_END); ast_cap_add(capabilties, &tmp); - ``` Example 2: Find joint capabilities between a peer and remote endpoint. @@ -398,7 +386,6 @@ peer->capability |= (AST_FORMAT_ULAW | AST_FORMAT_GSM); * jointcapabilities will be ULAW */ jointcapabilties = peer->capability & remote_capability - ``` ``` /*---NEW: Peer and remote capabilities are ast_cap objects. */ @@ -441,7 +428,6 @@ ast_cap_add(peer->capabilties, &tmp); * attributes must implement and register with the core. */ jointcapabilities = ast_cap_joint(peer->capability, remote_capability); - ``` Example 3: Separate audio, video, and text capabilities. @@ -451,14 +437,12 @@ Example 3: Separate audio, video, and text capabilities. format_t video_capabilities = capabilities & AST_FORMAT_VIDEO_MASK; format_t audio_capabilities = capabilities & AST_FORMAT_AUDIO_MASK; format_t text_capabilities = capabilities & AST_FORMAT_TEXT_MASK; - ``` ``` /*---NEW: Separate media types are returned on a new capabilities structure using ast_cap_get_type() */ struct ast_cap *video = ast_cap_get_type(capabilities, AST_FORMAT_TYPE_AUDIO); struct ast_cap *voice = ast_cap_get_type(capabilities, AST_FORMAT_TYPE_VIDEO); struct ast_cap *text = ast_cap_get_type(capabilities, AST_FORMAT_TYPE_TEXT); - ``` ## Ast Format Capability API Defined @@ -574,7 +558,6 @@ uint64_t ast_cap_to_iax2(struct ast_cap *cap); * \note This is only to be used for IAX2 compatibility */ void ast_cap_from_iax2(uint64_t src, struct ast_cap *dst); - ``` # IAX2 Ast Format API Compatibility @@ -627,7 +610,6 @@ Table Terms 960 [lossy -> lossless] down sample 975 [lossy -> lossy] down sample 985 [lossy -> Unknown] Unknown sample - ``` ### Translation Path Examples @@ -636,7 +618,6 @@ Table Terms ``` [g722->slin16->slin->ulaw] 900+850+600 = 2350 [g722->slin->ulaw] 960+600 = 1560 wins - ``` \*Example 2:\* Direct lossy to loss translation using ulaw to alaw. Notice how the direct path between uLaw and aLaw beats using the intermediary slin step. @@ -644,7 +625,6 @@ Table Terms ``` [ulaw->slin->alaw] 900+600 = 1500 [ulaw->alaw] 945 = 945 wins - ``` \*Example 3:\* Complex resampling of siren14 to siren7 using g722 as an intermediary step. Notice how downsamping all the way to 8khz signed linear loses to the path that only requires downsampling to 16khz signed linear. @@ -652,7 +632,6 @@ Table Terms ``` [siren14->slin->g722->slin16->siren7] 960+825+900+600 = 3285 [siren14->slin16->g722->slin16->siren7] 960+600+900+600 = 3060 wins - ``` \*Example 4:\* Complex resampling using siren14 to a fake 32khz lossy codec. Notice how siren14->slin16 has a 830 cost while siren14-slin8 has 831. This allows translations within the same category to be weighted against each other to produce the best quality. @@ -660,7 +639,6 @@ Table Terms ``` [siren14->slin->Fake 32khz lossy Codec] 961+825 = 1786 [siren14->slin16->Fake 32khz lossy Codec] 960+825 = 1785 wins - ``` ### Translator Costs Defined. @@ -735,7 +713,6 @@ enum ast_trans_cost_table { AST_TRANS_COST_LY_UNKNOWN = 985000, }; - ``` ### Creation of Translation Path Matrix @@ -752,7 +729,6 @@ FloydWarshall () for i := 1 to n for j := 1 to n path[i][j] = min (path[i][j], path[i][k]+path[k][j]); - ``` ## Translator Redundancy and Failover @@ -801,7 +777,6 @@ static int load_module(void) return AST_MODULE_LOAD_SUCCESS; } - ``` # Handling Multiple Media Streams @@ -872,7 +847,6 @@ enum ast_channel_stream_id { } As chan_sip receives individual stream payloads and creates ast_frames to pass into the core, each frame's stream id is marked with the ast_channel_stream_id it belongs to. Any channel driver or applications that gets passed an audio or video frame belonging to one of these newly defined auxiliary streams that does not support it will ignore it. - ``` ### Dynamic Streams @@ -897,7 +871,6 @@ struct ast_channel_stream { struct ast_format rawreadformat; struct ast_format rawwriteformat; }; - ``` ``` @@ -932,7 +905,6 @@ int ast_channel_get_native_cap(struct ast_channel *chan, enum ast_channel_stream int ast_channel_get_write_format(struct ast_channel *chan, enum ast_channel_stream_id id, struct ast_format *result) int ast_channel_get_read_format(struct ast_channel *chan, enum ast_channel_stream_id id, struct ast_format *result) - ``` ## Code Change Examples @@ -947,24 +919,20 @@ chan->readformat = best_format; chan->rawreadformat = best_format; chan->writeformat = best_format; chan->rawwriteformat = best_format; - ``` ``` ast_channel_set_native_cap(chan, AST_STREAM_DEFAULT_AUDIO, capability); ast_channel_init_write_format(chan, AST_STREAM_DEFAULT_AUDIO, best_format); ast_channel_init_read_format(chan, AST_STREAM_DEFAULT_AUDIO, best_format); - ``` Example 2: Setting the read format on a channel. ``` ast_set_read_format(chan, format); - ``` ``` ast_set_read_format(chan, AST_STREAM_DEFAULT_AUDIO, format); - ``` # Media Format with Attributes User Configuration @@ -988,7 +956,6 @@ samplerates=16000,24000 [silk_all] type=silk samplerates=8000,12000,16000,24000 - ``` ``` @@ -998,7 +965,6 @@ type=friend host=dynamic disallow=all allow=silk_nb - ``` \*Example 2\*. H.264 is capable of negotiating a wide range of attributes. If specific attributes are to be negotiated, a custom format must be created to represent this. @@ -1009,7 +975,6 @@ allow=silk_nb type=h264 res=vga,svga framerate=30 - ``` ``` @@ -1020,7 +985,6 @@ host=dynamic disallow=all allow_ulaw allow=h264_custom1 - ``` Notice from these examples that both the SILK and H264 custom formats are defined using fields specific to their format. Each format will define what fields are applicable to them. If there are common fields used for several different media formats, those fields should be named in a consistent way across all the media formats that use them. Every format allowing custom media formats to be defined must be documented in codecs.conf along with all the available fields. diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/AMI-Event-Documentation.md b/docs/Development/Roadmap/Asterisk-11-Projects/AMI-Event-Documentation.md index 097d79be48..b3455115f7 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/AMI-Event-Documentation.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/AMI-Event-Documentation.md @@ -28,7 +28,6 @@ Because AMI event documentation is handled in a slightly different fashion, a ne # ./configure # make full # make install - ``` !!! note @@ -61,7 +60,6 @@ Events: MessageWaiting QueueCallerAbandon QueueMemberAdded QueueMemberPaused QueueMemberPenalty QueueMemberRemoved QueueMemberRinginuse QueueMemberStatus UserEvent - ``` ``` @@ -110,7 +108,6 @@ SubEvent or ended. *CLI> - ``` !!! note @@ -143,7 +140,6 @@ AMI Event documentation behaves a bit differently then other Asterisk documentat "UniqueID: %s\r\n" "DialStatus: %s\r\n", ast_channel_name(src), ast_channel_uniqueid(src), dialstatus); - ``` 2. Each instance of an AMI event can be documented. This is particularly useful when the same event can have different fields, e.g., Dial, PeerStatus, etc. Even if the event has the same fields across all instances, it is also useful to document why the event is raised in the tag. Because each instance of an AMI event should be documented, a post-processing script aggregates the various XML fragments that match the same event name under a single tag. Fields that are shared across instances of the same event are combined and only need to be documented a single time. In the example below, the SubEvent field is only documented once, but the full documentation for the field will be displayed for both instances of the Dial event, as both instances of the event contain that field. In contrast to that, only the second instance of the event contains the DialStatus field; hence, only that instance will contain that field. @@ -174,7 +170,6 @@ AMI Event documentation behaves a bit differently then other Asterisk documentat * */ - ``` 3. In the same fashion as multiple instances of an AMI event in a single file, multiple instances of AMI events across implementation files are also combined. 4. Because pre- and post-processing scripts are involved, some burden on having a well-formed XML fragment is lifted from the documenter. Often, the fields in an event are self-explanatory, or are documented significantly in other AMI events. When that is the case, documentation for the event may only consist of a field and one or two parameters - in which case, the element is inferred for the parameters. @@ -202,7 +197,6 @@ Is equivalent to: * */ - ``` XML Schema @@ -218,7 +212,6 @@ The following are the changes to the XML DTD schema used to validate the generat - ``` ``` @@ -261,7 +254,6 @@ The following are the changes to the XML DTD schema used to validate the generat - ``` Source Comments @@ -274,7 +266,6 @@ Source Comments /*** DOCUMENTATION .... * */ - ``` * If documentation is placed at the top of the header file, the documentation **MUST** be enclosed with the tag, as well as the tags that describe the event instances. The documentation is not modified by the pre-processing script, but will be modified by the post-processing script in that it will be combined with other tags for the same event. * If documentation is placed within a source file co-located with AMI event call, the event documentation **MUST** be on the lines immediately preceding the AMI event call. diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/Configuration-parsing-with-the-Config-Options-API.md b/docs/Development/Roadmap/Asterisk-11-Projects/Configuration-parsing-with-the-Config-Options-API.md index bdf52b9299..1d4221603d 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/Configuration-parsing-with-the-Config-Options-API.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/Configuration-parsing-with-the-Config-Options-API.md @@ -11,7 +11,6 @@ Asterisk uses a standard config file format that is essentially: [context] variable=value - ``` The file 'config.h' specifies a relatively simple API for parsing these config files. Configuration information can usually be reloaded by the Asterisk user via the Asterisk command-line or manager interfaces. These reloads run in a different thread than any created by the specific module being reloaded. It is very important to handle reloads in an atomic, thread-safe manner. To help ensure this, a new configuration API has been added on top of the config.h API: the Config Options API. @@ -33,7 +32,6 @@ category - A section of a config field denoted by a bracketed name. A category n [general] variable1 = value variable2 = value2 - ``` aco_option - A configuration variable of a specific option type. An option may have a default value and has a handler responsible for parsing the textual representation of the option's value and storing its type-specific config object. @@ -51,7 +49,6 @@ custom option handler - A module-specific option handler for custom options. ``` C static AO2_GLOBAL_OBJ_STATIC(globals); - ``` 2. Define a structure to contain any global settings or containers used for configurable items as well as an ao2 allocator and destructor function for it. @@ -86,7 +83,6 @@ error: ao2_ref(cfg, -1); return NULL; } - ``` 3. Define config types to map config categories to the appropriate internal types @@ -107,7 +103,6 @@ static struct aco_type private_options = { .item_find = my_item_find, .item_offset = offsetof(struct my_config, itemss), }; - ``` 4. Create an aco_file for any config files that will be processed. Set the filename and aco_types that are valid for the file. @@ -117,7 +112,6 @@ struct aco_file my_conf = { .filename = "my.conf", .types = ACO_TYPES(&general_option, &private_options), }; - ``` 5. Define module-level configuration parsing options in a config info struct @@ -126,7 +120,6 @@ C CONFIG_INFO_STANDARD(cfg_info, globals, my_config_alloc, .files = ACO_FILES(&my_conf), ); - ``` 6. Initialize the aco_info and register default and custom options with the config info struct @@ -142,14 +135,12 @@ static int load_module(void) aco_option_register(&cfg_info, "description", my_conf.types, NULL, OPT_STRINGFIELD_T, 0, STRFLDSET(struct my_item, description)); ... } - ``` 7. Process the config via aco_process_config(), passing in whether or not this is a reload or not. ``` C aco_process_config(&cfg_info, 0); - ``` ### Using config data @@ -170,7 +161,6 @@ void some_func_that_accesses_config_data(void) return; } } - ``` !!! info "" diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/Pre-dial-handlers-Specification.md b/docs/Development/Roadmap/Asterisk-11-Projects/Pre-dial-handlers-Specification.md index 51f599d66c..f53fa39de3 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/Pre-dial-handlers-Specification.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/Pre-dial-handlers-Specification.md @@ -39,7 +39,6 @@ SIP/baz is another callee, calling SIP/baz-125 ``` # Syntax - ``` b([[context^]exten^]priority[(arg1[^...][^argN])]) B([[context^]exten^]priority[(arg1[^...][^argN])]) diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/Unique-Call-ID-Logging.md b/docs/Development/Roadmap/Asterisk-11-Projects/Unique-Call-ID-Logging.md index 6994142d14..e454302124 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/Unique-Call-ID-Logging.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/Unique-Call-ID-Logging.md @@ -31,7 +31,6 @@ css[Mar 7 00:00:00] VERBOSE[6165] netsock2.c: == Using SIP RTP CoS mark 5 [Mar 7 00:00:00] VERBOSE[6167][C00000001] pbx.c: -- Executing [023@sipphones:2] NoOp("SIP/123-00000000", "Oh wait, that isn't a thing.") in new stack [Mar 7 00:00:00] VERBOSE[6167][C00000001] pbx.c: -- Auto fallthrough, channel 'SIP/123-00000000' status is 'CHANUNAVAIL' [Mar 7 00:00:00] DEBUG[6167][C00000001] call_identifier.c: : Call ID [000001] dereffed and destroyed by thread [6167] - ``` This case represents a simple scenario where a a SIP packet is received which starts a new call. Before a channel can be created, The SIP channel driver anticipates a new call will be started and creates a related to that call. The call id is referenced by the pbx thread created for that channel. [000001]. @@ -40,21 +39,18 @@ Many users use Asterisk from the perspective of the CLI. By default, verbose mes ``` nonecore set verbose_callids on = yes - ``` This would effectively change the display of a verbose message on CLI from: ``` css-- Executing [023@sipphones:2] NoOp("SIP/123-00000000", "Oh wait, that isn't a thing.") in new stack - ``` to: ``` css-- [C00000001] Executing [023@sipphones:2] NoOp("SIP/123-00000000", "Oh wait, that isn't a thing.") in new stack - ``` Having call identifiers in log messages like this could greatly help users to visually parse what is happening with their calls and could also be helpful in identifying problems from the perspective of support or development. @@ -80,7 +76,6 @@ Eclipsecpp struct ast_callid { int call_identifier; /* Numerical value of the call displayed in the log */ }; - ``` Call-ID API @@ -124,7 +119,6 @@ struct ast_callid *ast_create_callid(); * \retval 1 - failure due to thread already being bound to a callid */ int ast_callid_threadassoc_add(struct ast_callid *callid); - ``` Logging - Thread storage and ast_log_callid @@ -162,7 +156,6 @@ Running through a simple example call with an audiohook exten => s,1,NoOp(example no op message) exten => s,2,MixMonitor(mixfile.wav) exten => s,3,Dial(SIP/examplepeer) - ``` 6. The NoOp gets verbose logged to CLI. In the CLI, nothing special is visible, but since ast_log is called with a thread containing an ast_callid in thread storage, so ast_log checks the thread 7. MixMonitor is reached. Verbose logging occurs as with NoOp It creates a monitor_thread which will be part of the call. When the new thread is created, the pbx thread sends the call-id to it for @@ -182,7 +175,6 @@ Running through a simple example call with transfers ``` exten => s,1,Dial(SIP/examplepeer) - ``` 3. Dial is reached and is verbose logged. The thread enters the channel .call function (sip_call) 4. Nothing too special occurs until SIP/examplecaller transfers SIP/examplepeer to SIP/examplepeer2. This means the channel that started the call thread is going to become a zombie. The call will go on though, the thread will just receive a new channel. The can probably just stay in as is. However, the zombie will no longer be a part of the thread, so it will need to reference diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/Unistim-channel-improvements.md b/docs/Development/Roadmap/Asterisk-11-Projects/Unistim-channel-improvements.md index 29e4c026c7..9e9f09256a 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/Unistim-channel-improvements.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/Unistim-channel-improvements.md @@ -38,7 +38,6 @@ line => 100 ; Key #1 - can be called Unistim/100@violet line => 100 ; Key #2 - blinks when second call comes to 100 callerid = "Shared" <660000> ; Callerid uses old zaptel.conf like syntax line => 200 ; Key #3 - rings on Unistim/100@violet - ``` Multiple languages support diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/Who-Hung-Up.md b/docs/Development/Roadmap/Asterisk-11-Projects/Who-Hung-Up.md index 9fe49e6425..3b08ee7942 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/Who-Hung-Up.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/Who-Hung-Up.md @@ -44,7 +44,6 @@ exten => h,n,set(HANGUPCAUSE_STRING=${HANGUPCAUSE_STRING:1}) ; go back to the beginning of the loop exten => h,n,goto(hu_begin) exten => h,n(hu_exit),noop(All HANGUPCAUSE entries processed) - ``` Additional Usage diff --git a/docs/Development/Roadmap/Asterisk-11-Projects/app_macro-Deprecation.md b/docs/Development/Roadmap/Asterisk-11-Projects/app_macro-Deprecation.md index 4a23f09bff..021a348665 100644 --- a/docs/Development/Roadmap/Asterisk-11-Projects/app_macro-Deprecation.md +++ b/docs/Development/Roadmap/Asterisk-11-Projects/app_macro-Deprecation.md @@ -49,7 +49,6 @@ cc_agent_policy=generic cc_monitor_policy=generic cc_callback_sub=cc_test,s,1 callcounter=yes - ``` And dialplan: @@ -66,7 +65,6 @@ exten => 1235,n,CallCompletionRequest() [cc_test] exten => s,1,NoOp(CCSS callback run for CCBS) exten => s,n,Return - ``` #### Events @@ -114,7 +112,6 @@ exten => s,n,NoOp(Running connected line subroutine with arg1: ${ARG1} and arg2: exten => s,n,Set(NOPREFIX=${CONNECTEDLINE(number):-${ARG2}}) exten => s,n,Set(CONNECTEDLINE(num,i)=${ARG1}${NOPREFIX}) exten => s,(end),Return - ``` Redirecting Information @@ -160,5 +157,4 @@ exten => s,n,NoOp(Running caller redirecting subroutine with arg1: ${ARG1} and a exten => s,n,Set(NOPREFIX=${REDIRECTING(to-num):-${ARG2}}) exten => s,n,Set(REDIRECTING(to-num,i)=${ARG1}${NOPREFIX}) exten => s,(end),Return - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Asterisk-Client-Library-Generator.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Asterisk-Client-Library-Generator.md index c1b3bb881a..75857884d2 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Asterisk-Client-Library-Generator.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Asterisk-Client-Library-Generator.md @@ -97,5 +97,4 @@ asterisk_rest_libraries recordings.json resources.json ... and perhaps more in the future - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/Using-the-Stasis-Message-Bus/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/Using-the-Stasis-Message-Bus/index.md index aba11b82fc..df29218665 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/Using-the-Stasis-Message-Bus/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/Using-the-Stasis-Message-Bus/index.md @@ -46,7 +46,6 @@ static int unload_module(void) /* .. */ return 0; } - ``` For every message that's published to the `ast_channel_topic_all()` topic, the `statsmake()` callback will be invoked with the data pointer given in the subscription, the subscription being dispatched, the topic the message was originally published to (useful when messages are forwarded between topics), and, finally, the message itself. @@ -84,7 +83,6 @@ static void statsmaker(void *data, struct stasis_subscription *sub, ast_statsd_log(ast_str_buffer(metric), AST_STATSD_METER, 1); } } - ``` When you unsubscribe from a topic, messages are still being dispatched to the callback. You need to wait until the final message has been processed before you can dispose of the data pointer given to the subscription. @@ -136,7 +134,6 @@ static int unload_module(void) router = NULL; return 0; } - ``` Messages are dispatched to the router with the same guarantees as a regular subscription. The difference is that you can provide a different callback for every message type that you're interested in. You can also add a default route, which is useful for handling miscellaneous messages, such as the final message. diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/index.md index b3fdb25c92..967327bfd0 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/Stasis-Message-Bus/index.md @@ -97,7 +97,6 @@ struct stasis_message_type *ast_foo_type(void); * \brief Topic for the foo module. */ struct stasis_topic *ast_foo_topic(void); - ``` ``` #include "asterisk.h" @@ -172,7 +171,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, 0, "The wonders of foo", .load = load_module, .unload = unload_module ); - ``` ## Subscribing (no message router) @@ -246,7 +244,6 @@ void ast_bar_shutdown(struct ast_bar *bar) stasis_unsubscribe(bar->sub); bar->sub = NULL; } - ``` ## Subscribing (with message router) @@ -353,5 +350,4 @@ void ast_bar_shutdown(struct ast_bar *bar) stasis_message_router_unsubscribe(bar->router); bar->router = NULL; } - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/index.md index f05dc4694e..4d0d1ee1b4 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-API-Improvements/index.md @@ -260,7 +260,6 @@ The `app\_stasis.so` module simply exports the `res\_stasis.so` functionality as ; Send channel to the 'Queue' application, with the args 'enqueue,sales' exten => 7001,1,Stasis(Queue,enqueue,sales) - ``` ## {{stasis_\{channels,bridges,endpoints\}.c}} diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/Asterisk-12-Bridging-API.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/Asterisk-12-Bridging-API.md index b0bdf5cfbc..052844adb8 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/Asterisk-12-Bridging-API.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/Asterisk-12-Bridging-API.md @@ -37,7 +37,6 @@ enum ast_bridge_capability { /*! Bridge technology can optimize things based on who is talkin */ AST_BRIDGE_CAPABILITY_OPTIMIZE = (1 << 7), }; - ``` ### ast_bridge_channel_state enum @@ -59,7 +58,6 @@ enum ast_bridge_channel_state { /*! Bridged channel was ast_bridge_depart() from the bridge during AST_BRIDGE_CHANNEL_STATE_EN */ AST_BRIDGE_CHANNEL_STATE_DEPART_END, }; - ``` ### ast_bridge_write_result @@ -77,7 +75,6 @@ enum ast_bridge_write_result { /*! Bridge technology does not support writing out a frame of this typ */ AST_BRIDGE_WRITE_UNSUPPORTED, }; - ``` ### ast_bridge_action_type @@ -98,7 +95,6 @@ enum ast_bridge_action_type { /*! Bridged channel is to indicate talking sto */ AST_BRIDGE_ACTION_TALKING_STOP, }; - ``` ### ast_bridge_video_mode_type @@ -116,7 +112,6 @@ enum ast_bridge_video_mode_type { * that feed is automatically picked based on who is talking the most */ AST_BRIDGE_VIDEO_MODE_TALKER_SRC, }; - ``` Structures @@ -143,7 +138,6 @@ struct ast_bridge_tech_optimizations { * detected as silence from the mix */ unsigned int drop_silence:1; }; - ``` ### ast_bridge_channel @@ -188,7 +182,6 @@ struct ast_bridge_channel { /*! Queue of actions to perform on the channel */ AST_LIST_HEAD_NOLOCK(, ast_frame) action_queue; }; - ``` ### ast_bridge_video_single_src_data @@ -203,7 +196,6 @@ struct ast_bridge_video_single_src_data { /*! Only accept video coming from this channe */ struct ast_channel *chan_vsrc; }; - ``` ### ast_bridge_video_talker_src_data @@ -222,7 +214,6 @@ struct ast_bridge_video_talker_src_data { /*! Current talker see's this perso */ struct ast_channel *chan_old_vsrc; }; - ``` ### ast_bridge_video_mode @@ -239,7 +230,6 @@ struct ast_bridge_video_mode { struct ast_bridge_video_talker_src_data talker_src_data; } mode_data; }; - ``` ### ast_bridge @@ -294,7 +284,6 @@ struct ast_bridge { /*! Linked list of channels removed from the bridge and waiting to be departed */ AST_LIST_HEAD_NOLOCK(, ast_bridge_channel) depart_wait; }; - ``` Functions on ast_bridge @@ -326,7 +315,6 @@ Create a new instance of `ast_bridge` with the requested capabilities. * the channels hangs up. */ struct ast_bridge *ast_bridge_new(uint32_t capabilities, int flags); - ``` ### ast_bridge_lock @@ -347,7 +335,6 @@ static inline void _ast_bridge_lock(struct ast_bridge *bridge, const char *file, { __ao2_lock(bridge, AO2_LOCK_REQ_MUTEX, file, function, line, var); } - ``` ### ast_bridge_unlock @@ -368,7 +355,6 @@ static inline void _ast_bridge_unlock(struct ast_bridge *bridge, const char *fil { __ao2_unlock(bridge, file, function, line, var); } - ``` ### ast_bridge_check @@ -395,7 +381,6 @@ Determine if the Bridging Framework can create a bridge with the requested capab * together. */ int ast_bridge_check(uint32_t capabilities); - ``` ### ast_bridge_destroy @@ -421,7 +406,6 @@ Explicitly destroy a bridge. Note that a self managing bridge will automatically * This destroys a bridge that was previously created using ast_bridge_new. */ int ast_bridge_destroy(struct ast_bridge *bridge); - ``` ### ast_bridge_join @@ -473,7 +457,6 @@ enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *swap, struct ast_bridge_features *features, struct ast_bridge_tech_optimizations *tech_args); - ``` ### ast_bridge_impart @@ -539,7 +522,6 @@ When the channel leaves the bridge the channel will: * removed by a third party using ast_bridge_remove(). */ int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, int independent); - ``` ### ast_bridge_depart @@ -571,7 +553,6 @@ Remove a previously imparted `ast_channel` from the bridge. * using the ast_bridge_impart API call with the independent flag FALSE. */ int ast_bridge_depart(struct ast_bridge *bridge, struct ast_channel *chan); - ``` ### ast_bridge_remove @@ -603,7 +584,6 @@ Remove any channel from the bridge. * using both ast_bridge_join and ast_bridge_impart. */ int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan); - ``` ### ast_bridge_merge @@ -634,7 +614,6 @@ Merge two bridges together. * completed. */ int ast_bridge_merge(struct ast_bridge *bridge0, struct ast_bridge *bridge1); - ``` ### ast_bridge_suspend @@ -666,7 +645,6 @@ Suspend a channel from the bridge. Channels that are suspended from the bridge a * using both ast_bridge_join and ast_bridge_impart. */ int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan); - ``` ### ast_bridge_unsuspend @@ -697,7 +675,6 @@ Unsuspend a previously suspended channel, returning control of it back to the br * Doing so may result in bad things happening. */ int ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan); - ``` ### ast_bridge_change_state @@ -730,7 +707,6 @@ Change the state of a bridged channel. * request the channel exit the bridge. */ void ast_bridge_change_state(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_state new_state); - ``` ### ast_bridge_set_internal_sample_rate @@ -750,7 +726,6 @@ If a bridging technology supports the multimix capability, set the mixing sampli * */ void ast_bridge_set_internal_sample_rate(struct ast_bridge *bridge, unsigned int sample_rate); - ``` ### ast_bridge_set_mixing_interval @@ -768,7 +743,6 @@ If a bridging technology supports the multimix capability, set the mixing interv * the bridge tech is free to choose any mixing interval it uses by default. */ void ast_bridge_set_mixing_interval(struct ast_bridge *bridge, unsigned int mixing_interval); - ``` ### ast_bridge_set_single_src_video_mode @@ -781,7 +755,6 @@ If a bridging technology supports video, set the single video source to feed to * \brief Set a bridge to feed a single video source to all participants. */ void ast_bridge_set_single_src_video_mode(struct ast_bridge *bridge, struct ast_channel *video_src_chan); - ``` ### ast_bridge_set_talker_src_video_mode @@ -795,7 +768,6 @@ If a bridging technology supports video, set the video mode to use the current t * video as the single source video feed */ void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge); - ``` ### ast_bridge_update_talker_src_video_mode @@ -808,7 +780,6 @@ Inform a video capable bridging technology about the talk energy and frame infor * \brief Update information about talker energy for talker src video mode. */ void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame); - ``` ### ast_bridge_number_video_src @@ -821,7 +792,6 @@ Get the number of video sources in the bridge. * \brief Returns the number of video sources currently active in the bridge */ int ast_bridge_number_video_src(struct ast_bridge *bridge); - ``` ### ast_bridge_is_video_src @@ -839,7 +809,6 @@ Return whether or not a channel is a video source. * on the bridge where 1 is the highest priority. */ int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan); - ``` ### ast_bridge_remove_video_src @@ -852,7 +821,6 @@ Remove a channel from being the video source. * \brief remove a channel as a source of video for the bridge. */ void ast_bridge_remove_video_src(struct ast_bridge *bridge, struct ast_channel *chan); - ``` [Bridging Technologies](http://svn.asterisk.org/svn/asterisk/team/group/bridge_construction/include/asterisk/bridging_technology.h) @@ -876,7 +844,6 @@ enum ast_bridge_preference { /*! Bridge technology is low, it should not be considered unless it is absolutely neede */ AST_BRIDGE_PREFERENCE_LOW, }; - ``` Structs @@ -930,7 +897,6 @@ struct ast_bridge_technology { /*! Linked list informatio */ AST_RWLIST_ENTRY(ast_bridge_technology) entry; }; - ``` Functions @@ -965,7 +931,6 @@ int __ast_bridge_technology_register(struct ast_bridge_technology *technology, s /*! \brief See \ref __ast_bridge_technology_register( */ #define ast_bridge_technology_register(technology) __ast_bridge_technology_register(technology, ast_module_info->self) - ``` ### ast_bridge_technology_unregister @@ -993,7 +958,6 @@ Unregister a technology with the Bridging Framework. * considered when creating a new bridge. */ int ast_bridge_technology_unregister(struct ast_bridge_technology *technology); - ``` ### ast_bridge_handle_trip @@ -1022,7 +986,6 @@ Notify the Bridging Framework that a channel has a frame waiting. * \note This should only be used by bridging technologies. */ void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_channel *chan, int outfd); - ``` ### ast_bridge_notify_talking @@ -1045,7 +1008,6 @@ Notify the Bridging Framework that a channel has started talking. * when this indicates the channel has stopped talking. */ void ast_bridge_notify_talking(struct ast_bridge_channel *bridge_channel, int started_talking); - ``` ### ast_bridge_technology_suspend @@ -1070,7 +1032,6 @@ Suspend a bridging technology from consideration by the Bridging Framework. * are not affected. */ void ast_bridge_technology_suspend(struct ast_bridge_technology *technology); - ``` ### ast_bridge_technology_unsuspend @@ -1094,5 +1055,4 @@ Unsuspend a bridging technology from consideration by the Bridging Framework. * creating a new bridge again. */ void ast_bridge_technology_unsuspend(struct ast_bridge_technology *technology); - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/index.md index 007b3f8520..70d10b8841 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/Asterisk-12-Bridging-Project/index.md @@ -33,7 +33,6 @@ A comment from ast_do_masquerade * the clone channel into the original channel. Start by killing off the * original channel's backend. While the features are nice, which is the * reason we're keeping it, it's still awesomely weird. XX */ - ``` The way the operation works is to take two channels and 'swap' portions of them. In the diagram below, assume that Thread A has a channel that Thread B wants to take over. Thread B creates a new channel ("Original") and starts a Masquerade operation on the channel owned by Thread A ("Clone"). Both channels are locked, and the state of the Clone channel is moved into the Original channel, while the Clone channel obtains the Original channel's state. In order to denote that the channel is about to die, a special ZOMBIE flag is put on the channel and the name renamed to `Clone`. The lock is released, and the Original channel - which now has the state associated with Clone channel - executes in Thread B, while the Clone channel (which is now quite dead) sees that it's dead and goes off to contemplate its demise silently in an `h` extension. @@ -364,7 +363,6 @@ A way to implement the toggle between A and C parties is to have an atxfer bridg ``` A -- B1 --Local@special/b -- Batxfer1 -- B -- Batxfer2 -- Local@special/b -- B2 -- C - ``` The atxfer bridges grant B the transfer menu because it has the TransferrerRoll defined on the channel. When the transfer is completed, the TransferrerRoll is removed. @@ -525,7 +523,6 @@ class ast_bridge_channel { unsuspend(); Mark channel as unsuspended and poke the bridge to recognize it. }; - ``` #### Locking precedence order: @@ -541,7 +538,6 @@ class ast_bridge_channel { ast_channel / channel private - ``` #### New Bridge Techs @@ -720,7 +716,6 @@ bridge suspend bridge unsuspend Unsuspend the bridge technology from use by bridges. - ``` Corresponding AMI actions should also be created. diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/How-to-extend-SIP-functionality-in-Asterisk/Writing-a-SIP-Session-Supplement.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/How-to-extend-SIP-functionality-in-Asterisk/Writing-a-SIP-Session-Supplement.md index e1aabecff0..a484ea45eb 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/How-to-extend-SIP-functionality-in-Asterisk/Writing-a-SIP-Session-Supplement.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/How-to-extend-SIP-functionality-in-Asterisk/Writing-a-SIP-Session-Supplement.md @@ -77,7 +77,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Auto Answer Suppo .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, ); - ``` ### Initial directives @@ -100,7 +99,6 @@ c#include "asterisk.h" res_pjsip res_pjsip_session ** */ - ``` The `#includes` here grab the necessary headers we will need. All code in Asterisk starts by including `asterisk.h`. After that, we will need the `pjsip.h, `pjsip_ua.h`,` and `pjlib.h` files in order to make use of PJSIP functions. We will use these later in the tutorial. The inclusion of `asterisk/res_pjsip.h` and `asterisk/res_pjsip_session.h` is what allows us to be able to create a session supplement. Finally, the inclusion of `asterisk/module.h` is necessary since our file is going to be a loadable module in Asterisk. @@ -131,7 +129,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Auto Answer Suppo .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, ); - ``` We will not go into a lot of detail about the module-specific code here since it is covered in a tutorial [here](/Development/Reference-Information/Asterisk-Framework-and-API-Examples/Modules). However, notice that when the module loads, it registers the `auto_answer_supplement` with `res_pjsip_session` and when the module unloads, it unregisters the `auto_answer_supplement`. @@ -150,7 +147,6 @@ static struct ast_sip_session_supplement auto_answer_supplement = { .method = "INVITE", .outgoing_request = auto_answer_outgoing_request, }; - ``` Let's start with the bottom struct declaration. It defines a session supplement called `auto_answer_supplement`. For this supplement, the important fields to fill out are the `method` and the `outgoing_request` fields. By setting `.method = "INVITE"` it tells `res_pjsip_session` only to call into this supplement on INVITEs and not for other methods. If the method had been left empty, then the supplement would be called into for all SIP method types. We also set `.outgoing_request`. This makes it so that on outgoing SIP requests, our method will be called. Combined with the earlier `method` setting, it means that our session will only be called into for outgoing INVITE requests. Other session supplement fields are as follows: @@ -172,7 +168,6 @@ cstatic void auto_answer_outgoing_request(struct ast_sip_session *session, pjsip { /* STU */ } - ``` Let's go over the function in a little more detail. The first parameter to this callback is our SIP session. This contains information such as the associated `ast_channel` structure as well as other session-specific details. The `tdata` parameter is a PJSIP outgoing SIP message structure. In this case, we know the `tdata` is an outbound INVITE request due to the constraints of our supplement. @@ -212,7 +207,6 @@ cstatic void auto_answer_outgoing_request(struct ast_sip_session *session, pjsip answer_mode = pjsip_generic_string_hdr_create(tdata->pool, &answer_mode_name, &answer_mode_value); pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) answer_mode); } - ``` ### Variable Declarations @@ -225,7 +219,6 @@ c static const pj_str_t answer_mode_name = { "Answer-Mode", 11 }; static const pj_str_t require_value = { "answermode", 10 }; pjsip_generic_string_hdr *answer_mode; pjsip_require_hdr *require; - ``` First is to declare the parameters we will need. The names should be self-evident here, but in case it's not clear, we have created the name and value of the Answer-Mode header, as well as the header itself. Since PJSIP does not know about the Answer-Mode header, we just use a generic string header for it. We also have defined the value we need to place in the Require header and the Require header itself. @@ -241,7 +234,6 @@ c require = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_REQUIRE, NULL); pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) require); } pj_cstr(&require->values[require->count++], &require_value); - ``` First we try to see if a Require header already exists in the INVITE request. If it does not, then we create a new Require header and add it to the INVITE. Finally, we modify the header by adding the `require_value` to the last spot in the array of values for the header and incrementing the number of members in the array. @@ -253,7 +245,6 @@ Next, let's have a look at what we are doing with the Auto-Answer header: ``` c answer_mode = pjsip_generic_string_hdr_create(tdata->pool, &answer_mode_name, &answer_mode_value); pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) answer_mode); - ``` Since we don't expect anyone else to be adding an Auto-Answer header to the outbound request, we simply create a new generic string header with the appropriate name and value and then add it to the outgoing message. @@ -280,7 +271,6 @@ c ... /* Let's add the require header. There could already be a require header present in the ... - ``` With this new code, we'll check the `SIP_AUTO_ANSWER` channel variable to see if it tells us we should add auto-answer headers. The `ast_true` function checks that the header checks a string's value for words like "yes", "on", or "1" in order to be sure that it is intentional for the auto-answer feature to be invoked. The `pbx_builtin_getvar_helper` function requires that the channel is locked while it is called and the value returned by it is used. In order to use `pbx_builtin_getvar_helper` we will need to include `asterisk/pbx.h`. @@ -299,7 +289,6 @@ c ... ast_channel_lock(session->channel); ... - ``` The `session->inv_session` is a PJSIP structure that keeps up with details of the underlying INVITE dialog. The `PJSIP_INV_STATE_CONFIRMED` state indicates that the initial INVITE transaction has completed. Therefore, if the state is here or beyond, then this outbound request must be a reinvite. @@ -389,7 +378,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Auto Answer Suppo .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, ); - ``` And there you have it. In approximately 80 lines of code, you've added an Asterisk module that can modify outgoing INVITE requests! diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/Event-Subscription-and-Publication-Design.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/Event-Subscription-and-Publication-Design.md index 3e62118c95..31d17a89db 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/Event-Subscription-and-Publication-Design.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/Event-Subscription-and-Publication-Design.md @@ -162,7 +162,6 @@ struct ast_datastore *ast_sip_subscription_get_datastore(struct ast_sip_subscrip * \param name The name of the datastore to remove */ void ast_sip_subscription_remove_datastore(struct ast_sip_subscription *subscription, const char *name); - ``` Subscription handlers @@ -329,7 +328,6 @@ int ast_sip_register_subscription_handler(const struct ast_sip_subscription_hand * \brief Unregister a subscription handler */ void ast_sip_unregister_subscription_handler(const struct ast_sip_subscription_handler *handler); - ``` Event publication @@ -479,5 +477,4 @@ struct ast_datastore *ast_sip_subscription_get_datastore(struct ast_sip_subscrip * \param name The name of the datastore to remove */ void ast_sip_subscription_remove_datastore(struct ast_sip_subscription *subscription, const char *name); - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Endpoints-and-Location-A-Match-Made-in-Heaven.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Endpoints-and-Location-A-Match-Made-in-Heaven.md index 18fbab2f57..676e8322dd 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Endpoints-and-Location-A-Match-Made-in-Heaven.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/Endpoints-and-Location-A-Match-Made-in-Heaven.md @@ -77,7 +77,6 @@ disallow=all allow=g722 allow=ulaw aors=5000 - ``` If explicitly dialed without specifying a URI or AOR the configured AOR of "5000" will be used. @@ -88,7 +87,6 @@ An example AOR configuration, with support for external manipulation, is as foll [5000] type=aor max_contacts=10 - ``` This will allow a maximum of 10 contacts to be externally added to it. If exceeded the registrar will reject the registration attempt. @@ -100,7 +98,6 @@ An example AOR configuration, with support for external manipulation but with th type=aor max_contacts=1 remove_existing=yes - ``` This will cause only a single contact to be registered. Any subsequent registration attempts will cause the existing contact to be removed. @@ -111,7 +108,6 @@ An example AOR configuration, with no support for external manipulation, is as f [5000] type=aor static=sip:5000@internal.mypbx - ``` Since a static contact has been specified it will be used if this AOR is queried. @@ -125,19 +121,16 @@ Dialing an endpoint can be accomplished using the following: ``` Dial(PJSIP/5000) - ``` Dialing an explicit AOR using an endpoint can be accomplished using the following: ``` Dial(PJSIP/5000/5000) - ``` Dialing an explicit SIP URI using an endpoint can be accomplished using the following: ``` Dial(PJSIP/5000/sip:1234@test.com) - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/index.md index 5894c3cd05..fede4f4511 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip-design/index.md @@ -131,7 +131,6 @@ struct ast_sip_endpoint_identifier { */ struct ast_sip_endpoint *(*identify_endpoint)(struct pjsip_rx_data *data); }; - ``` Service registration @@ -221,7 +220,6 @@ int ast_sip_register_endpoint_identifier(struct ast_sip_endpoint_identifier *ide * \param identifier The SIP endoint identifier to unregister */ void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *identifier); - ``` Threadpool usage @@ -263,7 +261,6 @@ void ast_sip_destroy_work(struct ast_sip_work *work); * \retval -1 Failure */ int ast_sip_push_task(struct ast_sip_work *work, int (*sip_task)(void *), void *task_data); - ``` Common SIP methods @@ -437,5 +434,4 @@ int ast_sip_add_body(struct pjsip_tx_data *tdata, const char *bodies[]); * \retval -1 Failure */ int ast_sip_append_body(struct pjsip_tx_data *tdata, const char *body); - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip_session-design.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip_session-design.md index 209fa4324e..e6c495485a 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip_session-design.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/New-SIP-Channel-Driver-Architecture/res_sip_session-design.md @@ -111,7 +111,6 @@ struct ast_sip_session_sdp_handler { */ int (*create_outgoing_sdp_stream)(struct ast_sip_session *session, struct pjmedia_sdp_session *sdp); }; - ``` Extensibility @@ -194,7 +193,6 @@ struct ast_sip_session_cookie *ast_sip_session_get_cookie(struct ast_sip_session * \retval -1 Failed to remove the cookie */ int ast_sip_session_remove_cookie(struct ast_sip_session *session, const char *name); - ``` Common SIP methods @@ -241,5 +239,4 @@ int ast_sip_session_send_reinvite(struct ast_sip_session *session, int (*respons * \param rdata The response to which the response is being sent */ int ast_sip_session_send_response(struct ast_sip_session *session, int response_code, struct pjsip_rx_data *rdata); - ``` diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/SIP-Test-Plan/Tests-for-Basic-Call-Functionality.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/SIP-Test-Plan/Tests-for-Basic-Call-Functionality.md index 51a2a98d9c..0be2bf51f3 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/SIP-Test-Plan/Tests-for-Basic-Call-Functionality.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/SIP-Test-Plan/Tests-for-Basic-Call-Functionality.md @@ -50,7 +50,6 @@ username=bob ; this page, there will never be any bob-specific ; auth options because we do not respond properly ; to auth challenges. - ``` --- @@ -76,7 +75,6 @@ same => n,Hangup() exten => bobv6,1,Dial(PJSIP/sip:bob@[::1]:5062,10) same => n,Hangup() - ``` Incoming Call tests diff --git a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/index.md b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/index.md index 40d11ffff7..1a1d8a5e87 100644 --- a/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/index.md +++ b/docs/Development/Roadmap/Asterisk-12-Projects/New-SIP-channel-driver/index.md @@ -38,7 +38,6 @@ As part of this work, pjproject has been pulled out of the Asterisk source tree rm -f /usr/lib/libpj*.a /usr/lib/libmilenage*.a /usr/lib/pkgconfig/libpjproject.pc --- - ``` !!! note @@ -52,14 +51,12 @@ rm -f /usr/lib/libpj*.a /usr/lib/libmilenage*.a /usr/lib/pkgconfig/libpjproject. ```bash title=" " linenums="1" # git clone http://github.com/asterisk/pjproject pjproject - ``` 2. Configure pjproject to produce shared objects in the /usr directory (or in an appropriate folder in which your system expects shared objects to reside) ```bash title=" " linenums="1" # cd pjproject # ./configure --prefix=/usr --enable-shared - ``` !!! note @@ -74,7 +71,6 @@ rm -f /usr/lib/libpj*.a /usr/lib/libmilenage*.a /usr/lib/pkgconfig/libpjproject. ```bash title=" " linenums="1" # make # make install - ``` Configuration diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Asterisk-13-ARI-Improvements/index.md b/docs/Development/Roadmap/Asterisk-13-Projects/Asterisk-13-ARI-Improvements/index.md index 51f8f707d6..6e405cc552 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Asterisk-13-ARI-Improvements/index.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Asterisk-13-ARI-Improvements/index.md @@ -33,7 +33,6 @@ Instead of having a channel process the received text messages, ideally we would body: 'blah blah blah' variables: [ key: 'value', someotherkey: 'someothervalue' ] } - ``` An ARI application - if they subscribed to some endpoint that matches the From: or To: header - can choose to act on the message in any way they see fit. Message processing in the dialplan can still take place as well, if the dialplan needs to handle the message. @@ -67,7 +66,6 @@ POST /endpoints/PJSIP/alice/message { "X-Foo-Yack": "I am not" }, ], } - ``` Note that the content of the **from** key is dependent on the channel technology being chosen. SIP message technologies allow for arbitrary URIs to be specified as the initiator of the message; XMPP does not. @@ -81,7 +79,6 @@ POST /endpoints/PJSIP/message "to": "pjsip:generic/sip:alice@mysipserver.org" "body": "No, *I* am the very model of a major general" } - ``` !!! tip ** Note that in this case, the SIP URI specified in the **to @@ -113,7 +110,6 @@ A new event will be defined, *MessageReceived.*This event will occur when Asteri {"SIP_RECVADDR", "127.0.0.1"}, ], } - ``` Note that the **to** key in the JSON *MessageReceived* event specifies the URI the message was sent to. It is up to the ARI application to handle or route that appropriately. @@ -129,7 +125,6 @@ First, *message.h* will need to expose a registration function that allows for a static int ast_msg_register_observer(const char *id, void (*msg_cb)(struct ast_msg *msg)); static int ast_msg_unregister_observer(const char *id); - ``` When performing the routing (after pulling the message off the taskprocessor), message should deliver the message to the observers: @@ -156,7 +151,6 @@ static void msg_route(struct ast_channel *chan, struct ast_msg *msg) pbx_args.no_hangup_chan = 1, ast_pbx_run_args(chan, &pbx_args); } - ``` Note that we aren't going to do any filtering of the messages at this level; instead, we'll rely on the filtering to be done in Stasis. The Stasis application can decide whether or not the message is something it wants to forward along. @@ -185,7 +179,6 @@ No modifications should have to be done for `res_xmpp` or `res_pjsip_messaging`. case SIP_GET_DEST_EXTEN_FOUND: break; } - ``` Stasis (as in the application for ARI, not the message bus) can filter out the messages accordingly. Normally, a subscription entails a particular stasis subscription for a channel, bridge, endpoint, etc. While some subscriptions for messages are endpoint based, some are based on technology (such as, give me all of the messages associated with PJSIP endpoints/technology). This is because messages don't have to be associated with an endpoint - they can be sent to an arbitrary URI, and they can be sent to "asterisk" - not to some endpoint managed by Asterisk. As such, we can't just use a Stasis topic for this (or at least, we can't use the endpoint topic - more on that later). diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Media-Format-Rewrite.md b/docs/Development/Roadmap/Asterisk-13-Projects/Media-Format-Rewrite.md index 107d9b9999..e2b9640a5b 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Media-Format-Rewrite.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Media-Format-Rewrite.md @@ -31,7 +31,6 @@ The following, for the most part, assumes that the channels use RTP for media an --- Changing `chan_sip` is fraught with peril. As such, we're going to try and give the power/flexibility of how things are offered/answered to where we can better maintain/control the behaviour, which means `chan_pjsip`. - ``` General Rules @@ -333,7 +332,6 @@ struct ast_codec { int ast_codec_register(struct ast_codec *codec); struct ast_codec *ast_codec_get(const char *name, enum ast_format_type type, unsigned int samples); - ``` Codec structures will be immutable once registered and created only once. If a user of the API wants to retrieve a codec they will use ast_codec_get with the provided information. @@ -348,7 +346,6 @@ struct ast_format { void *attribute_data; struct ast_format_attr_interface *interface; }; - ``` Because it is astobj2 allocated additional information can be stored within it, such as a pointer to attribute information and a pointer to the attribute interface to use with it. This reduces the size of the structure by quite a lot and removes the need for container lookups on comparison. @@ -369,7 +366,6 @@ struct ast_format_cap { AST_VECTOR(, int) framing; AST_VECTOR(, int) preference; }; - ``` This presents an easy mechanism to see if a format is present in the structure. @@ -413,7 +409,6 @@ For cases where a format has to be created a new API call, ast_format_create, wh ``` struct ast_format *ast_format_create(struct ast_codec *codec); - ``` Example: @@ -433,7 +428,6 @@ static void example(void) ao2_cleanup(format); } - ``` #### Setting attributes @@ -442,7 +436,6 @@ Attribute information can be set on a format by using the ast_format_attribute_s ``` int ast_format_attribute_set(struct ast_format *format, const char *attribute, const char *value); - ``` Example: @@ -470,7 +463,6 @@ static void test_example(void) ast_format_attribute_set(format, "rate", "8000"); ao2_ref(format, -1); } - ``` !!! note @@ -486,7 +478,6 @@ The function to allocate a capabilities structure is unchanged but the format ca ``` struct ast_format_cap *ast_format_cap_alloc(enum ast_format_cap_flags flags); - ``` Example: @@ -498,7 +489,6 @@ static void example(void) ao2_ref(caps, -1); } - ``` #### Adding a format to the capabilities structure @@ -507,7 +497,6 @@ This is slightly changed from the existing API in that the format passed in is n ``` void ast_format_cap_add(struct ast_format_cap *cap, struct ast_format *format); - ``` Example: @@ -541,7 +530,6 @@ static void example(void) ao2_ref(format, -1); ao2_ref(caps, -1); } - ``` !!! note @@ -563,7 +551,6 @@ int ast_format_cap_is_empty(const struct ast_format_cap *cap); int ast_format_cap_remove(struct ast_format_cap *cap, struct ast_format *format); void ast_format_cap_remove_bytype(struct ast_format_cap *cap, enum ast_format_type type); void ast_format_cap_remove_all(struct ast_format_cap *cap); - ``` #### Capabilities structure iteration @@ -573,7 +560,6 @@ As the capabilities structure is now stored using an array iteration will involv ``` size_t ast_format_cap_count(const struct ast_format_cap *cap); struct ast_format *ast_format_cap_get(const struct ast_format_cap *cap, int index); - ``` Example: @@ -597,7 +583,6 @@ static void example(void) ao2_ref(caps, -1); } - ``` #### Framing size @@ -607,7 +592,6 @@ The framing size controls the length of media frames (in milliseconds). Previous ``` void ast_format_cap_framing_set(struct ast_format_cap *cap, const struct ast_format *format, unsigned int framing); unsigned int ast_format_cap_framing_get(const struct ast_format_cap *cap, const struct ast_format *format); - ``` Example: @@ -644,7 +628,6 @@ static void example(void) ao2_ref(format, -1); ao2_ref(caps, -1); } - ``` #### Getting joint capabilities @@ -655,7 +638,6 @@ Joint capabilities are the common compatible formats between two capabilities st struct ast_format_cap *ast_format_cap_joint(const struct ast_format_cap *cap_preferred, const struct ast_format_cap *cap_secondary); int ast_format_cap_joint_copy(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2, struct ast_format_cap *result); int ast_format_cap_joint_append(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2, struct ast_format_cap *result); - ``` Example: diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Large-Messages.md b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Large-Messages.md index 2f852ab9cd..5cc00ed77a 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Large-Messages.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Large-Messages.md @@ -436,7 +436,6 @@ Content-Length: 415 --eqjjy-- - ``` On subsequent NOTIFYs that are caused by a single resource's state change, a partial state notification can be sent that is much smaller. diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Subscription-Abstraction-Plan.md b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Subscription-Abstraction-Plan.md index 5992cccd0f..bc8b6aff10 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Subscription-Abstraction-Plan.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/PJSIP-Subscription-Abstraction-Plan.md @@ -29,7 +29,6 @@ The following will need to be removed from the `ast_list_subscription` structure struct ast_sip_subscription { pjsip_evsub *evsub; }; - ``` With the division between real and virtual subscriptions, it makes no sense for virtual subscriptions to have a pointer to a `pjsip_evsub`. Instead, having a pointer to the parent subscription makes much more sense. Real subscriptions should still have a pointer to the PJSIP subscription, though. A union works well for this. Given the tree-like structure of `ast_sip_subscription`, appropriate fields need to be added to support this. As a final change, since users of the pubsub API will need access to the data, the name of the subscribed resource will need to be added to the structure. @@ -54,7 +53,6 @@ struct ast_sip_subscription { /*! List of child subscription */ AST_LIST_HEAD(,ast_sip_subscription) children; }; - ``` General API changes @@ -65,7 +63,6 @@ The biggest removals from the API are the following: ``` pjsip_evsub *ast_sip_subscription_get_evsub(struct ast_sip_subscription *sub); pjsip_dialog *ast_sip_subscription_get_dlg(struct ast_sip_subscription *sub); - ``` Those two functions assume that the subscription has a corresponding PJSIP subscription. However, users of the pubsub API can no longer make such an assumption since the subscription they interact with may be virtual. The main uses of these two functions by subscription handlers were as follows: @@ -102,7 +99,6 @@ void ast_sip_subscription_get_remote_uri(struct ast_sip_subscription *sub, char /*! Terminate an active SIP subscription */ void ast_sip_subscription_terminate(struct ast_sip_subscripiton *sub); - ``` You'll notice that there is no function to get the current subscription state. This is because state can be determined by the core pubsub API in most cases or can be determined based on the operation being performed. For instance, if `ast_sip_subscription_terminate` is called by a notifier, then the pubsub core will rightly set the subscription state as "terminated". @@ -123,7 +119,6 @@ struct ast_sip_subscription_handler { void (*subscription_terminated)(struct ast_sip_subscription *sub, pjsip_rx_data *rdata); void (*notify_response)(struct ast_sip_subscription *sub, pjsip_rx_data *rdata); }; - ``` All of these currently contain a `pjsip_rx_data` structure as a parameter. A notifier no longer can can operate on a `pjsip_rx_data` structure since the subscription as a whole may not pertain to the list member that the notifier is handling. In practice, a notifier should never need an entire SIP request to operate on; they care about the resource that is being subscribed to. Given that notifiers will not be directly responding to SIP requests, it means that the API can be made easier to use for notifiers. Also, since edits are being made in this area, a long-standing personal desire to separate subscribers and notifiers can be done here. @@ -149,7 +144,6 @@ struct ast_sip_subscription_notifier { /*! Get the name of a subscribed resourc */ const char *ast_sip_subscription_get_resource_name(struct ast_sip_subscription *sub); - ``` The biggest change is the one being made to the `new_subscribe` callback. Previously, this callback required the notifier to respond to the SIP SUBSCRIBE, then create an `ast_sip_subscription` structure, send an initial NOTIFY request, and then return the created `ast_sip_subscription`. The callback has been simplified greatly. Now, the notifier returns a response code for the pubsub core to send in response to the SUBSCRIBE request. If the response is a 200-class response, then the pubsub core will create the `ast_sip_subscription` itself, then immediately call back into the notifier with the `notify_required` callback in order to send the initial NOTIFY. At first, this appears to give a disadvantage over the previous version since the notifier will not have access to the `ast_sip_subscription` structure in the `new_subscribe` callback. However, since the `notify_required` callback is guranteed to be immediately called into with `AST_SIP_SUBSCRIPTION_NOTIFY_REASON_STARTED` as the reason, the notifier can use that opportunity to do anything that requires the subscription, such as setting up the underlying stasis subscription or adding datastores. @@ -173,7 +167,6 @@ struct ast_sip_subscription_handler { pjsip_rx_data *rdata, struct ast_sip_subscription_response_data *response_data); int (*refresh_subscription)(struct ast_sip_subscription *sub); } - ``` Here is the revised version: @@ -187,7 +180,6 @@ struct ast_sip_subscriber { /*! A NOTIFY has been received with the attached body */ void (*state_change)(struct ast_sip_subscription *sub, const char *body, enum pjsip_evsub_state state); } - ``` `ast_sip_create_subscription` is now only used by subscribers; notifiers have no need to create subscriptions themselves. As such, in addition to creating the `ast_sip_subscription` structure, it will also send out the initial SUBSCRIBE request to the specified resource at the specified endpoint. @@ -207,7 +199,6 @@ struct ast_sip_publication_handler { }; struct ast_sip_publication *ast_sip_create_publication(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata); - ``` Here is the revised edition: @@ -230,7 +221,6 @@ struct ast_sip_publication_handler { }; const char *ast_sip_publish_get_resource(struct ast_sip_publication *pub); - ``` Like with the notifier, the `new_publication` callback is being simplified just to be an indicator if the PUBLISH should be accepted or not. The pubsub core will take care of creating the publication and will then immediately call into the `publication_state_change` callback to relay the actual PUBLISH body to the handler. `publish_refresh` and `publish_termination` are not needed since the `publication_state_change` covers their functionality. diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Configuration.md b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Configuration.md index 24c3992d27..4c52f5f93c 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Configuration.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Configuration.md @@ -17,7 +17,6 @@ list_item = alice@outgoing list_item = carol@default,david@default full_state = yes notification_batch_interval = 2000 - ``` Here is a breakdown of the options: @@ -53,7 +52,6 @@ list_item = nadine@default list_item = olaf@default list_item = sales_team list_item = marketing_team - ``` In this example, someone could subscribe to the "business" resource and as a result be subscribed to "sales_team" and "marketing_team". @@ -69,7 +67,6 @@ Presence is the event package that maps SIP subscriptions to dialplan hints. Pre ``` list_item = exten@context - ``` A hint must exist at the given extension and context in order for presence to be reported for the resource in the list. @@ -84,7 +81,6 @@ list_item = mailbox@context ;If using external voicemail, then the format of the list_item is based on a schema of your own choosing list_item = my/crazy,homegrown|mailbox+hierarchy - ``` ### Other event packages @@ -110,7 +106,6 @@ list_item = alice@default type = resource_list event = presence list_item = bob@default - ``` This is a bad configuration. The result is up to the lower layers of configuration handling in Asterisk, but it will likely end up overwriting the first instance of foo with the second. @@ -129,7 +124,6 @@ list_item = alice@default type = resource_list event = message-summary list_item = bob@default - ``` This may seem valid since the two lists apply to different event packages. However, the object storage system that Asterisk uses (sorcery) does not allow for identically-named categories of the same type. As a result, this configuration is invalid. The most likely result of this setup would the second foo list overwriting the first foo list. @@ -154,7 +148,6 @@ list_item = baz type = resource_list event = presence list_item = alice@default - ``` In this configuration, foo references the bar list, and bar references the foo list. This is called a "loop" since attempting to follow the links between lists will result in an everlasting loop. In the above configuration, attempted subscriptions to the "foo" and "bar" lists are invalid since they create loops. However, the "baz" list is addressable on its own since subscribing to it does not create a loop. @@ -181,7 +174,6 @@ list_item = bob@default [default] exten => alice,hint,PJSIP/alice,CustomPresence:alice exten => bob,hint,PJSIP/bob,CustomPresence:bob - ``` In this configuration, if a subscriber subscribes to the "foo" list, then how is the list item interpreted? Does it refer to the list in pjsip.conf called "alice@default", or does it refer to the extensions.conf entry for extension alice in the default context? @@ -202,7 +194,6 @@ list_item = alice@default ;extensions.conf [default] exten => bob,hint,PJSIP/bob,CustomPresence:bob - ``` Notice that the foo resource list refers to alice@default, but this does not exist either as another resource list or as a dialplan extension. What happens in this case? diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Subscription-Test-Plan.md b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Subscription-Test-Plan.md index 42d8c81cea..284cc3acf5 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Subscription-Test-Plan.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/Resource-List-Subscription-Test-Plan.md @@ -28,7 +28,6 @@ list_item = bob [sipp] type = endpoint context = default - ``` extensions.conf: @@ -37,7 +36,6 @@ extensions.conf: [default] exten => alice,hint,Custom:alice exten => bob,hint,Custom:bob - ``` It is expected that tests that use the `mail_list` are using external MWI, not app_voicemail. @@ -83,7 +81,6 @@ Add the following line to each list in pjsip.conf: ``` full_state = yes - ``` Use SIPp to subscribe to a list. After Asterisk sends the initial notification, change the state of alice. Ensure that Asterisk sends a NOTIFY and that the following changes from the first NOTIFY are present: @@ -98,7 +95,6 @@ Add the following line to the configured list in pjsip.conf: ``` full_state = no - ``` Repeat Test 3. This time, the NOTIFY sent on the state change should have the following changes from the first NOTIFY sent: @@ -171,7 +167,6 @@ type = resource_list event = presence list_item = alice@default list_item = alice@default - ``` Have SIPp subscribe to `pres_list`. Ensure that Asterisk responds to the SUBSCRIBE with a 200 OK. Ensure that the NOTIFY Asterisk sends contains an RLMI body part with only a single resource (for alice) and only one application/pidf+xml body part. @@ -209,7 +204,6 @@ list_item = bob [sipp] type = endpoint context = default - ``` extensions.conf: @@ -218,7 +212,6 @@ extensions.conf: [default] exten => alice,hint,Custom:alice exten => bob,hint,Custom:bob - ``` Nominal Tests @@ -298,7 +291,6 @@ list_item = bob [sipp] type = endpoint context = default - ``` extensions.conf @@ -308,7 +300,6 @@ extensions.conf exten => alice,hint,Custom:alice exten => bob,hint,Custom:bob exten => carol,hint,Custom:carol - ``` #### Test 1: Subscription establishment diff --git a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/index.md b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/index.md index 41f62517e8..9051a995bc 100644 --- a/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/index.md +++ b/docs/Development/Roadmap/Asterisk-13-Projects/Resource-List-Subscriptions/index.md @@ -83,7 +83,6 @@ struct rlmi_data { struct ast_sip_subscription *list_subscription; AST_LIST_HEAD(,ast_list_subscription) child_subscriptions; }; - ``` This seems a bit minimalistic, but it should be enough. diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-ARI-and-generic-Text-To-Speech.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-ARI-and-generic-Text-To-Speech.md index 4e9f319eb2..244ad7b738 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-ARI-and-generic-Text-To-Speech.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-ARI-and-generic-Text-To-Speech.md @@ -15,7 +15,6 @@ Text to Speech is nice. If nothing else, it let's you get a demo off the ground ``` POST http://localhost:8088/ari/channels/12345/play/p1?media=tts:dude%20where%20is%20my%20car - ``` Is much more preferable than having to record the sound, put it on the file system, and playback the new sound file. Sure, there's no beating Allison for professional sound, but if the goal is just to make a funny noise in a demo, TTS is great. diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-Media-Playlists.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-Media-Playlists.md index 448c6b8a60..b6ac2a6057 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-Media-Playlists.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-Media-Playlists.md @@ -12,7 +12,6 @@ Media playback in ARI today queues multiple play operations to a resource, such POST /channels/12345/play?media=sound:tt-monkeys POST /channels/12345/play?media=sound:tt-weasels POST /channels/12345/play?media=number:555 - ``` This works well enough when you know that a user needs to listen to all of the prompts, and you don't need to cancel them. If, however, you need to let the prompts be interruptible or allow a user to manipulate the playback, you have to keep a reference to the current `Playback` object for the resource, as well as any 'future' `Playback` objects (so you can `delete` them). Alternatively, of course, you don't have to initiate all of the media operations at once - you can ostensibly play each when the previous has finished. However, that negates the benefit of the media queueing, and entails writing a state machine. @@ -33,7 +32,6 @@ ARI will allow a user to specify multiple media resources to play on a supported ``` POST /channels/12345/play?media=sound:tt-monkeys&media=sound:tt-weasels&media=number:555 - ``` ### Other Media Parameters @@ -60,7 +58,6 @@ On this Page ``` POST /playbacks/1283791327846/control?operation=next - ``` ### Existing Operations @@ -102,7 +99,6 @@ The `channels` and `bridges` resources will have their respective `play` operati "allowMultiple": true, "dataType": "string" }, - ``` The `playbacks` resource will have its `control` operation updated with new options for the `operation` query parameter. @@ -132,7 +128,6 @@ js { ] } } - ``` Core updates @@ -152,7 +147,6 @@ frame.h AST_CONTROL_STREAM_FORWARD = 1004, /*!< Indicate to a channel in playback to fast forwar */ AST_CONTROL_STREAM_PREV = 1005, /*!< Indicate to a channel in playback to play the previous strea */ AST_CONTROL_STREAM_NEXT = 1006, /*!< Indicate to a channel in playback to play the next strea */ - ``` * Update `channel.c` to consume and ignore the two new frame types diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-URI-Media-Playback.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-URI-Media-Playback.md index e5a804db7a..9a567691f8 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-URI-Media-Playback.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-14-Project-URI-Media-Playback.md @@ -56,7 +56,6 @@ Video is particularly difficult, as it typically requires multiple files (one vi ``` same => n,Playback(http://myserver.com/monkeys.h264|http://myserver.com/monkeys.wav) - ``` The behaviour of the files retrieved in such a fashion are as follows: @@ -77,14 +76,12 @@ Playback of a URI can be done via any of the supported playback operations, thro ``` same => n,Playback(http://myserver.com/monkeys.wav) - ``` Note that this can be combined with multiple URIs or sounds to form a playlist: ``` same => n,Playback(http://myserver.com/monkeys.wav&http://myserver.com/weasels.wav) - ``` Since an `&` is valid for a URI but is also used as a separator in dialplan, ampersands in a resource cannot be supported. If an ampersand is used in a URI (say, as part of a query), then the entire URI must be URI encoded. @@ -102,7 +99,6 @@ Since an `&` is valid for a URI but is also used as a separator in dialplan, amp ``` CONTROL STREAM FILE http://myserver.com/monkeys.wav "" 3000 - ``` ##### ARI @@ -114,7 +110,6 @@ http://localhost:8088/ari/channels/12345/play/p1?media=uri:list Content-Type: text/uri-list http://myserver.com/monkeys.wav - ``` This format works nicely with simple playlists, as it can specify multiple files to retrieve. Note that these files should be played back sequentially as a playlist (which is not yet supported, but will need to be by the time we get here!) @@ -127,7 +122,6 @@ Content-Type: text/uri-list http://myserver.com/monkeys.wav # Comment comment comment http://myserver.com/awesome-sound.wave - ``` Note that when the `Content-Type` is `text/uri-list`, the resource specified by the `uri` media scheme is simply tossed away, as we can only have a single list of URIs. Note that this approach is somewhat limiting in that supporting multiples @@ -159,7 +153,6 @@ http://localhost:8088/ari/channels/12345/play/p3 } ] } - ``` There's some obvious differences here: @@ -235,7 +228,6 @@ int ast_media_cache_create_or_update(const char *uri, const char *file_path, str * \retval -1 error */ int ast_media_cache_delete(const char *uri); - ``` ### CLI Commands @@ -253,7 +245,6 @@ http://myserver.com/monkeys.wav 2014-09-14 10:10:00 UTC /var/spool/asterisk/medi http://myserver.com/monkeys.h264 2014-09-14 10:10:00 UTC /var/spool/asterisk/media_cache/77asdf7a.h264 3 items found. - ``` Note that the last two files would have been created using a preferred file prefix. This allow the `file` and `app` core to "find" both the audio and the video file when opening up the stream returned by the `file_path` by the `media_cache`. @@ -271,7 +262,6 @@ This is really a handy way for a system administrator to force files to be pulle URI Last update Local file 0 items found. - ``` res_http_media_cache @@ -324,7 +314,6 @@ Support for a new Content-Type, `text/uri-list`, needs to be added to the HTTP s * \retval A list of URIs. This an ao2 object that must be disposed of by the caller of the function. */ struct ast_uri_list *ast_http_get_uri_list(struct ast_tcptls_session_instance *ser, struct ast_variable *headers); - ``` ### uri.h @@ -383,7 +372,6 @@ void ast_uri_list_iterator_destroy(struct ast_uri_list_iterator *iterator); * \retval The next \c ast_uri otherwise */ struct ast_uri *ast_uri_list_iterator_next(struct ast_uri_list_iterator *iterator); - ``` ARI @@ -487,7 +475,6 @@ js "models": { } } } - ``` Note that the following for `channels.json` would be repeated for `bridges.json`: @@ -527,7 +514,6 @@ js { } ] }, - ``` ### Mustache Templates diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-Beacon-Module.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-Beacon-Module.md index fea434dcab..2bb871f121 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-Beacon-Module.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-Beacon-Module.md @@ -49,7 +49,6 @@ Swagger Definition } ] } - ``` ```json title="beacon.json" linenums="1" { @@ -338,7 +337,6 @@ Swagger Definition } } } - ``` Example Request/Responses @@ -358,7 +356,6 @@ Response: 200 OK "token": { "id": "ca74af9d-260c-4764-b452-e0628a9468a9", "issue": "Mon Dec 29 2014 15:37:18 UTC" }, "server": { "id": "bc5829cc-4584-43e5-8395-a9b1206d7e02" } } - ``` ### Client Server Update @@ -405,7 +402,6 @@ PUT https://beacon.asterisk.org:80/servers/bc5829cc-4584-43e5-8395-a9b1206d7e02? "machine": "x86_64" } } - ``` Client: res_beacon @@ -456,7 +452,6 @@ When logging is enabled, the CLI will display - as the last thing that is displa [Dec 29 16:10:59] NOTICE[13489]: res_beacon.c:103 load_module: <<< <<< <<< ANONYMOUS USAGE STATISTICS ENABLED >>> >>> >>> Asterisk Ready. *CLI> - ``` Configuration @@ -496,7 +491,6 @@ start_time = 12:00 type = server proxy = https://batman:rocks@awesome_stats_server.mydomain.com/beacon verify_cert = false - ``` CLI Commands @@ -529,7 +523,6 @@ Asterisk Information: ... (laundry list) Operating System: Linux 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 - ``` ### beacon show configuration @@ -569,7 +562,6 @@ OperatingSystemName: Linux OperatingSystemRelease: 3.13.0-24-generic OperatingSystemVersion: #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 OperatingSystemMachine: x86_64 - ``` ARI Resources (13+) @@ -608,5 +600,4 @@ Swagger Definition } ] } - ``` diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/DNS-NAPTRSRV-Test-Plan-for-PJSIP.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/DNS-NAPTRSRV-Test-Plan-for-PJSIP.md index 27b4c6003e..0b0c12d2d1 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/DNS-NAPTRSRV-Test-Plan-for-PJSIP.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/DNS-NAPTRSRV-Test-Plan-for-PJSIP.md @@ -30,7 +30,6 @@ Procedure: ;; Priority Weight Port Target IN SRV 0 1 5060 main.test.internal. IN SRV 1 1 5060 backup.test.internal. - ``` * Disable NAPTR lookups for this test. Only allow UDP transport to be used. * Place an outbound SIP request to `sip:test.internal`. @@ -60,7 +59,6 @@ slow.test.internal IN A 127.0.0.1 _sip._udp.test.internal IN SRV 0 3 5061 fast.test.internal. IN SRV 0 1 5062 slow.test.internal. IN SRV 1 100 5063 backup.test.internal. - ``` * Set up two SIPp scenarios + `fast.xml` runs at 127.0.0.1, port 5060. It expects an incoming INVITE and responds to the INVITE with a 503 response @@ -94,7 +92,6 @@ Procedure: ``` test.internal IN A 127.0.0.1 - ``` * Disable NAPTR lookups for this test. Only enable UDP as the transport. * Place an outbound call to `sip:test.internal` @@ -135,7 +132,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. IN NAPTR 90 40 "s" "SIP+D2U" "" _sip._udp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Allow both UDP and TCP transports to be used for the outgoing call. * Place an outbound SIP call to `sip:test.internal`. @@ -154,7 +150,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. IN NAPTR 50 90 "s" "SIP+D2U" "" _sip._udp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Allow both UDP and TCP transports to be used for the outgoing call. * Place an outbound SIP call to `sip:test.internal` @@ -180,7 +175,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. IN NAPTR 60 50 "s" "SIP+D2U" "" _sip._udp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Only allow UDP to be used for the outgoing call. * Place an outbound call to `sip:test.internal` @@ -200,7 +194,6 @@ test.internal IN NAPTR 50 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. IN NAPTR 50 60 "s" "SIP+D2U" "" _sip._udp.test.internal. _sip._udp.test.internal IN SRV 1 1 5060 sip.test.internal - ``` * Enable NAPTR lookups for outbound SIP calls. Allow both UDP and TCP to be used for the outgoing call. * Place an outbound call to `sip:test.internal` @@ -246,7 +239,6 @@ Procedure: IN NAPTR 100 50 "a" "z3950+N2L+N2C" "" cidserver.test.internal. IN NAPTR 100 50 "a" "rcds+N2C" "" cidserver.test.internal. IN NAPTR 100 50 "s" "http+N2L+N2C+N2R" "" www.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Enable TCP, UDP, and TLS transports to be used. * Place an outbound call to `sip:test.internal` @@ -265,7 +257,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "s" "SIPS+D2T" "" _sips._tcp.test.internal. IN NAPTR 60 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Enable only UDP transport to be used. * Place an outbound call to `sip:test.internal` @@ -293,7 +284,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "a" "SIP+D2T" "" sip.tcp.test.internal. IN NAPTR 60 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Enable UDP, TCP, and TLS transports to be used. * Place an outbound call to `sip:test.internal` @@ -320,7 +310,6 @@ Procedure: ; order pref flags service regexp replacement IN NAPTR 50 50 "s" "SIP+D2T" "!.*!_sip._tcp.test.internal!" . IN NAPTR 60 50 "s" "SIP+D2U" "" _sip._udp.test.internal. - ``` * Enable NAPTR lookups for outbound SIP calls. Enable UDP, TCP, and TLS transports to be used. * Place an outbound call to `sip:test.internal` @@ -339,7 +328,6 @@ test.internal IN NAPTR 50 50 "s" "SIP+D2T" "" _sip._tcp.test.internal. IN NAPTR 60 50 "s" "SIP+D2U" "" _sip._udp.test.internal. _sip._udp.test.internal IN SRV 1 1 5060 sip.test.internal - ``` Note that there is no SRV record for `_sip._tcp.test.internal` @@ -377,7 +365,6 @@ tcp.test.internal IN A 127.0.0.1 udp.test.internal IN A 127.0.0.1 IN AAAA ::1 - ``` The parts of a SIP URI can be used to determine what transport should be used and/or what type of lookup should be used. Consult the following table @@ -435,7 +422,6 @@ _sip._udp.test.internal IN SRV 0 100 5060 main.test.internal. IN SRV 1 100 5060 backup.test.internal. test.internal IN NAPTR 0 0 "s" "SIP+D2U" "" _sip._udp.test.internal - ``` * Place a call to `sip:test.internal` * Ensure that a NAPTR lookup is performed for `test.internal` diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/index.md b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/index.md index 85c369ff0d..3bdb2bc2f8 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/index.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Asterisk-DNS-API/index.md @@ -240,7 +240,6 @@ int ast_dns_resolve_cancel(struct ast_dns_query *query); * \retval -1 failure */ int ast_dns_resolve(const char *name, int rr_type, int rr_class, struct ast_dns_result **result); - ``` On this Page @@ -344,7 +343,6 @@ int ast_dns_query_set_resolve_cancel(struct ast_dns_query_set *query_set); * \param query_set A DNS query set */ void ast_dns_query_set_free(struct ast_dns_query_set *query_set); - ``` dns_naptr.h @@ -404,7 +402,6 @@ unsigned short ast_dns_naptr_get_order(const struct ast_dns_record *record); * \return the preference */ unsigned short ast_dns_naptr_get_preference(const struct ast_dns_record *record); - ``` dns_srv.h @@ -448,7 +445,6 @@ unsigned short ast_dns_srv_get_weight(const struct ast_dns_record *record); * \return the port */ unsigned short ast_dns_srv_get_port(const struct ast_dns_record *record); - ``` dns_tlsa.h @@ -489,7 +485,6 @@ unsigned int ast_dns_tlsa_get_matching_type(const struct ast_dns_record *record) * \return the certificate association data */ const char *ast_dns_tlsa_get_association_data(const struct ast_dns_record *record); - ``` dns_resolver.h @@ -580,7 +575,6 @@ int ast_dns_resolver_register(const struct ast_core_dns_resolver *resolver); * \retval -1 failure */ int ast_dns_resolver_unregister(const struct ast_core_dns_resolver *resolver); - ``` dns_internal.h @@ -676,7 +670,6 @@ struct ast_dns_query_set { /*! \brief Timer for recurring resolutio */ int timer; }; - ``` Examples @@ -714,7 +707,6 @@ int test(void) } return 0; } - ``` Asynchronous Resolution @@ -753,7 +745,6 @@ int test(void) sleep(5); return 0; } - ``` Parallel Queries @@ -801,7 +792,6 @@ int test(void) sleep(5); return 0; } - ``` Fallback @@ -845,7 +835,6 @@ int test(void) sleep(5); return 0; } - ``` NAPTR @@ -916,7 +905,6 @@ int test(void) sleep(5); return 0; } - ``` Recurring @@ -951,5 +939,4 @@ int test(void) sleep(5); return 0; } - ``` diff --git a/docs/Development/Roadmap/Asterisk-14-Projects/Module-Loader-Ideas.md b/docs/Development/Roadmap/Asterisk-14-Projects/Module-Loader-Ideas.md index 88a8e0f308..1fcd74abae 100644 --- a/docs/Development/Roadmap/Asterisk-14-Projects/Module-Loader-Ideas.md +++ b/docs/Development/Roadmap/Asterisk-14-Projects/Module-Loader-Ideas.md @@ -29,7 +29,6 @@ module=func_uri [provides] function=PERIODIC_HOOK - ``` This example manifest was generated by 'make all'. @@ -121,7 +120,6 @@ pbx_config=Gosub type=function ; switch to requiring functions. pbx_config=GLOBAL pbx_config=CHANNEL - ``` In this example chan_sip is my channel driver, and pbx_config is my dialplan. The `[uses]` section of modules.conf declares that chan_sip requires a few additional modules, and pbx_config requires a couple dialplan application modules and functions. In the current modules.conf we could simply have a bunch of 'load=' statements in the correct order, but this does not help with shutdown / unload order. By declaring that chan_sip requires pbx_config, the admin is saying that pbx_config cannot be unloaded before chan_sip. @@ -133,7 +131,6 @@ One thing worth noting, none of my example configurations include ".so" after mo ``` [test] exten => s,1,Gosub(mymacro,s,1(test)) - ``` This could tell pbx.c that the extension test,s,1 is a user of app_stack, so app_stack should be loaded/held open by this dialplan. Understanding of functions would be more difficult. Some application uses can't be automatically known, such as through ExecIf. For these it would be recommended to put entries in the `[uses]` section of modules.conf, such as the examples with GLOBAL and CHANNEL. Autoload from pbx.c is not yet implemented, I think it's better as a follow-up feature - maybe after a general cleanup of pbx.c. @@ -143,7 +140,6 @@ This could tell pbx.c that the extension test,s,1 is a user of app_stack, so app ``` [settings] extensions.conf => sqlite3,asterisk,ast_config - ``` With the addition of realtime=sqlite3 in `[provides]` of res_config_sqlite3.manifest, extconfig.conf could add res_config_sqlite3 to pbx_config's dependency list. Does this apply to sorcery too? My plan is for this to replace preload functionality in modules.conf. diff --git a/docs/Development/Roadmap/Asterisk-15-Projects/SDP-Work.md b/docs/Development/Roadmap/Asterisk-15-Projects/SDP-Work.md index 63acaf561d..5bb084a0b6 100644 --- a/docs/Development/Roadmap/Asterisk-15-Projects/SDP-Work.md +++ b/docs/Development/Roadmap/Asterisk-15-Projects/SDP-Work.md @@ -243,7 +243,6 @@ int ast_sdp_state_update_remote_topology(struct ast_sdp_state *state, struct ast * This is useful for NAT operations and for direct media. */ int ast_sdp_state_set_connection_address(struct ast_sdp_state *state, struct ast_sockaddr *addr); - ``` Let's talk about the API a bit. The API introduces two new structures: `ast_sdp_state`, and `ast_sdp_options`. @@ -294,7 +293,6 @@ typedef int (*new_candidate_fn)(struct ast_rtp_instance *rtp, struct ast_rtp_eng * Indicate interest in being told of new ICE candidates. * int ast_rtp_instance_register_ice_new_candidate_cb(struct ast_rtp_instance *rtp, new_candidate_fn cb, void *data); - ``` This way, an RTP instance can be told by interested parties to be alerted whenever a new ICE candidate is learned. The data parameter is a way to quickly associate the RTP instance with another piece of data the callback cares about (like an SDP state or a PJSIP session). @@ -347,7 +345,6 @@ fail: ast_sdp_options_free(sdp_options); return -1; } - ``` In this example, we enable several SDP options and then use those to allocate the SDP state. The SDP state is saved onto the session for future use. @@ -365,7 +362,6 @@ int make_a_call(struct my_channel_driver_session *session, char *dest) return send_message(message); } - ``` When it comes time to make a call, all we have to do is request our local SDP, translate it into the appropriate representation, and then send our message out. The SDP that we retrieve in this case is based on the formats and options that we passed into SDP state creation. @@ -400,7 +396,6 @@ int incoming_call(struct my_channel_driver_session *session, struct my_channel_d return send_message(response); } - ``` This is very similar to what we did when creating an outgoing call. The interesting difference here is that we now potentially call `ast_sdp_state_set_remote()` if the incoming message has an SDP. This causes the subsequent call to `ast_sdp_state_get_local()` to behave differently. If the incoming message had an SDP, then `ast_sdp_state_get_local()` will return the negotiated SDP that we should use as an answer. If the incoming message had no SDP, then `ast_sdp_state_get_local()` will return the exact same SDP offer we use when making an outgoing call. @@ -425,7 +420,6 @@ int direct_media_enabled(struct my_channel_driver_session *session, struct ast_s return send_message(message); } - ``` It may be a bit confusing what's going on with the format_cap structures here. If we assume that Alice and Bob are going to be doing direct media, then let's pretend that this is the session with Alice. The peer_topology is Bob's topology. By making Bob's topology our local topology, it results in the joint topology being that of Bob and Alice. We update the SDP state to use this joint topology. We then also update the connection address so we place the correct address in it place. The subsequent call to get the local SDP now will properly reflect the updated capabilities and peer address. diff --git a/docs/Development/Roadmap/Asterisk-15-Projects/Stream-Support.md b/docs/Development/Roadmap/Asterisk-15-Projects/Stream-Support.md index b1b3dbfb48..092afe7da0 100644 --- a/docs/Development/Roadmap/Asterisk-15-Projects/Stream-Support.md +++ b/docs/Development/Roadmap/Asterisk-15-Projects/Stream-Support.md @@ -332,7 +332,6 @@ struct ast_stream_topology *ast_stream_topology_make(struct ast_format_cap *caps * \note All streams contained within the topology will be destroyed */ void ast_stream_topology_destroy(struct ast_stream_topology *topology); - ``` These functions can be used by anything to examine a stream after retrieving a stream (from a channel for example) and to manipulate a stream by a stream user. @@ -380,7 +379,6 @@ struct ast_stream_topology { */ AST_VECTOR(, struct ast_stream *) streams; }; - ``` The contents of a stream very much mirror that of the public and internal APIs. There is not anything truly hidden away yet. @@ -476,7 +474,6 @@ int ast_channel_stream_topology_request_change(struct ast_channel *chan, struct * It is not for use by the channel driver itself. */ int ast_channel_stream_topology_changed(struct ast_channel *chan, struct ast_stream_topology *topology); - ``` To indicate support for multiple streams a property has been added for channel technologies to enable. An inspection function exists for the purpose of getting the topology of streams on the channel. Once retrieved the normal topology functions can be used to inspect each stream individually. In the case of channel drivers they can also manipulate the stream topology provided the channel lock is held. @@ -517,7 +514,6 @@ enum ast_control_frame_type { AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE = 35, /*!< Channel indication that a stream topology change has been requested by the channel driver (only visible if ast_read_streams is used */ AST_CONTROL_STREAM_TOPOLOGY_CHANGED = 36, /*!< Channel indication that a stream topology change has occurred on the channel drive */ }; - ``` The control frame type is used to communicate a request to change the stream topology or an indication that the stream topology has changed. When written it is a request, when read it is informational. @@ -538,7 +534,6 @@ Creating streams on a channel ast_stream_topology_add(ast_channel_get_stream_topology(chan), audio_stream); ast_stream_topology_add(ast_channel_get_stream_topology(chan), video_stream); ast_channel_unlock(chan); - ``` This creates an audio and video stream and places them on the channel. @@ -560,7 +555,6 @@ Iterating } ast_channel_unlock(chan); - ``` This just loops through all the streams on a channel. @@ -580,7 +574,6 @@ Requesting a change to the stream topology ast_channel_stream_topology_request_change(chan, modified); ast_channel_unlock(chan); - ``` This code requests that the first stream on the channel be set to inactive. @@ -597,7 +590,6 @@ Handling a request to change the stream topology ast_channel_stream_topology_changed(chan, frame->data.ptr); } ast_frfree(frame); - ``` This code reads in a request to change the topology and accepts the topology as requested. Note that we only receive request changes if we are capable of supporting multiple streams. If this were to use ast_read() the topology request change would be internally handled. diff --git a/docs/Development/Roadmap/Asterisk-16-Projects/WebRTC-User-Experience-Improvements.md b/docs/Development/Roadmap/Asterisk-16-Projects/WebRTC-User-Experience-Improvements.md index 51cda6561a..cec96bf53e 100644 --- a/docs/Development/Roadmap/Asterisk-16-Projects/WebRTC-User-Experience-Improvements.md +++ b/docs/Development/Roadmap/Asterisk-16-Projects/WebRTC-User-Experience-Improvements.md @@ -108,7 +108,6 @@ void *ast_data_buffer_get(const struct ast_data_buffer *buffer, int pos); * \param buffer The data buffer */ void ast_data_buffer_free(struct ast_data_buffer *buffer); - ``` ### chan_pjsip @@ -150,7 +149,6 @@ unsigned int ast_rtp_instance_get_rtx_ssrc(struct ast_rtp_instance *rtp); * \param ssrc The remote RTX SSRC */ void ast_rtp_instance_set_remote_rtx_ssrc(struct ast_rtp_instance *rtp, unsigned int ssrc); - ``` Finally the "rtx" codec will need to be added as a valid option and enabled if RTP packet retransmission is enabled on the RTP instance. diff --git a/docs/Development/Roadmap/Asterisk-18-Projects/STIR-and-SHAKEN.md b/docs/Development/Roadmap/Asterisk-18-Projects/STIR-and-SHAKEN.md index 24b813a8cf..36c60eb99e 100644 --- a/docs/Development/Roadmap/Asterisk-18-Projects/STIR-and-SHAKEN.md +++ b/docs/Development/Roadmap/Asterisk-18-Projects/STIR-and-SHAKEN.md @@ -61,7 +61,6 @@ As STIR/SHAKEN requires retrieving and using a public key it is advantageous to ca_file=/etc/stir/theca.crt ca_path=/etc/stir/ca cache_max_size=1000 - ``` Individual certificates can be configured using the "certificate" type. @@ -71,7 +70,6 @@ Individual certificates can be configured using the "certificate" type. type=certificate path=/etc/stir/jcolp.crt public_key_url=http://joshua-colp.com/jcolp.crt - ``` A group of certificates can be configured using the "store" type. @@ -81,7 +79,6 @@ A group of certificates can be configured using the "store" type. type=store path=/etc/stir public_key_url=http://joshua-colp.com/${CERTIFICATE}.crt - ``` If the "store" type is used then all certificates in the directory will be examined and loaded. The public key URL is generated based on the filename and variable substitution. @@ -114,7 +111,6 @@ struct ast_stir_shaken_payload { * \brief Free a STIR/SHAKEN payload */ void ast_stir_shaken_payload_free(struct ast_stir_shaken_payload *payload); - ``` The structure could be made opaque with accessors if we desired. @@ -130,7 +126,6 @@ The module will expose a single API call that can be used to sign a payload. * \note This function will automatically add the "attest", "iat", and "origid" fields. */ struct ast_stir_shaken_payload *ast_stir_shaken_sign(struct ast_json *json); - ``` The API call will: @@ -151,7 +146,6 @@ The module will expose a single API call that can be used to verify a payload. * \brief Verify a JSON STIR/SHAKEN payload */ struct ast_stir_shaken_payload *ast_stir_shaken_verify(const char *header, const char *payload, const char *signature, const char *algorithm, const char *public_key_url); - ``` The API call will: @@ -182,7 +176,6 @@ enum ast_stir_shaken_verification_result { * \brief Add a STIR/SHAKEN verification result to a channel */ int ast_stir_shaken_add_verification(struct ast_channel *chan, const char *identity, const char *attestation, enum ast_stir_shaken_verification_result result); - ``` The API call will use a datastore to place STIR/SHAKEN verify results on the channel for usage in the dialplan. @@ -192,7 +185,6 @@ exten => s,1,NoOp(Number of STIR/SHAKEN identities: ${STIR_SHAKEN(count)}) exten => s,n,NoOp(First STIR/SHAKEN identity: ${STIR_SHAKEN(0,identity)}) exten => s,n,NoOp(First STIR/SHAKEN attestation: ${STIR_SHAKEN(0,attestation)}) exten => s,n,NoOp(First STIR/SHAKEN verify result: ${STIR_SHAKEN(0,verify_result)}) - ``` In the dialplan the STIR/SHAKEN identities can then be iterated or examine and based on that the user can choose what to do. diff --git a/docs/Development/Roadmap/Asterisk-19-Projects/Speech-to-Text-Text-to-Speech-Emotion.md b/docs/Development/Roadmap/Asterisk-19-Projects/Speech-to-Text-Text-to-Speech-Emotion.md index 8b62a3d47f..9b8bd29981 100644 --- a/docs/Development/Roadmap/Asterisk-19-Projects/Speech-to-Text-Text-to-Speech-Emotion.md +++ b/docs/Development/Roadmap/Asterisk-19-Projects/Speech-to-Text-Text-to-Speech-Emotion.md @@ -62,7 +62,6 @@ As mentioned above, JSON will be used for the protocol. There are requests: }, "data": "Inconceivable!" } - ``` ```json title="Possible Responses" @@ -94,7 +93,6 @@ As mentioned above, JSON will be used for the protocol. There are requests: "response": "error", "error_msg": "Could not connect to Google (server down)." } - ``` The app_config section contains arbitrary configuration options and are not defined by this protocol. They will be able to be set by the user, and then consumed by the external application. @@ -120,7 +118,6 @@ Here are some examples of what speech to text would look like. "language": "en" } } - ``` The first response lets us know that everything is good to go for translation. @@ -133,7 +130,6 @@ The first response lets us know that everything is good to go for translation. "type": "ulaw" } } - ``` The second response lets us know that translation is complete, with our result in the JSON under *data.* @@ -144,7 +140,6 @@ The second response lets us know that translation is complete, with our result i "response": "complete", "data": "Inconceivable!" } - ``` **Scenario 2 (failure)** @@ -170,7 +165,6 @@ The second response lets us know that translation is complete, with our result i "response": "error", "error_msg": "Could not connect to Google (server down)." } - ``` ****Scenario 3 (language not supported)**** @@ -196,7 +190,6 @@ The second response lets us know that translation is complete, with our result i "response": "error", "error_msg": "Google does not support the language 'en'." } - ``` ### Text to Speech @@ -227,7 +220,6 @@ Here are some examples of what text to speech would look like. }, "data": "Inconceivable!" } - ``` Unlike speech to text, we only need to know if setup was successful. Then we know that media will flow over the websocket. @@ -243,7 +235,6 @@ Unlike speech to text, we only need to know if setup was successful. Then we kno } } } - ``` **Scenario 2 (failure)** @@ -272,7 +263,6 @@ Unlike speech to text, we only need to know if setup was successful. Then we kno "response": "error", "error_msg": "Could not connect to Google (server down)." } - ``` ****Scenario 3 (codec not supported)**** @@ -301,5 +291,4 @@ Unlike speech to text, we only need to know if setup was successful. Then we kno "response": "error", "error_msg": "Google does not support the following codec(s): ulaw." } - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Adding-to-an-existing-section.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Adding-to-an-existing-section.md index bea1880fc7..ffad46b23b 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Adding-to-an-existing-section.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Adding-to-an-existing-section.md @@ -13,7 +13,6 @@ setting1=value1 [section-name](+) setting2=value2 - ``` This example shows that the **setting2** setting was added to the existing section of the configuration file. @@ -37,7 +36,6 @@ default_expiration=3600 [101](+) default_expiration=1200 - ``` ### With qualifiers: @@ -58,7 +56,6 @@ default_expiration=1200 [101](+type=endpoint) allow=g722 - ``` ### Regular Expression Qualifiers @@ -81,7 +78,6 @@ default_expiration=1200 [101](+type=endpoint) allow=g722 - ``` ### Multiple Qualifiers @@ -104,7 +100,6 @@ default_expiration=1200 [101](+type=endpoint) allow=g722 - ``` ## Include/Restrict @@ -129,5 +124,4 @@ default_expiration=1200 [101](+type=endpoint) allow=g722 - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Block-Comments.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Block-Comments.md index 63cae1c3eb..96701bd4cb 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Block-Comments.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Block-Comments.md @@ -7,14 +7,12 @@ Asterisk also allows us to create block comments. A block comment is a comment t ``` ;-- - ``` and continue across multiple lines until the character sequence ``` --; - ``` is encountered. The block comment ends immediately after --; is encountered. @@ -25,5 +23,4 @@ setting=true ;-- this is a block comment that begins on this line and continues across multiple lines, until we get to here --; - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Comments-on-a-Single-Line.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Comments-on-a-Single-Line.md index c9bfdb6d03..f1e20ec863 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Comments-on-a-Single-Line.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Comments/Comments-on-a-Single-Line.md @@ -15,5 +15,4 @@ setting=false ; this is a comment ;awesome=true ; the semicolon on the line above makes it a ; comment, disabling the setting - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Template-Syntax.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Template-Syntax.md index cb9c69068a..4078c09bf2 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Template-Syntax.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Template-Syntax.md @@ -8,7 +8,6 @@ To define a section as a template **only** (not to be loaded for use as configur ```conf linenums="1" [template-name](!) setting=value - ``` Alternatively the [Using Templates](/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Using-Templates) page will also discuss how to have a section inherit another section's settings without defining a template. In effect, using an "active" or "live" configuration section as your template. diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Using-Templates.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Using-Templates.md index a1bf92b3cf..48fe2fc007 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Using-Templates.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Templates/Using-Templates.md @@ -19,7 +19,6 @@ setting4=value4 [section-name](template-name,template-2,not-a-template) setting3=value3 - ``` This works even when the section name referenced in parentheses is **not defined as a template** as in the case of the "not-a-template" section. @@ -40,7 +39,6 @@ deny=192.168.1.1 [test-three](test-one,test-two) permit=192.168.3.1 host=charlie.example.com - ``` The [test-three] section will be processed as though it had been written in the following way: @@ -55,7 +53,6 @@ host=bravo.example.com deny=192.168.1.1 permit=192.168.3.1 host=charlie.example.com - ``` ## chan_sip Template Example @@ -97,5 +94,4 @@ Here is a more extensive and realistic example from the chan_sip channel driver' ; secret = not_very_secret ; [2136](public-phone,ulaw-phone) ; secret = not_very_secret_either - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Using-The-include-tryinclude-and-exec-Constructs.md b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Using-The-include-tryinclude-and-exec-Constructs.md index 7478e274da..217cfb1cfa 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Using-The-include-tryinclude-and-exec-Constructs.md +++ b/docs/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files/Using-The-include-tryinclude-and-exec-Constructs.md @@ -36,7 +36,6 @@ setting=true #include otherconfig.conf ; include another configuration file #include my_other_files/*.conf ; include all .conf files in the subdirectory my_other_files #exec otherprogram ; include output of otherprogram - ``` You can use #tryinclude if there is any chance the target file may not exist and you still want Asterisk to load the configuration for the module. @@ -46,5 +45,4 @@ Here is a more realistic example of how #exec might be used with real-world comm ```conf title=" " linenums="1" #exec /usr/bin/curl -s http://example.com/mystuff > /etc/asterisk/mystuff #include mystuff - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Database-Support-Configuration/SIP-Realtime-MySQL-table-structure.md b/docs/Fundamentals/Asterisk-Configuration/Database-Support-Configuration/SIP-Realtime-MySQL-table-structure.md index 4bc2dfa9f7..e42bc4c9e3 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Database-Support-Configuration/SIP-Realtime-MySQL-table-structure.md +++ b/docs/Fundamentals/Asterisk-Configuration/Database-Support-Configuration/SIP-Realtime-MySQL-table-structure.md @@ -105,5 +105,4 @@ CREATE TABLE IF NOT EXISTS `sipfriends` ( KEY `ipaddr` (`ipaddr`,`port`), KEY `host` (`host`,`port`) ) ENGINE=MyISAM; - ``` diff --git a/docs/Fundamentals/Asterisk-Configuration/Sorcery/Sorcery-Caching.md b/docs/Fundamentals/Asterisk-Configuration/Sorcery/Sorcery-Caching.md index 67fae41a55..f5d517aa7c 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Sorcery/Sorcery-Caching.md +++ b/docs/Fundamentals/Asterisk-Configuration/Sorcery/Sorcery-Caching.md @@ -68,7 +68,6 @@ sorcery.conf [res_pjsip] endpoint/cache=memory_cache endpoint=realtime,ps_endpoints - ``` Let's break this down line-by-line. The first line starts with "endpoint/cache". "endpoint" is the name of the object type. "/cache" is a cue to sorcery that the wizard being specified on this line is a cache. And "memory_cache" is the name of the caching wizard that has been added in Asterisk 14.0.0. The second line is the familiar line that specifies that endpoints can be retrieved from realtime by following the "ps_endpoints" configuration line in `extconfig.conf`. @@ -85,7 +84,6 @@ sorcery.conf [res_pjsip] endpoint/cache = memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=3600 endpoint = realtime,ps_endpoints - ``` The following configuration options are recognized by the memory cache: @@ -145,7 +143,6 @@ This command has the following syntax: Action: SorceryMemoryCacheExpireObject Cache: Object: - ``` Issuing this command will cause the specified object in the specified cache to be removed. Like all AMI commands, an optional ActionID may be specified. @@ -157,7 +154,6 @@ This command has the following syntax: ``` Action: SorceryMemoryCacheExpire Cache: - ``` Issuing this command will cause all objects in the specified cache to be removed. Like all AMI commands, an optional ActionID may be specified. @@ -170,7 +166,6 @@ This command has the following syntax: Action: SorceryMemoryCacheStaleObject Cache: Object: - ``` Issuing this command will cause the specified object in the specified cache to be marked as stale. For more information on what it means for an object to be stale, see [here](#expire-or-stale). Like all AMI commands, an optional ActionID may be specified. @@ -182,7 +177,6 @@ This command has the following syntax: ``` Action: SorceryMemoryCacheStale Cache: - ``` Issuing this command will cause all objects in the specified cache to be marked as stale. For more information on what it means for an object to be stale, see [here](#expire-or-stale). Like all AMI commands, an optional ActionID may be specified. @@ -223,7 +217,6 @@ auth/cache=memory_cache,expire_on_reload=yes auth = realtime,ps_auths aor/cache = memory_cache,object_lifetime_stale=1500,object_lifetime_maximum=1800,expire_on_reload=yes aor = realtime,ps_aors - ``` In this particular setup, the administrator has set different options for different object caches. @@ -249,7 +242,6 @@ sorcery.conf [res_pjsip] identify/cache = memory_cache,object_lifetime_stale=600,object_lifetime_maximum=1800,expire_on_reload=yes,full_backend_cache=yes identify = realtime,ps_endpoint_id_ips - ``` Just like with the previous section's configuration, we have configured an object to be retrieved from realtime and cached in memory. Notice, though, that we have added `full_backend_cache=yes` to the end of the line. This is what causes Asterisk to pre-cache the objects. Normally, PJSIP "identify" objects would be a bad fit for caching since we tend to retrieve them all at once rather than one-at-a-time. By pre-caching all objects though, Asterisk can now retrieve all of them directly from the cache. Also notice that the other caching options are still relevant here. Rather than having the options apply to individual objects, they now apply to all of the retrieved objects. So if Asterisk retrieved 10 identifys during pre-cache, when the stale lifetime rolls around, all 10 will be marked stale and Asterisk will once again retrieve all of the objects from the backend. @@ -269,7 +261,6 @@ This command has the following syntax: ``` Action: SorceryMemoryCachePopulate Cache: - ``` Issuing this command has the same effect as the CLI "sorcery memory cache populate" command. It will invalidate all cached entries from the particular cache and then repopulate it with all objects from the backend. diff --git a/docs/Fundamentals/Asterisk-Configuration/Sorcery/index.md b/docs/Fundamentals/Asterisk-Configuration/Sorcery/index.md index e5a4174834..fa6583883b 100644 --- a/docs/Fundamentals/Asterisk-Configuration/Sorcery/index.md +++ b/docs/Fundamentals/Asterisk-Configuration/Sorcery/index.md @@ -62,7 +62,6 @@ The basic format follows: ``` [module_name] ;The brackets around the module name are literal, just as in most other Asterisk configuration files. object_type[/options] = wizard_name[,wizard_configuration_data] ;Bracketed items here are optional - ``` #### Module name @@ -99,7 +98,6 @@ test=memory [test_sorcery_cache] test/cache=test test=memory - ``` The following object mapping is the default mapping of external MWI mailbox objects to give persistence to the message counts. @@ -107,7 +105,6 @@ The following object mapping is the default mapping of external MWI mailbox obje ``` [res_mwi_external] mailboxes=astdb,mwi_external - ``` The following object mappings set PJSIP objects to use realtime database mappings from extconfig with the table names used when automatically generating configuration from the alembic script. @@ -122,7 +119,6 @@ contact=realtime,ps_contacts [res_pjsip_endpoint_identifier_ip] identify=realtime,ps_endpoint_id_ips - ``` ## PJSIP Default Wizard Configurations @@ -148,5 +144,4 @@ outbound-publish=config,pjsip.conf,criteria=type=outbound-publish [res_pjsip_outbound_registration] registration=config,pjsip.conf,criteria=type=registration - ``` diff --git a/docs/Fundamentals/Asterisk-Internal-Database/index.md b/docs/Fundamentals/Asterisk-Internal-Database/index.md index 3ec478eb71..20702a723e 100644 --- a/docs/Fundamentals/Asterisk-Internal-Database/index.md +++ b/docs/Fundamentals/Asterisk-Internal-Database/index.md @@ -37,5 +37,4 @@ database put -- Adds/updates database value database query -- Run a user-specified query on the astdb database show -- Shows database contents database showkey -- Shows database contents - ``` diff --git a/docs/Fundamentals/Directory-and-File-Structure.md b/docs/Fundamentals/Directory-and-File-Structure.md index 99eca86990..24bb11f3f6 100644 --- a/docs/Fundamentals/Directory-and-File-Structure.md +++ b/docs/Fundamentals/Directory-and-File-Structure.md @@ -12,7 +12,6 @@ Asterisk Configuration Files ``` astetcdir => /etc/asterisk - ``` This location is used to store and read Asterisk [configuration files](/Fundamentals/Asterisk-Configuration/Asterisk-Configuration-Files). That is generally files with a .conf extension, but other configuration types as well, for example [.lua](/Configuration/Dialplan/Lua-Dialplan-Configuration) and [.ael](/Configuration/Dialplan/Asterisk-Extension-Language-AEL). @@ -22,7 +21,6 @@ Asterisk Modules ``` astmoddir => /usr/lib/asterisk/modules - ``` [Loadable modules](/Fundamentals/Asterisk-Architecture/Types-of-Asterisk-Modules) in Shared Object format (.so) installed by Asterisk or the user should go here. @@ -32,7 +30,6 @@ Various Libraries ``` astvarlibdir => /var/lib/asterisk - ``` Additional library elements and files containing data used in runtime are put here. @@ -44,7 +41,6 @@ Database Directory ``` astdbdir => /var/lib/asterisk - ``` This location is used to store the data file for [Asterisk's internal database](/Fundamentals/Asterisk-Internal-Database). In Asterisk versions using the SQLite3 database, the file will be named astdb.sqlite3. @@ -54,7 +50,6 @@ Encryption Keys ``` astkeydir => /var/lib/asterisk - ``` When configuring key-based encryption, Asterisk will look in the **keys** subdirectory of this location for the necessary keys. @@ -64,7 +59,6 @@ System Data Directory ``` astdatadir => /var/lib/asterisk - ``` By default, Asterisk sounds are stored and read from the **sounds** subdirectory at this location. @@ -74,7 +68,6 @@ AGI(Asterisk Gateway Interface) Directory ``` astagidir => /var/lib/asterisk/agi-bin - ``` When using various AGI [applications](/Latest_API/API_Documentation/Dialplan_Applications/AGI), Asterisk looks here for the AGI scripts by default. @@ -84,7 +77,6 @@ Spool Directories ``` astspooldir => /var/spool/asterisk - ``` This directory is used for storing spool files from various core and module-provided components of Asterisk. @@ -105,7 +97,6 @@ Running Process Directory ``` astrundir => /var/run/asterisk - ``` When Asterisk is [running](/Operation/Running-Asterisk), you'll see two files here, **asterisk.ctl** and **asterisk.pid**. That is the control socket and the PID(Process ID) files for Asterisk. @@ -115,7 +106,6 @@ Logging Output ``` astlogdir => /var/log/asterisk - ``` When Asterisk is configured to [provide log file](/Operation/Logging) output, it will be stored in this directory. @@ -125,7 +115,6 @@ System Binary Directory ``` astsbindir => /usr/sbin - ``` By default, Asterisk looks in this directory for any system binaries that it uses, if you move the Asterisk binary itself or any others that it uses, you'll need to change this location. diff --git a/docs/Fundamentals/Key-Concepts/Frames/Audiohooks.md b/docs/Fundamentals/Key-Concepts/Frames/Audiohooks.md index a57bc35b6a..537cff8b0e 100644 --- a/docs/Fundamentals/Key-Concepts/Frames/Audiohooks.md +++ b/docs/Fundamentals/Key-Concepts/Frames/Audiohooks.md @@ -18,7 +18,6 @@ In this simple example, a SIP phone has dialed into Asterisk and its channel has Confluencenoneexten => 1,1,Answer() exten => 1,n,Set(PITCH_SHIFT(both)=higher) exten => 1,n,Voicemail(501) - ``` When a phone calls this extension, it will be greeted by a higher pitched version of the voicemail prompt and then the speaker will leave a message for 501. The sound going from the phone to voicemail will also be higher pitched than what was actually said by the person who left the message. @@ -36,7 +35,6 @@ Audio hook with two endpoints Confluencenoneexten => 1,1,Answer() exten => 1,n,MixMonitor(training_recording.wav) exten => 1,n,Queue(techsupport) - ``` Imagine the following scenario. An outside line calls into an Asterisk system to enter a tech support queue. When the call starts this user hears something along the lines of "Thank you for calling, all calls will be recorded for training purposes", so naturally MixMonitor will be used to record the call. The first available agent answers the call and can't quite seem to provide a working solution to the customer's problem, so he attempts to perform an attended transfer to someone with more expertise on the issue. The user gets transfered, and the rest of the call goes smoothly, but... ah nuts. The recording stopped for some reason when the agent transferred the customer to the other user. And why didn't this happen when he blind transferred a customer the other day? @@ -54,7 +52,6 @@ Confluencenoneexten => 1,1,Answer() exten => 1,n,MixMonitor(training_recording.wav) exten => 1,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) exten => 1,n,Queue(techsupport) - ``` Below is an illustrated example of how the masquerade process impacts an audiohook (in the case of the example, PITCH_SHIFT) diff --git a/docs/Fundamentals/Key-Concepts/States-and-Presence/Extension-State-and-Hints.md b/docs/Fundamentals/Key-Concepts/States-and-Presence/Extension-State-and-Hints.md index 6ce8c6e418..1169d01bf9 100644 --- a/docs/Fundamentals/Key-Concepts/States-and-Presence/Extension-State-and-Hints.md +++ b/docs/Fundamentals/Key-Concepts/States-and-Presence/Extension-State-and-Hints.md @@ -21,7 +21,6 @@ The full syntax for a hint is ``` exten = ,hint,[& - ``` Here is what you might see for a few configured hints. @@ -34,7 +33,6 @@ exten = 6002,hint,SIP/Bob exten = 6003,hint,SIP/Charlie&DAHDI/3 exten = 6004,hint,SIP/Diane,CustomPresence:Diane exten = 6005,hint,,CustomPresence:Ellen - ``` Things of note: @@ -61,7 +59,6 @@ For a quick CLI example, once you have defined some hints, you can easily check 6004@internal : SIP/Diane,CustomPres State:Unavailable Watchers 0 ---------------- - 5 hints registered - ``` In this example I was lazy, so they don't have real providers mapped otherwise you would see various states represented. diff --git a/docs/Fundamentals/Key-Concepts/States-and-Presence/Presence-State.md b/docs/Fundamentals/Key-Concepts/States-and-Presence/Presence-State.md index c8bc1bb616..23b29ea882 100644 --- a/docs/Fundamentals/Key-Concepts/States-and-Presence/Presence-State.md +++ b/docs/Fundamentals/Key-Concepts/States-and-Presence/Presence-State.md @@ -59,7 +59,6 @@ same => n,Hangup exten => 2001,1,GotoIf($[${PRESENCE_STATE(CustomPresence:Bob,value)}!=available]?voicemail) same => n,Dial(SIP/Bob) same => n(voicemail)VoiceMail(Bob@default) - ``` With this dialplan, a user can dial `2000@default` to toggle Bob's presence between `available` and `unavailable`. When a user attempts to call Bob using `2001@default`, if Bob's presence is currently not `available` then the call will go directly to voicemail. @@ -81,14 +80,12 @@ Like with device state, presence state is associated to a dialplan extension wit exten => 2000,hint,SIP/2000,CustomPresence:2000 exten => 2000,1,Dial(SIP/2000) same => n,Hangup() - ``` Or alternatively, you could define the presence state provider without a device. ``` exten => 2000,hint,,CustomPresence:2000 - ``` The **first** example would allow for someone subscribing to the extension state of `2000@default` to be notified of device state changes for device `SIP/2000` as well as presence state changes for the presence provider `CustomPresence:2000`. @@ -161,7 +158,6 @@ Supported: replaces, 100rel, timer, norefersub Content-Length: 0 <-------------> - ``` Phone Support for Presence State via SIP presence notifications diff --git a/docs/Fundamentals/Key-Concepts/States-and-Presence/Querying-and-Manipulating-State.md b/docs/Fundamentals/Key-Concepts/States-and-Presence/Querying-and-Manipulating-State.md index c1d388d8a1..3993ff7f30 100644 --- a/docs/Fundamentals/Key-Concepts/States-and-Presence/Querying-and-Manipulating-State.md +++ b/docs/Fundamentals/Key-Concepts/States-and-Presence/Querying-and-Manipulating-State.md @@ -18,7 +18,6 @@ On the command line, the **devstate** command will allow you to list or modify C ``` devstate change -- Change a custom device state devstate list -- List currently known custom device states - ``` On this Page @@ -37,7 +36,6 @@ myserver*CLI> core show hints 7777@from-internal : SIP/6003,CustomPrese State:Unavailable Watchers 0 ---------------- - 2 hints registered - ``` Presence State @@ -51,7 +49,6 @@ The **presencestate** CLI command will list or modify any currently defined Pres myserver*CLI> core show help presencestate presencestate change -- Change a custom presence state presencestate list -- List currently know custom presence states - ``` Asterisk Manager Interface actions diff --git a/docs/Getting-Started/Hello-World.md b/docs/Getting-Started/Hello-World.md index d688314151..8d3d740836 100644 --- a/docs/Getting-Started/Hello-World.md +++ b/docs/Getting-Started/Hello-World.md @@ -37,7 +37,6 @@ To get started, go ahead and move to the /etc/asterisk/ directory where the file ``` cd /etc/asterisk - ``` Configure extensions.conf @@ -48,7 +47,6 @@ Backup the sample extensions.conf and create a new one ``` mv extensions.conf extensions.sample vim extensions.conf - ``` I'm assuming you use the VI/VIM editor here, after all, it is the best. @@ -63,7 +61,6 @@ exten = 100,1,Answer() same = n,Wait(1) same = n,Playback(hello-world) same = n,Hangup() - ``` When a phone dials extension 100, we are telling Asterisk to **Answer** the call, **Wait** one second, then Play (**Playback**) a sound file (hello-world) to the channel and **Hangup**. @@ -98,7 +95,6 @@ host=dynamic secret=unsecurepassword disallow=all allow=ulaw - ``` Basic configuration will be explained in more detail in other sections of the wiki. For this example to work, just make sure you have everything exactly as written above. For the sake of terminology, it is useful to note that though we have this SIP configuration configured with "type=friend", most people refer to this as configuring a SIP peer. @@ -132,7 +128,6 @@ username=6001 [6001] type=aor max_contacts=1 - ``` Configure your SIP phone @@ -164,7 +159,6 @@ Back at the Linux shell go ahead and start Asterisk. We'll start Asterisk with a ``` asterisk -cvvvvv - ``` Or if Asterisk is already running, restart Asterisk from the shell and connect to it. @@ -172,7 +166,6 @@ Or if Asterisk is already running, restart Asterisk from the shell and connect t ``` asterisk -rx "core restart now" asterisk -rvvvvv - ``` Make the call diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Building-and-Installing-Asterisk.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Building-and-Installing-Asterisk.md index 96938e3272..699cafca17 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Building-and-Installing-Asterisk.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Building-and-Installing-Asterisk.md @@ -10,7 +10,6 @@ Now we can compile and install Asterisk. To compile Asterisk, simply type make a ``` [root@server asterisk-14.X.Y]# make - ``` The compiling step will take several minutes, and you'll see the various file names scroll by as they are being compiled. Once Asterisk has finished compiling, you'll see a message that looks like: @@ -23,14 +22,12 @@ The compiling step will take several minutes, and you'll see the various file na + make install + +-------------------------------------------+ +--------- Asterisk Build Complete ---------+ - ``` On this PageAs the message above suggests, our next step is to install the compiled Asterisk program and modules. To do this, use the **make** **install** command. ``` [root@server asterisk-14.X.Y]# make install - ``` When finished, Asterisk will display the following warning: @@ -49,7 +46,6 @@ When finished, Asterisk will display the following warning: + + +-------------------------------------------+ +---- Asterisk Installation Complete -------+ - ``` !!! warning Security Precautions @@ -71,7 +67,6 @@ Specific flags can be passed to `gcc` when Asterisk is configured, using the `CF ``` [root@server asterisk-14.X.Y]# ./configure CFLAGS=-pg LDFLAGS=-pg - ``` ### Debugging compilation @@ -80,7 +75,6 @@ To see all of the flags passed to gcc, build using the `NOISY_BUILD` setting set ``` [root@server asterisk-14.X.Y]# make NOISY_BUILD=yes - ``` ### Building for non-native architectures @@ -91,7 +85,6 @@ Generally, Asterisk attempts to optimize itself for the machine on which it is b [root@server asterisk-14.X.Y]# menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts [root@server asterisk-14.X.Y]# make - ``` ### Installing to a custom directory @@ -100,7 +93,6 @@ While there are multiple ways to sandbox an instance of Asterisk, the preferred ``` [root@server asterisk-14.X.Y]# ./configure --prefix=/usr/local/my_special_folder - ``` Note that the default value for `prefix` is `/usr/local`. diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Initialization-Scripts.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Initialization-Scripts.md index 8519a8f882..4026296112 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Initialization-Scripts.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Initialization-Scripts.md @@ -7,12 +7,10 @@ Now that you have Asterisk compiled and installed, the last step is to install t ``` [root@server asterisk-14.X.Y]# make config - ``` As your Asterisk system runs, it will generate logfiles. It is recommended to install the `logrotation` script in order to compress and rotate those files, to save disk space and to make searching them or cataloguing them easier. To do this, use the **make install-logrotate** command. ``` [root@server asterisk-14.X.Y]# make install-logrotate - ``` diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Sample-Files.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Sample-Files.md index 8c4cd25239..9fc104c5ca 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Sample-Files.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Installing-Sample-Files.md @@ -14,7 +14,6 @@ To install a set of sample configuration files for Asterisk, type: ``` [root@server asterisk-14.X.Y]# make samples - ``` Any existing sample files which have been modified will be given a **.old** file extension. For example, if you had an existing file named **extensions.conf**, it would be renamed to **extensions.conf.old** and the sample dialplan would be installed as **extensions.conf**. diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-DAHDI.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-DAHDI.md index 93bd753617..024711433e 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-DAHDI.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-DAHDI.md @@ -34,5 +34,4 @@ Starting with DAHDI-Linux-complete version 2.8.0+2.8.0, all files necessary to i [root@server dahdi-linux-complete-2.X.Y+2.X.Y]# make install [root@server dahdi-linux-complete-2.X.Y+2.X.Y]# make install-config - ``` diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-LibPRI.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-LibPRI.md index 346b3a07cb..b556f3a84c 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-LibPRI.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Building-and-Installing-LibPRI.md @@ -12,21 +12,18 @@ As in the other build and install sections, we'll assume that you'll replace the ``` [root@server src]# cd libpri-1.X.Y - ``` This command changes directories to the **libpri** source directory. ``` [root@server libpri-1.X.Y]# make - ``` This command compiles the **libpri** source code into a system library. ``` [root@server libpri-1.X.Y]# make install - ``` This command installs the **libpri** library into the proper system library directory diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Checking-Asterisk-Requirements.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Checking-Asterisk-Requirements.md index f0f075d38d..31b5dde45d 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Checking-Asterisk-Requirements.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/Checking-Asterisk-Requirements.md @@ -9,14 +9,12 @@ Now it's time to compile and install Asterisk. Let's change to the directory whi ``` [root@server]# cd /usr/local/src/asterisk-14.X.Y - ``` Next, we'll run a command called **./configure**, which will perform a number of checks on the operating system, and get the Asterisk code ready to compile on this particular server. ``` [root@server asterisk-14.X.Y]# ./configure - ``` This will run for a couple of minutes, and warn you of any missing system libraries or other dependencies. Unless you've installed all of the [System Requirements](/Operation/System-Requirements) for your version of Asterisk, the **configure** script is likely to fail. If that happens, resolve the missing dependency manually, or use the [install_prereq](#using-install_prereq) script to resolve all of the dependencies on your system. @@ -59,7 +57,6 @@ configure: OS type  : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : - ``` !!! tip Cached Data** The **./configure @@ -72,7 +69,6 @@ configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : --- You can then re-run **./configure**. - ``` ## Using install_prereq @@ -94,5 +90,4 @@ The **install_prereq** script is included with every release of Asterisk in the [root@server asterisk-14.X.Y/contrib/scripts]# ./install_prereq install [root@server asterisk-14.X.Y/contrib/scripts]# ./install_prereq install-unpackaged - ``` diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/PJSIP-pjproject.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/PJSIP-pjproject.md index 8a8e77c8f8..0a9d1ec15f 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/PJSIP-pjproject.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Prerequisites/PJSIP-pjproject.md @@ -36,7 +36,6 @@ $ ./configure --with-pjproject-bundled # For Asterisk 15+... $ ./configure $ make && make install - ``` The configure and make processes will download the correct version of pjproject, patch it, configure it, build it, and finally link Asterisk to it statically. No changes in runtime configuration are required. You can leave your system-installed version of pjproject in place if needed. Once compiled with the `--with-pjproject-bundled` option, Asterisk will ignore any other installed versions of pjproject. @@ -47,7 +46,6 @@ Using the bundled version of pjproject doesn't necessarily mean you need interne $ mkdir /tmp/downloads $ wget -O /tmp/downloads/pjproject-2.6.tar.bz2 http://www.pjsip.org/release/2.6/pjproject-2.6.tar.bz2 $ wget -O /tmp/downloads/pjproject-2.6.md5 http://www.pjsip.org/release/2.6/MD5SUM.txt - ``` It's important that both files be named `pjproject-.tar.bz2` and `pjproject-.md5` respectively. @@ -194,7 +192,6 @@ pjlib/include/pj/config_site.h */ #define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0 #define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0 - ``` Other common **configure** options needed for pjproject are listed below: @@ -293,7 +290,6 @@ Package libpjproject was not found in the pkg-config search path. Perhaps you should add the directory containing `libpjproject.pc' to the PKG_CONFIG_PATH environment variable No package 'libpjproject' found - ``` 1. Make sure you have `pkg-config` installed on your system. @@ -313,7 +309,6 @@ output/pjmedia-codec-x86_64-unknown-linux-gnu/opencore_amr.o:(.rodata+0x20): fir output/pjmedia-codec-x86_64-unknown-linux-gnu/opencore_amr.o:(.rodata+0x40): multiple definition of `pjmedia_codec_amrwb_framelen' output/pjmedia-codec-x86_64-unknown-linux-gnu/opencore_amr.o:(.rodata+0x40): first defined here ... - ``` Solution" @@ -329,7 +324,6 @@ When building pjproject, linker errors referring to various video methods are di /home/mjordan/projects/pjproject/pjmedia/lib/libpjmedia.so: undefined reference to `pjmedia_video_format_mgr_instance' /home/mjordan/projects/pjproject/pjmedia/lib/libpjmedia-videodev.so: undefined reference to `pjmedia_format_get_video_format_detail' /home/mjordan/projects/pjproject/pjmedia/lib/libpjmedia-videodev.so: undefined reference to `pjmedia_get_video_format_info' - ``` Solution: @@ -357,7 +351,6 @@ In file included from /usr/include/pj/types.h:33:0, from conftest.c:290: /usr/include/pj/config.h:1161:4: error: #error "PJ_IS_LITTLE_ENDIAN is not defined!" /usr/include/pj/config.h:1165:4: error: #error "PJ_IS_BIG_ENDIAN is not defined!" - ``` Solution: @@ -376,7 +369,6 @@ Solution: # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN # error Endianness must be declared for this processor # endif - ``` With this: @@ -391,7 +383,6 @@ With this: # define PJ_HAS_PENTIUM 0 # define PJ_IS_LITTLE_ENDIAN 1 # define PJ_IS_BIG_ENDIAN 0 - ``` Then recompile. This workaround was taken from issue [ASTERISK-23315](https://github.com/asterisk/asterisk/issues/jira/browse/ASTERISK-23315). @@ -404,7 +395,6 @@ pjproject provides an `uninstall` make target that will remove previous installa ```bash title=" " linenums="1" # make uninstall - ``` If you don't have an "uninstall" make target, you may need to fetch and merge the latest pjproject from @@ -413,21 +403,18 @@ Alternatively, the following should also remove all previously installed static ```bash title=" " linenums="1" # rm -f /usr/lib/libpj*.a /usr/lib/libmilenage*.a /usr/lib/pkgconfig/libpjproject.pc - ``` Finally, you will need to update shared library links: ```bash title=" " linenums="1" # ldconfig - ``` If you want to run a sanity check, you can verify that pjproject has been uninstalled by ensuring no pjproject modules remain on the system: ```bash title=" " linenums="1" # ldconfig -p | grep pj - ``` If running the above command yields no results, that's it! You have successfully uninstalled pjproject from your system. If there are results, you may need to remove other pjproject-related items from /usr/lib as well. diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Using-Menuselect-to-Select-Asterisk-Options.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Using-Menuselect-to-Select-Asterisk-Options.md index edf7fa2316..52793a2da0 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Using-Menuselect-to-Select-Asterisk-Options.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Using-Menuselect-to-Select-Asterisk-Options.md @@ -10,7 +10,6 @@ The next step in the build process is to tell Asterisk which [modules](/Fundamen ``` [root@server asterisk-14.X.Y]# make menuselect - ``` !!! note Terminal Window @@ -76,14 +75,12 @@ Options in **Menuselect** can be controlled from the command line. **Menuselect ``` [root@server asterisk-14.X.Y]# make menuselect.makeopts - ``` Available options can be viewed using the `--help` command line parameter: ``` [root@server asterisk-14.X.Y]# menuselect/menuselect --help - ``` Some of the more common options are shown below. @@ -100,7 +97,6 @@ To list all options in **Menuselect**, use the `--list-options` command line par ``` [root@server asterisk-14.X.Y]# menuselect/menuselect --list-options - ``` To list only the categories, use the `--category-list` command line parameter: @@ -127,7 +123,6 @@ MENUSELECT_EMBED MENUSELECT_CORE_SOUNDS MENUSELECT_MOH MENUSELECT_EXTRA_SOUNDS - ``` To list the options in a category, use the `--list-category` command line parameter: @@ -137,7 +132,6 @@ To list the options in a category, use the `--list-category` command line parame + FILE_STORAGE - ODBC_STORAGE - IMAP_STORAGE - ``` Enabling an Option @@ -147,7 +141,6 @@ To enable an option in Menuselect, use the `--enable` command line parameter: ``` [root@server asterisk-14.X.Y]# menuselect/menuselect --enable IMAP_STORAGE menuselect.makeopts - ``` !!! tip Chaining Options @@ -158,7 +151,6 @@ To enable an option in Menuselect, use the `--enable` command line parameter: [root@server asterisk-14.X.Y]# menuselect/menuselect --enable app_voicemail --enable IMAP_STORAGE menuselect.makeopts --- - ``` Disabling an Option @@ -168,7 +160,6 @@ To disable an option in **Menuselect**, use the `--disable` command line paramet ``` [root@server asterisk-14.X.Y]# menuselect/menuselect --disable app_voicemail menuselect.makeopts - ``` Enabling a Category @@ -178,5 +169,4 @@ An entire category can be enabled in **Menuselect** using the `--enable-category ``` [root@server asterisk-14.X.Y]# menuselect/menuselect --enable-category MENUSELECT_ADDONS menuselect.makeopts - ``` diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Validating-Your-Installation.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Validating-Your-Installation.md index c06a1f4940..d66a230345 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Validating-Your-Installation.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/Validating-Your-Installation.md @@ -7,14 +7,12 @@ Before continuing on, let's check a few things to make sure your system is in go ``` [root@server asterisk-14.X.Y]# lsmod | grep dahdi - ``` If the command returns nothing, then DAHDI has not been started. Start DAHDI by running: ``` [root@server asterisk-14.X.Y]# /etc/init.d/dadhi start - ``` !!! tip Different Methods for Starting Initscripts @@ -29,7 +27,6 @@ If the command returns nothing, then DAHDI has not been started. Start DAHDI by Distributions based on Debian (such as Ubuntu) have a similar command, though it's not commonly used: [root@server asterisk-14.X.Y]# invoke-rc.d dahdi start - ``` If you have DAHDI running, the output of **lsmod | grep dahdi** should look something like the output below. (The exact details may be different, depending on which DAHDI modules have been built, and so forth.) @@ -40,7 +37,6 @@ dahdi_transcode 7928 1 wctc4xxp dahdi_voicebus 40464 2 wctdm24xxp,wcte12xp dahdi 196544 12 wctdm24xxp,wcte11xp,wct1xxp,wcte12xp,wct4xxp crc_ccitt 2096 1 dahdi - ``` Now that DAHDI is running, you can run **dahdi_hardware** to list any DAHDI-compatible devices in your system. You can also run the **dahdi_tool** utility to show the various DAHDI-compatible devices, and their current state. @@ -50,7 +46,6 @@ To check if Asterisk is running, you can use the Asterisk `initscript`. ``` [root@server asterisk-14.X.Y]# /etc/init.d/asterisk status asterisk is stopped - ``` To start Asterisk, we'll use the `initscript` again, this time giving it the start action: @@ -58,7 +53,6 @@ To start Asterisk, we'll use the `initscript` again, this time giving it the sta ``` [root@server asterisk-14.X.Y]# /etc/init.d/asterisk start Starting asterisk: - ``` When Asterisk starts, it runs as a background service (or daemon), so you typically won't see any response on the command line. We can check the status of Asterisk and see that it's running using the command below. (The process identifier, or pid, will obviously be different on your system.) @@ -66,7 +60,6 @@ When Asterisk starts, it runs as a background service (or daemon), so you typica ``` [root@server asterisk-14.X.Y]# /etc/init.d/asterisk status asterisk (pid 32117) is running... - ``` And there you have it! You've compiled and installed Asterisk, DAHDI, and libpri from source code. diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/What-to-Download/index.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/What-to-Download/index.md index 066405a7da..9fdf67bed7 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/What-to-Download/index.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-From-Source/What-to-Download/index.md @@ -41,7 +41,6 @@ Saving to: ‘asterisk-14-current.tar.gz’ asterisk-14-current.tar.gz 100%[======================================================================>] 38.81M 3.32MB/s in 12s 2017-04-28 15:45:47 (3.37 MB/s) - ‘asterisk-14-current.tar.gz’ saved [40692588/40692588] - ``` ## Other Projects diff --git a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-on-Non-Linux-Operating-Systems/Asterisk-on-OpenSolaris.md b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-on-Non-Linux-Operating-Systems/Asterisk-on-OpenSolaris.md index 70e32cb4bd..f9e7dadd5c 100644 --- a/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-on-Non-Linux-Operating-Systems/Asterisk-on-OpenSolaris.md +++ b/docs/Getting-Started/Installing-Asterisk/Installing-Asterisk-on-Non-Linux-Operating-Systems/Asterisk-on-OpenSolaris.md @@ -49,7 +49,6 @@ Despite the above two possibilities, there is a workaround to make Asterisk comp ``` "make LDAP_INCLUDE=-I/usr/include/openldap" - ``` #### Makefile layouts @@ -77,7 +76,6 @@ ifeq ($(OSARCH),SunOS) ASTVARRUNDIR=/var/run/asterisk ASTMANDIR=/opt/asterisk/man else - ``` Note that, despite the comment, these definitions have build-time and run-time implications. Make sure you make these changes BEFORE you build! diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/CHANGES-and-UPGRADE.txt.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/CHANGES-and-UPGRADE.txt.md index 2625233136..ef8cebdb17 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/CHANGES-and-UPGRADE.txt.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/CHANGES-and-UPGRADE.txt.md @@ -25,7 +25,6 @@ core_relevant_title.txt README.md res_pjsip_relevant_title.txt res_rtp_relevant_title.txt - ``` !!! note @@ -42,7 +41,6 @@ Subject: Core Obviously this is just an example and when you write a description it should be way better than this. But you get the idea! - ``` !!! note @@ -64,7 +62,6 @@ Subject: res_ari Master-Only: True A master only change! - ``` !!! info "" diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Coding-Guidelines.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Coding-Guidelines.md index de5cc7c46d..c6007a3c21 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Coding-Guidelines.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Coding-Guidelines.md @@ -42,7 +42,6 @@ Every C source file should start with a proper copyright and a brief description ``` #include "asterisk.h" - ``` "asterisk.h" resolves OS and compiler dependencies for the basic set of unix functions (data types, system calls, basic I/O libraries) and the basic Asterisk APIs. @@ -92,7 +91,6 @@ struct foo { int bar; void *xyz; } - ``` On nearly every 64-bit platform, this will result in 4 bytes of dead space between 'bar' and 'xyz', because pointers on 64-bit platforms must be aligned on 8-byte boundaries. Once you have your code written and tested, it may be worthwhile to review your structure definitions to look for problems of this nature. If you are on a Linux platform with the 'dwarves' package available, the 'pahole' tool from that package can be used to both check for padding issues of this type and also propose reorganized structure definitions to eliminate it. Usage is quite simple; for a structure named 'foo', the command would look something like this: @@ -151,13 +149,11 @@ There is no shortage of whitespace characters :-) Use them when they make the co ``` for (str=foo;str;str=str->next) - ``` is harder to read than ``` for (str = foo; str; str = str->next) - ``` Following are examples of how code should be formatted. @@ -168,7 +164,6 @@ int foo(int a, char *s) { return 0; } - ``` ### If statements: @@ -191,7 +186,6 @@ case OTHER: other(); break; } - ``` ### No nested statements without braces @@ -201,7 +195,6 @@ for (x = 0; x < 5; x++) if (foo) if (bar) baz(); - ``` Instead, do: @@ -214,7 +207,6 @@ for (x = 0; x < 5; x++) { } } } - ``` Always use braces around the statements following an if/for/while construct, even if not strictly necessary, as it reduces future possible problems. @@ -228,7 +220,6 @@ if (foo) { result = 0; return; } - ``` Instead, try to minimize the number of lines of code that need to be indented, by only indenting the shortest case of the 'if' statement, like so: @@ -239,7 +230,6 @@ if (!foo) { } .... 50 lines of code .... - ``` When this technique is used properly, it makes functions much easier to read and follow, especially those with more than one or two 'setup' operations that must succeed for the rest of the function to be able to execute. @@ -299,7 +289,6 @@ static handle_option(const enum option opt) { ... } - ``` Note: The compiler will _not_ force you to pass an entry from the enum as an argument to this function; this recommendation serves only to make @@ -329,7 +318,6 @@ When making applications, always ast_strdupa(data) to a local pointer if you int if (data) { mydata = ast_strdupa(data); } - ``` Use the argument parsing macros to declare arguments and parse them, i.e.: @@ -342,7 +330,6 @@ Use the argument parsing macros to declare arguments and parse them, i.e.: ); parse = ast_strdupa(data); AST_STANDARD_APP_ARGS(args, parse); - ``` Make sure you are not duplicating any functionality already found in an API call somewhere. If you are duplicating functionality found in @@ -372,7 +359,6 @@ struct foo *tmp; ... tmp = ast_calloc(1, sizeof(*tmp)); - ``` Avoid the combination of ast_malloc() and memset(). Instead, always use ast_calloc(). This will allocate and zero the memory in a single operation. In the case that uninitialized memory is acceptable, there should be a comment in the code that states why this is the case. @@ -391,14 +377,12 @@ The functions strdup and strndup can \*not\* accept a NULL argument. This result } else { newstr = NULL; } - ``` However, the ast_strdup and ast_strdupa functions will happily accept a NULL argument without generating an error. The same code can be written as: ``` newstr = ast_strdup(str); - ``` Furthermore, it is unnecessary to have code that malloc/calloc's for the length of a string (+1 for the terminating '\0') and then using strncpy to copy the copy the string into the resulting buffer. This is the exact same thing as using ast_strdup. @@ -442,7 +426,6 @@ int ast_interesting_stuff(int thing1, int thing2) { return 0; } - ``` Notice the use of the \param, \brief, and \return constructs. These should be used to describe the corresponding pieces of the function being documented. Also notice the blank line after the last \param directive. All doxygen comments must be in one /*\! \ */ block. If the function or struct does not need an extended description it can be left out. @@ -466,7 +449,6 @@ struct interesting_struct int member2; /*!< \brief Another data member */ } - ``` Note that /\\*\! \ */ blocks document the construct immediately following them unless they are written, /\\*\!< \ */, in which case they document the construct preceding them. diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Gerrit-Usage.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Gerrit-Usage.md index b060938517..15e67cdd24 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Gerrit-Usage.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Code-Review/Gerrit-Usage.md @@ -69,14 +69,12 @@ Host asterisk Hostname gerrit.asterisk.org Port 29418 User {user} - ``` This will allow you to access the repository as shown below: ```bash title=" " linenums="1" $ git clone asterisk:{repo} - ``` ### Install git-review @@ -87,7 +85,6 @@ Most Gerrit users will be submitting patches for review and will need the `git r ```bash title="Install git-review from git " linenums="1" $ pip install git-review - ``` /// note It is recommended that you have git-review version 1.27.0 installed. You can check the installed version using "git review --version". If it is an old version you can install it using pip to receive the latest one. @@ -105,14 +102,12 @@ Set per repository $ cd $ git config --local --add user.email $ git config --local --add user.name - ``` Set globally ```bash $ git config --global --add user.email $ git config --global --add user.name - ``` ### Cloning from Gerrit @@ -176,7 +171,6 @@ You'll want to keep the local branches that track remote branches, like 13, 14 a ```bash title=" " linenums="1" $ git checkout 13 $ git checkout -b ASTERISK-12345 - ``` ### Do Some Work! @@ -204,7 +198,6 @@ ASTERISK-12345 #close Reported-by: Someone other than you Change-Id: I6dca12979f482ffb0450aaf58db0fe0f6d2e389 - ``` ### Submit @@ -303,7 +296,6 @@ If you have to make multiple changes over the lifetime of the review, you should $ git checkout 13 $ git branch -D reviews/joe_developer/ASTERISK-12345 $ git review -d 10000 - ``` ## Advanced Topics @@ -320,7 +312,6 @@ Solution: You may need to add an explicit git remote named "gerrit". ```bash $ git remote add gerrit - ``` #### Problem: Unable to login to [gerrit.asterisk.org](http://gerrit.asterisk.org) @@ -350,7 +341,6 @@ Solution: Run ```bash title=" " linenums="1" $ sudo pip install --upgrade setuptools - ``` on your command line @@ -361,7 +351,6 @@ Description: There is an incompatibility between certain version of git and ger ```bash title=" " linenums="1" $ git push --no-thin asterisk:{repo} HEAD:refs/for/master - ``` #### Problem: Unable to unsubscribe from Gerrit notifications diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Git-Usage.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Git-Usage.md index ad8821e371..4f1abf4bb4 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Git-Usage.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Git-Usage.md @@ -72,7 +72,6 @@ Topics ```bash title=" " linenums="1" $ git review -t ASTERISK-12345 - ``` This helps to tie Gerrit reviews to the JIRA issue that necessitated the change. diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Review-Board-Usage.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Review-Board-Usage.md index a43bc1f90a..4607b1a8c1 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Review-Board-Usage.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Review-Board-Usage.md @@ -46,21 +46,18 @@ The easiest way to post a patch to Review Board is by using the rbt tool. Instal ``` $ sudo easy_install -U RBTools - ``` Essentially, rbt is a script that will take the output of `svn diff` and create a review request out of it for you. Once you have a working copy with the changes you expect in the output of `svn diff`, run the following command: ``` $ rbt post [-r ] - ``` If it complains about not knowing which Review Board server to use, add the server option: ``` $ rbt --server=https://reviewboard.asterisk.org - ``` ### Dealing with New Files @@ -71,14 +68,12 @@ You would start by getting your changes applied to a trunk working copy: ``` $ cd .../trunk - ``` Then, apply the changes from your branch: ``` $ svn merge .../trunk .../team/group/my_new_code - ``` Now, the code is merged into your working copy. However, for a new file, subversion treats it as a copy of existing content and not new content, so new files don't show up in `svn diff` at this point. To get it to show up in the diff, use the following commands so svn treats it as new content and publishes it in the diff: @@ -86,7 +81,6 @@ Now, the code is merged into your working copy. However, for a new file, subvers ``` $ svn revert my_new_file.c $ svn add my_new_file.c - ``` Now, it should work, and you can run "rbt" as usual. @@ -109,5 +103,4 @@ Most of the time, a patch on Review Board will require multiple iterations befor ``` $ rbt post -r - ``` diff --git a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Subversion-Usage.md b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Subversion-Usage.md index 61350391ca..cbc56c49fa 100644 --- a/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Subversion-Usage.md +++ b/docs/Historical-Documentation/Development/Historical-Policies-and-Procedures/Subversion-Usage.md @@ -32,7 +32,6 @@ ssl-client-cert-file = /home//.subversion/-cert.p12 [global] ssl-authority-files = /home//.subversion/Digium_SVN-cacert-sha1.pem - ``` ## SVN Checkouts @@ -42,7 +41,6 @@ Checkouts that come from `http://svn.asterisk.org/` are read-only copies of the ``` $ svn co https://origsvn.digium.com/svn/asterisk/trunk $ svn co https://origsvn.digium.com/svn/asterisk/branches/1.8 - ``` # Using `svnmerge` for Cross-Branch Merging @@ -56,7 +54,6 @@ $ svn co http://svn.asterisk.org/svn/repotools $ cd repotools $ ./configure $ sudo make install - ``` ## `svnmerge` Properties @@ -134,7 +131,6 @@ All of these scripts create a commit message for you in the file `../merge.msg`. ``` $ svn commit -F ../merge.msg - ``` {tip} @@ -153,7 +149,6 @@ Sometimes a change is made in a branch and later it is decided that it should be $ cd 11 $ record811 $ svn commit -F ../merge.msg - ``` # Developer Branches @@ -174,7 +169,6 @@ $ svn checkout https://origsvn.digium.com/svn/asterisk/team/jdoe/my-fun-branch $ cd my-fun-branch $ svnmerge init $ svn commit -F svnmerge-commit-message.txt - ``` ## Deleting a Developer Branch @@ -183,7 +177,6 @@ To delete a developer branch after you are done with it use the SVN command show ``` $ svn delete https://origsvn.digium.com/svn/asterisk/team/jdoe/my-fun-branch - ``` ## Group Branches @@ -205,7 +198,6 @@ $ cd my-fun-branch $ svn ps automerge '*' . $ svn ps automerge-email 'me@example.com' . $ svn commit -m "initialize automerge" - ``` ### Setting `automerge-email` on a Group Branch @@ -214,7 +206,6 @@ For a branch with multiple developers working on it, it may be useful to have au ``` $ svn ps automerge-email 'me@example.com,you@example.com,him@example.com' . - ``` ### Resolving `automerge` Conflicts @@ -225,7 +216,6 @@ If your developer branch goes into conflict with `automerge` on, and the `autome $ cd my-branch $ svn update $ svnmerge merge - ``` Running the `svnmerge` tool will merge in the changes that cause your branch to go into conflict into your local copy. Edit the files that are in conflict to resolve the problems as appropriate. Finally, tell SVN that you have resolved the problem, re-enable automerge, and commit. @@ -234,7 +224,6 @@ Running the `svnmerge` tool will merge in the changes that cause your branch to $ svn resolved path/to/conflicted/file $ svn ps automerge '*' . $ svn commit -m "resolve conflict, enable automerge" - ``` ## Private Branches @@ -255,7 +244,6 @@ $ cd trunk $ svn merge --ignore-ancestry https://origsvn.digium.com/svn/asterisk/trunk https://origsvn.digium.com/svn/asterisk/team/jdoe/bug12345 . # Check the diff to see if it merged properly $ svn diff | less - ``` Be sure to check the resulting diff to make sure that the merge doesn't overwrite any changes in trunk. If it does, you will have to specify the specific revisions merge needs to base its diff off of. @@ -264,7 +252,6 @@ Be sure to check the resulting diff to make sure that the merge doesn't overwrit # The last change to bug12345 was at r2500. # trunk r2400 was merged into bug12345@2500. $ svn merge --ignore-ancestry https://origsvn.digium.com/svn/asterisk/trunk@2400 https://origsvn.digium.com/svn/asterisk/team/jdoe/bug12345@2500 . - ``` {note} @@ -275,7 +262,6 @@ Once this is done, the working copy will contain the trunk plus the changes from ``` $ svn revert . - ``` If you are purposely introducing new properties, or purposely introducing new values for existing properties, then you might do the following instead, so as not to destroy your properties: @@ -284,14 +270,12 @@ If you are purposely introducing new properties, or purposely introducing new va $ svn pd svnmerge-integrated . $ svn pd automerge . $ svn pd automerge-email . - ``` If everything merged cleanly, you can test compile and then: ``` $ svn commit -m "Merge branch for issue 12345" - ``` Once the contents of your branch has been merged, please use `svn remove` to remove it from the repository. It will still be accessible if needed by looking back in the repository history if needed. diff --git a/docs/Operation/Asterisk-Audio-and-Video-Capabilities.md b/docs/Operation/Asterisk-Audio-and-Video-Capabilities.md index 3ad9b25c55..1933a70864 100644 --- a/docs/Operation/Asterisk-Audio-and-Video-Capabilities.md +++ b/docs/Operation/Asterisk-Audio-and-Video-Capabilities.md @@ -46,7 +46,6 @@ context=from-internal allow=!all,ulaw auth=CATHY aors=CATHY - ``` We set the option "allow" to a string of values "!all,ulaw". @@ -65,7 +64,6 @@ voicemail.conf ``` [general] format=wav49,wav,gsm - ``` In the general section of voicemail.conf you can set the formats used when writing [voicemail](/Configuration/Applications/Voicemail)to the file-system. We set the option "format" to a string of file format names. @@ -148,7 +146,6 @@ mv output.sln output.sln32 --- In this example, an input WAV file has been converted to Signed Linear at a depth of 16-bits and at a rate of 32kHz. The resulting output.sln file is then renamed output.sln32 so that it can be processed correctly by Asterisk. - ``` Video and Image Support diff --git a/docs/Operation/Asterisk-Command-Line-Interface/CLI-Syntax-and-Help-Commands.md b/docs/Operation/Asterisk-Command-Line-Interface/CLI-Syntax-and-Help-Commands.md index 869e746127..36e7326084 100644 --- a/docs/Operation/Asterisk-Command-Line-Interface/CLI-Syntax-and-Help-Commands.md +++ b/docs/Operation/Asterisk-Command-Line-Interface/CLI-Syntax-and-Help-Commands.md @@ -42,7 +42,6 @@ Once on the console, the 'help' alias (for 'core show help') may be used to see acl show -- Show a named ACL or list all named ACLs ael reload -- Reload AEL configuration ... - ``` The 'help' alias may also be used to obtain more detailed information on how to use a particular command and listing sub-commands. For example, if you type 'help core show', Asterisk will respond with a list of all commands that start with that string. If you type 'help core show version', specifying a complete command, Asterisk will respond with a usage message which describes how to use that command. As with other commands on the Asterisk console, the help command also responds to tab command line completion. @@ -52,13 +51,11 @@ The 'help' alias may also be used to obtain more detailed information on how to core show applications [like|describing] -- Shows registered dialplan applications core show application -- Describe a specific dialplan application ... - ``` ``` *CLI> help core show version Usage: core show version Shows Asterisk version information. - ``` Help for functions, applications and more @@ -84,7 +81,6 @@ Wait(seconds) seconds Can be passed with fractions of a second. For example, '1.5' will ask the application to wait for 1.5 seconds. - ``` Module Configuration Help @@ -110,7 +106,6 @@ Usage: config show help [ [ [