Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

  



Html
<div class="fb-like" data-

...

Html
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Html
<div class="fb-like" data-href="https://confluence.wildix.com/x/swBuAQ" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div>


Html
 <div class="lang-box-pdf">
	<div>
		<div class="google-lang">
			<div id="google_translate_element">
			</div>
			<script type="text/javascript">
					function googleTranslateElementInit() {
						new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'de,es,fr,it,nl', autoDisplay: false}, 'google_translate_element');
						}
			</script>
			<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
		</div>
		
		<div class="pdf-button">
			<a href="https://confluence.wildix.com/x/swBuAQ" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div>
Html
 <div class="lang-box-pdf">
	<div>
		<div class="google-lang">
			<div id="google_translate_element">
			</div>
			<script type="text/javascript">
					function googleTranslateElementInit() {
						new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'de,es,fr,it,nl', autoDisplay: false}, 'google_translate_element');
						}
			</script>
			<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
		</div>
		
		<div class="pdf-button">
			<a href="https://confluence.wildix.com/spaces/flyingpdf/pdfpageexport.action?pageId=23986355" alt="Convert to .pdf" title="Convert to .pdf"><img src="https://confluence.wildix.com/download/attachments/14549012/pdf-button-download-wildix-documentation.png"></a>
		</div>
	</div>
</div>
Info

Smart Dialplan explains how to use Custom Applications in Wildix Dialplan to interact with external software and databases.

Updated: April 2020

Permalink: https://confluence.wildix.com/x/swBuAQ

Table of Contents

AGI in “Custom Application”

Variables in Dialplan

Variables are needed to store the information necessary to execute the application.

...

Syntax used to call a variable:  ${variablename}

Example:

Set a variable: set(foo=123456789)

Call a variable: ${foo:offset:length}

...

spaces/flyingpdf/pdfpageexport.action?pageId=23986355" alt="Convert to .pdf" title="Convert to .pdf"><img src="https://confluence.wildix.com/download/attachments/14549012/pdf-button-download-wildix-documentation.png"></a>
		</div>
	</div>
</div>


Info

Smart Dialplan explains how to use Custom Applications in Wildix Dialplan to interact with external software and databases.

Updated: October 2021

Permalink: https://confluence.wildix.com/x/swBuAQ

Table of Contents

AGI in “Custom Application”

Variables in Dialplan

Variables are needed to store the information necessary to execute the application.

Syntax used to set a variable: set(variablename=value)

Where:
variablename: is the name of the variable, it is insensitive to the variables defined by users
value: is the value attributed to the variable; value can be a function.

Syntax used to call a variable:  ${variablename}

Example:

Set a variable: set(foo=123456789)

Call a variable: ${foo:offset:length}

Where:
foo: is the name of the variable
offset: optional offset in starting to read a variable
length: optional number of characters to read

...

Note

With the help of QUEUE_MEMBER function it is possible to configure CG strategy to execute another Dialplan procedure. The function counts the number of free members of a Call group. When there are no available CG members, an incoming call is routed according to another Dialplan procedure.

  • Jump to if -> "${QUEUE_MEMBER(<call_group_id>,free)}"="0"

where

"free" - returns the number of not paused / busy members for a specified queue that can answer calls or are currently paused for the duration of wrap up time after a previous call (free CG members).

Note: Wrap up time and ringing state are not considered when using the function.

For example: All Call group members are put on pause for the duration period of wrap up time -> the incoming call stays in a queue until wrap up time doesn't expire

Warning

Limitation: the system recognizes unregistered (offline) CG members as available for answering calls. In case unregistered members are present in CG -> QUEUE_MEMBER = 0 performance is false.



Example 3: Check  if the CALLERID(number) matches a regular expression

GotoIf($[${REGEX("^0[6-7][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$" ${CALLERID(number)})}]?noanswer,01,1)

...

SayDigits(digits)
Says the digits, one by one, digits can be a variable.

SayNumber(number, gender)
Says number
gender is "f" for female voice; "m" - for male ;"c" - for neutral

Example:


Read(FOO,00000/smartdialplan/numcommande,3,,,10)

SayNumber(${FOO},f)

Dial(SIP/${FOO})

Implementation of Smart Dialplan: limited access to the phone based on the amount of credits purchased

...

You need to:

  • Upload PHP AGI (phpagi.sourceforge.net) to /var/www/agi/phpagi/phpagi.php

  • Upload test script to /var/www/scripts/test.php

...

Then you can use “remote script” in dialplan, example: Remote script

Microsoft SQL Integration

Create /rw2/var/www/scripts/sqllookup.php

...

  • Specify the call destination and the channel to use:

    • Channel: <channel>: Channel to use for the call.

    • CallerID: "name" <number> Caller ID, please note: it may not work if you do not respect the format: CallerID: "Some Name" <1234>

    • MaxRetries: <number> Number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.

    • RetryTime: <number> Seconds between retries. Default is 300 (5 min).

    • WaitTime: <number> Seconds to wait for an answer. Default is 45.

  • If the call answers, connect it here:

    • Context: <context-name> Context in extensions.conf

    • Extension: <ext> Extension definition in extensions.conf

    • Priority: <priority> Priority of extension to start with

    • Set: Set a variable to be used in the extension logic (example: file1=/tmp/to)

    • Application: Application to run (use it instead of specifying context, extension and priority)

    • Data: The options to be passed to the application

Use Callfile in dialplan

Create a script file in /var/www/scripts dir.

This script will be executed by dialplan.

Copy a template file and move the duplicated file to /var/spool/callweaver/outgoing/

callfile.sh

Code Block
------------------------------------------------------
#! /bin/sh
cp /var/www/scripts/test.call /var/www/scripts/temp.call
mv /var/www/scripts/temp.call /var/spool/callweaver/outgoing/
------------------------------------------------------
Give permissions to execute the script.
#chmod +x /var/www/scripts/callfile.sh
Create a template file in /var/www/scripts dir.
Test.call
------------------------------------------------------
Channel: SIP/0276510950/0970720101
Application: Playback
Data: 00000/callfile/message
---------------------------------------------------------

...

What else can you do with Custom Dialplan Apps?

...

Automatically generate a call and play a voice message

Read the doc: Delayed Paging

...

Automatically Generate a Call and Play a Recording

Block outgoing calls from hotel rooms

Read the doc: How to notify callers of call recordingblock outgoing calls from hotel rooms

Callback feature for Call groups

Read the docHow to enable Callback feature for Call groups

Change Voicemail PIN from a phone

Read the docHow to change Voicemail PIN from a phone

Director-Secretary configuration

...

Read the doc: How to automatically initiate an audio conference using API Originate

...

Notify callers of call recording

Read the doc: How to block outgoing calls from hotel rooms

...

notify callers of call recording

Record multiple answers from a caller and combine them into one file

Read the docHow to change Voicemail PIN from a phone

...

Recording multiple answers from a caller and combining them into one file

Set a sound before a message broadcasted to a Paging group 

Read the docAutomatically Generate a Call and Play a Recording

...

Paging Guide

Set up Delayed Paging

...

Read the doc: Recording multiple answers from a caller and combining them into one file

...

Delayed Paging