<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://docs.telcobridges.com/mediawiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs.telcobridges.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clod+Patry</id>
		<title>TBwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://docs.telcobridges.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clod+Patry"/>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Special:Contributions/Clod_Patry"/>
		<updated>2026-04-16T01:55:19Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.1</generator>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FN17753</id>
		<title>FN17753</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FN17753"/>
				<updated>2015-06-17T20:07:49Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: specify which version are affected (5.3.2.2-25)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FN17753 - Net-SNMP restarts and is generating core files}}&lt;br /&gt;
&lt;br /&gt;
= Affected Products =&lt;br /&gt;
* TMG800, TMG3200, TMG7800-CTRL&lt;br /&gt;
* Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Problem Description =&lt;br /&gt;
* snmpd process continuously restarts in a loop.&lt;br /&gt;
* System which are shipped before April 2015 requires this fix.&lt;br /&gt;
* This fix is applicable if you have an older net-snmp version than below. To verify:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# rpm -qa | grep snmp&lt;br /&gt;
 net-snmp-libs-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-utils-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-5.3.2.2-25.el5.tb&lt;br /&gt;
&lt;br /&gt;
If you have version previous to this one (5.3.2.2-25), you are affected by this Field Notice.&lt;br /&gt;
&lt;br /&gt;
= Problem Symptoms =&lt;br /&gt;
* core files are observed in tbsnmpagent directory:&lt;br /&gt;
 /mnt/.0/tb/toolpack/setup/12358/2.8/apps/tbsnmpagent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Solution =&lt;br /&gt;
== Online Procedures ==&lt;br /&gt;
Applicable if the system has internet access with proper DNS configuration and is able to reach the TelcoBridges repositories server.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Make sure your system is pointing to the TelcoBridges repositories. Verify the following TelcoBridges repository file: &lt;br /&gt;
 vim /etc/yum.repos.d/TB-Base.repo&lt;br /&gt;
&lt;br /&gt;
 # TelcoBridges-Base.repo&lt;br /&gt;
 #&lt;br /&gt;
 # This repository is using TelcoBridges frozen version of CentOS&lt;br /&gt;
 # to help client installing the required version of the&lt;br /&gt;
 # applications required to run Toolpack&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 [tb-base]&lt;br /&gt;
 name=TelcoBridges-$releasever - Base&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/os/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 &lt;br /&gt;
 #released updates&lt;br /&gt;
 [tb-updates]&lt;br /&gt;
 name=TelcoBridges-$releasever - Updates&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/updates/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb&lt;br /&gt;
 &lt;br /&gt;
* Get TelcoBridges repository key. If you don't already have them.&lt;br /&gt;
 cd /etc/pki/rpm-gpg/&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5-tb &lt;br /&gt;
* Update your net-snmp to the latest version&lt;br /&gt;
 yum update net-snmp*&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;br /&gt;
&lt;br /&gt;
== Offline Procedures ==&lt;br /&gt;
Applicable for systems which are behind the firewall in a private network without internet access.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Remove net-snmp. Confirm removal with &amp;quot;Y&amp;quot; when prompted.&lt;br /&gt;
 yum remove net-snmp&lt;br /&gt;
* Manually install below RPMs:&lt;br /&gt;
 rpm -ivhU net-snmp-libs-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-utils-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
* Above files can be found at:&lt;br /&gt;
 http://repo.telcobridges.com/centos/5/os/x86_64/CentOS/&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FN17753</id>
		<title>FN17753</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FN17753"/>
				<updated>2015-06-17T20:04:17Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Force to update only net-snmp instead of the whole system.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FN17753 - Net-SNMP restarts and is generating core files}}&lt;br /&gt;
&lt;br /&gt;
= Affected Products =&lt;br /&gt;
* TMG800, TMG3200, TMG7800-CTRL&lt;br /&gt;
* Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Problem Description =&lt;br /&gt;
* snmpd process continuously restarts in a loop.&lt;br /&gt;
* System which are shipped before April 2015 requires this fix.&lt;br /&gt;
* This fix is applicable if you have an older net-snmp version than below. To verify:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# rpm -qa | grep snmp&lt;br /&gt;
 net-snmp-libs-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-utils-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-5.3.2.2-25.el5.tb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Problem Symptoms =&lt;br /&gt;
* core files are observed in tbsnmpagent directory:&lt;br /&gt;
 /mnt/.0/tb/toolpack/setup/12358/2.8/apps/tbsnmpagent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Solution =&lt;br /&gt;
== Online Procedures ==&lt;br /&gt;
Applicable if the system has internet access with proper DNS configuration and is able to reach the TelcoBridges repositories server.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Make sure your system is pointing to the TelcoBridges repositories. Verify the following TelcoBridges repository file: &lt;br /&gt;
 vim /etc/yum.repos.d/TB-Base.repo&lt;br /&gt;
&lt;br /&gt;
 # TelcoBridges-Base.repo&lt;br /&gt;
 #&lt;br /&gt;
 # This repository is using TelcoBridges frozen version of CentOS&lt;br /&gt;
 # to help client installing the required version of the&lt;br /&gt;
 # applications required to run Toolpack&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 [tb-base]&lt;br /&gt;
 name=TelcoBridges-$releasever - Base&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/os/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 &lt;br /&gt;
 #released updates&lt;br /&gt;
 [tb-updates]&lt;br /&gt;
 name=TelcoBridges-$releasever - Updates&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/updates/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb&lt;br /&gt;
 &lt;br /&gt;
* Get TelcoBridges repository key. If you don't already have them.&lt;br /&gt;
 cd /etc/pki/rpm-gpg/&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5-tb &lt;br /&gt;
* Update your net-snmp to the latest version&lt;br /&gt;
 yum update net-snmp*&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;br /&gt;
&lt;br /&gt;
== Offline Procedures ==&lt;br /&gt;
Applicable for systems which are behind the firewall in a private network without internet access.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Remove net-snmp. Confirm removal with &amp;quot;Y&amp;quot; when prompted.&lt;br /&gt;
 yum remove net-snmp&lt;br /&gt;
* Manually install below RPMs:&lt;br /&gt;
 rpm -ivhU net-snmp-libs-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-utils-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
* Above files can be found at:&lt;br /&gt;
 http://repo.telcobridges.com/centos/5/os/x86_64/CentOS/&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FN17753</id>
		<title>FN17753</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FN17753"/>
				<updated>2015-06-17T19:42:39Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: update the link for offline procedures.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FN17753 - Net-SNMP restarts and is generating core files}}&lt;br /&gt;
&lt;br /&gt;
= Affected Products =&lt;br /&gt;
* TMG800, TMG3200, TMG7800-CTRL&lt;br /&gt;
* Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Problem Description =&lt;br /&gt;
* snmpd process continuously restarts in a loop.&lt;br /&gt;
* System which are shipped before April 2015 requires this fix.&lt;br /&gt;
* This fix is applicable if you have an older net-snmp version than below. To verify:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# rpm -qa | grep snmp&lt;br /&gt;
 net-snmp-libs-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-utils-5.3.2.2-25.el5.tb&lt;br /&gt;
 net-snmp-5.3.2.2-25.el5.tb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Problem Symptoms =&lt;br /&gt;
* core files are observed in tbsnmpagent directory:&lt;br /&gt;
 /mnt/.0/tb/toolpack/setup/12358/2.8/apps/tbsnmpagent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Solution =&lt;br /&gt;
== Online Procedures ==&lt;br /&gt;
Applicable if the system has internet access with proper DNS configuration and is able to reach the TelcoBridges repositories server.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Make sure your system is pointing to the TelcoBridges repositories. Verify the following TelcoBridges repository file: &lt;br /&gt;
 vim /etc/yum.repos.d/TB-Base.repo&lt;br /&gt;
&lt;br /&gt;
 # TelcoBridges-Base.repo&lt;br /&gt;
 #&lt;br /&gt;
 # This repository is using TelcoBridges frozen version of CentOS&lt;br /&gt;
 # to help client installing the required version of the&lt;br /&gt;
 # applications required to run Toolpack&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 [tb-base]&lt;br /&gt;
 name=TelcoBridges-$releasever - Base&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/os/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 &lt;br /&gt;
 #released updates&lt;br /&gt;
 [tb-updates]&lt;br /&gt;
 name=TelcoBridges-$releasever - Updates&lt;br /&gt;
 baseurl=http://repo.telcobridges.com/centos/5/updates/$basearch/&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb&lt;br /&gt;
 &lt;br /&gt;
* Get TelcoBridges repository key. If you don't already have them.&lt;br /&gt;
 cd /etc/pki/rpm-gpg/&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5&lt;br /&gt;
 wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5-tb &lt;br /&gt;
* Update your system to the latest version&lt;br /&gt;
 yum update&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;br /&gt;
&lt;br /&gt;
== Offline Procedures ==&lt;br /&gt;
Applicable for systems which are behind the firewall in a private network without internet access.&lt;br /&gt;
&lt;br /&gt;
* Stop Toolpack&lt;br /&gt;
 tbtoolpack stop&lt;br /&gt;
* Remove net-snmp. Confirm removal with &amp;quot;Y&amp;quot; when prompted.&lt;br /&gt;
 yum remove net-snmp&lt;br /&gt;
* Manually install below RPMs:&lt;br /&gt;
 rpm -ivhU net-snmp-libs-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
 rpm -ivhU net-snmp-utils-5.3.2.2-25.el5.tb.x86_64.rpm&lt;br /&gt;
* Above files can be found at:&lt;br /&gt;
 http://repo.telcobridges.com/centos/5/os/x86_64/CentOS/&lt;br /&gt;
* Verify the updated net-snmp version. You should see:&lt;br /&gt;
 [root@TB011107 tbsnmpagent]# yum list net-snmp&lt;br /&gt;
 Loaded plugins: fastestmirror&lt;br /&gt;
 Loading mirror speeds from cached hostfile&lt;br /&gt;
  * tb-base: repo.telcobridges.com&lt;br /&gt;
  * tb-updates: repo.telcobridges.com&lt;br /&gt;
 Excluding Packages in global exclude list&lt;br /&gt;
 Finished&lt;br /&gt;
 Installed Packages&lt;br /&gt;
 net-snmp.x86_64                   1:5.3.2.2-25.el5.tb                         installed&lt;br /&gt;
* Start Toolpack&lt;br /&gt;
 tbtoolpack start&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2015-05-22T20:30:01Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Adding G722.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
== Supported codecs ==&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.722 G.722] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] ([http://tools.ietf.org/html/rfc4040 rfc4040]) - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TMG media gateways codec capacity ==&lt;br /&gt;
&amp;lt;br/&amp;gt; &lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; rowspan=&amp;quot;2&amp;quot; | Media Gateway&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;7&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | clearmode (rfc4040)&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|- &lt;br /&gt;
| TMG800-8 TMG3200-RJ8&lt;br /&gt;
| 256 || 118 || 254 || 256 || 256 || 254 || 256 || 116 || 128 || 150 || 182 || 118 || 214 || 190&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-RJ16 TMG3200-TE16 TMG7800-TE16&lt;br /&gt;
| 512 || 236 || 508 || 512 || 512 || 508 || 512 || 232 || 256 || 300 || 364 || 236 || 428 || 380&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE32 TMG7800-TE32&lt;br /&gt;
| 1024 || 472 || 1016 || 1024 || 1024 || 1016 || 1024|| 464 || 512 || 600 || 728 || 472 || 856 || 760&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE48 TMG7800-TE48&lt;br /&gt;
| 1536 || 708 || 1524 || 1536 || 1536 || 1524 || 1536 || 696 || 768 || 900 || 1092 || 708 || 1284 || 1140&lt;br /&gt;
|- &lt;br /&gt;
| TMG3200-TE64 TMG7800-TE64 TMG3200-STM1 TMG7800-STM1&lt;br /&gt;
| 2048 || 944 ||2032 || 2048 || 2048 || 2032 || 2048 || 928 || 1024 || 1200 || 1456 || 944 || 1712 || 1520&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tdev development platform ==&lt;br /&gt;
&lt;br /&gt;
=== TMP6400 Codec density ===&lt;br /&gt;
Codec density is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 59&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 118&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 177&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 236&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 60&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 120&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 180&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 240&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2015-05-22T20:12:22Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Adding G722&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
== Supported codecs ==&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.722 G.722] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] ([http://tools.ietf.org/html/rfc4040 rfc4040]) - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TMG media gateways codec capacity ==&lt;br /&gt;
&amp;lt;br/&amp;gt; &lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; rowspan=&amp;quot;2&amp;quot; | Media Gateway&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | clearmode (rfc4040)&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|- &lt;br /&gt;
| TMG800-8 TMG3200-RJ8&lt;br /&gt;
| 256 || 254 || 256 || 256 || 254 || 256 || 116 || 128 || 150 || 182 || 118 || 214 || 190&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-RJ16 TMG3200-TE16 TMG7800-TE16&lt;br /&gt;
| 512 || 508 || 512 || 512 || 508 || 512 || 232 || 256 || 300 || 364 || 236 || 428 || 380&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE32 TMG7800-TE32&lt;br /&gt;
| 1024 || 1016 || 1024 || 1024 || 1016 || 1024|| 464 || 512 || 600 || 728 || 472 || 856 || 760&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE48 TMG7800-TE48&lt;br /&gt;
| 1536 || 1524 || 1536 || 1536 || 1524 || 1536 || 696 || 768 || 900 || 1092 || 708 || 1284 || 1140&lt;br /&gt;
|- &lt;br /&gt;
| TMG3200-TE64 TMG7800-TE64 TMG3200-STM1 TMG7800-STM1&lt;br /&gt;
| 2048 || 2032 || 2048 || 2048 || 2032 || 2048 || 928 || 1024 || 1200 || 1456 || 944 || 1712 || 1520&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tdev development platform ==&lt;br /&gt;
&lt;br /&gt;
=== TMP6400 Codec density ===&lt;br /&gt;
Codec density is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 59&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 118&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 177&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 236&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 60&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 120&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 180&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 240&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2015-05-22T20:11:05Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: adding G722.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
== Supported codecs ==&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.722 G.722] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] ([http://tools.ietf.org/html/rfc4040 rfc4040]) - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TMG media gateways codec capacity ==&lt;br /&gt;
&amp;lt;br/&amp;gt; &lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; rowspan=&amp;quot;2&amp;quot; | Media Gateway&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | clearmode (rfc4040)&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|- &lt;br /&gt;
| TMG800-8 TMG3200-RJ8&lt;br /&gt;
| 256 || 254 || 256 || 256 || 254 || 256 || 116 || 128 || 150 || 182 || 118 || 214 || 190&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-RJ16 TMG3200-TE16 TMG7800-TE16&lt;br /&gt;
| 512 || 508 || 512 || 512 || 508 || 512 || 232 || 256 || 300 || 364 || 236 || 428 || 380&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE32 TMG7800-TE32&lt;br /&gt;
| 1024 || 1016 || 1024 || 1024 || 1016 || 1024|| 464 || 512 || 600 || 728 || 472 || 856 || 760&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE48 TMG7800-TE48&lt;br /&gt;
| 1536 || 1524 || 1536 || 1536 || 1524 || 1536 || 696 || 768 || 900 || 1092 || 708 || 1284 || 1140&lt;br /&gt;
|- &lt;br /&gt;
| TMG3200-TE64 TMG7800-TE64 TMG3200-STM1 TMG7800-STM1&lt;br /&gt;
| 2048 || 2032 || 2048 || 2048 || 2032 || 2048 || 928 || 1024 || 1200 || 1456 || 944 || 1712 || 1520&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tdev development platform ==&lt;br /&gt;
&lt;br /&gt;
=== TMP6400 Codec density ===&lt;br /&gt;
Codec density is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.722 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 59&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 118&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 177&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 236&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711.&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2015-05-22T20:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: fix typo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
== Supported codecs ==&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.722 G.722] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] ([http://tools.ietf.org/html/rfc4040 rfc4040]) - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TMG media gateways codec capacity ==&lt;br /&gt;
&amp;lt;br/&amp;gt; &lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; rowspan=&amp;quot;2&amp;quot; | Media Gateway&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | clearmode (rfc4040)&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|- &lt;br /&gt;
| TMG800-8 TMG3200-RJ8&lt;br /&gt;
| 256 || 254 || 256 || 256 || 254 || 256 || 116 || 128 || 150 || 182 || 118 || 214 || 190&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-RJ16 TMG3200-TE16 TMG7800-TE16&lt;br /&gt;
| 512 || 508 || 512 || 512 || 508 || 512 || 232 || 256 || 300 || 364 || 236 || 428 || 380&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE32 TMG7800-TE32&lt;br /&gt;
| 1024 || 1016 || 1024 || 1024 || 1016 || 1024|| 464 || 512 || 600 || 728 || 472 || 856 || 760&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE48 TMG7800-TE48&lt;br /&gt;
| 1536 || 1524 || 1536 || 1536 || 1524 || 1536 || 696 || 768 || 900 || 1092 || 708 || 1284 || 1140&lt;br /&gt;
|- &lt;br /&gt;
| TMG3200-TE64 TMG7800-TE64 TMG3200-STM1 TMG7800-STM1&lt;br /&gt;
| 2048 || 2032 || 2048 || 2048 || 2032 || 2048 || 928 || 1024 || 1200 || 1456 || 944 || 1712 || 1520&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tdev development platform ==&lt;br /&gt;
&lt;br /&gt;
=== TMP6400 Codec density ===&lt;br /&gt;
Codec density is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711.&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2015-05-22T20:05:45Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Adding G.722 to the list of universal codecs.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
== Supported codecs ==&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.722 G.722] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] ([http://tools.ietf.org/html/rfc4040 rfc4040]) - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TMG media gateways codec capacity ==&lt;br /&gt;
&amp;lt;br/&amp;gt; &lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; rowspan=&amp;quot;2&amp;quot; | Media Gateway&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;6&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | clearmode (rfc4040)&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|- &lt;br /&gt;
| TMG800-8 TMG3200-RJ8&lt;br /&gt;
| 256 || 254 || 256 || 256 || 254 || 256 || 116 || 128 || 150 || 182 || 118 || 214 || 190&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-RJ16 TMG3200-TE16 TMG7800-TE16&lt;br /&gt;
| 512 || 508 || 512 || 512 || 508 || 512 || 232 || 256 || 300 || 364 || 236 || 428 || 380&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE32 TMG7800-TE32&lt;br /&gt;
| 1024 || 1016 || 1024 || 1024 || 1016 || 1024|| 464 || 512 || 600 || 728 || 472 || 856 || 760&lt;br /&gt;
|-&lt;br /&gt;
| TMG3200-TE48 TMG7800-TE48&lt;br /&gt;
| 1536 || 1524 || 1536 || 1536 || 1524 || 1536 || 696 || 768 || 900 || 1092 || 708 || 1284 || 1140&lt;br /&gt;
|- &lt;br /&gt;
| TMG3200-TE64 TMG7800-TE64 TMG3200-STM1 TMG7800-STM1&lt;br /&gt;
| 2048 || 2032 || 2048 || 2048 || 2032 || 2048 || 928 || 1024 || 1200 || 1456 || 944 || 1712 || 1520&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tdev development platform ==&lt;br /&gt;
&lt;br /&gt;
=== TMP6400 Codec density ===&lt;br /&gt;
Codec denisty is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711.&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Toolpack:Profile_SDP_Description</id>
		<title>Toolpack:Profile SDP Description</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Toolpack:Profile_SDP_Description"/>
				<updated>2015-05-22T20:03:38Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Adding G.722 with payload type 9&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can specify the Profile SDP Description to define which [[voice codecs]] are supported in the [[NAP]] using this Profile.&lt;br /&gt;
&lt;br /&gt;
Here is the default Profile SDP Description.&lt;br /&gt;
&lt;br /&gt;
 m=audio 0 RTP/AVP 0 8 4 18 101 13&lt;br /&gt;
 a=rtpmap:101 telephone-event/8000&lt;br /&gt;
&lt;br /&gt;
Each line of the Profile SDP Description consists of text of the form &amp;lt;type&amp;gt;=&amp;lt;value&amp;gt;. &amp;lt;type&amp;gt; is always exactly one character and is case-significant. &amp;lt;value&amp;gt; is a structured text string whose format depends on &amp;lt;type&amp;gt;. It also will be case-significant unless a specific field defines otherwise.  Whitespace is not permitted either side of the `=' sign. In general &amp;lt;value&amp;gt; is either a number of fields delimited by a single space character or a free format string.&lt;br /&gt;
&lt;br /&gt;
In our Profile SDP Description, only 2 &amp;lt;type&amp;gt; are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Media Announcement===&lt;br /&gt;
&lt;br /&gt;
The format of media announcement is as follows.&lt;br /&gt;
&lt;br /&gt;
:m=&amp;lt;media&amp;gt; &amp;lt;port&amp;gt; &amp;lt;transport&amp;gt; &amp;lt;fmt list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The first sub-field is the media type. Currently defined media for TMedia is &amp;quot;audio&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*The second sub-field is the transport port to which the media stream will be sent. In Toolpack, it is not specified in Profile SDP Description and therefore you should specify &amp;quot;0&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
*The third sub-field is the transport protocol. For most of the application, you may specify it as &amp;quot;RTP/AVP&amp;quot; - the IETF's Realtime Transport Protocol using the Audio/Video profile carried over UDP.&lt;br /&gt;
&lt;br /&gt;
*The fourth and subsequent sub-fields are media formats.  For audio and video, these will normally be media payload types as defined in the RTP Audio/Video Profile. When a list of payload formats is given, this implies that all of these formats may be used in the session, but the first of these formats is the default format for the session. When the transport protocol is specified as &amp;quot;RTP/AVP&amp;quot;, the payload format can be specified as either&lt;br /&gt;
**the payload type number for static payload types&lt;br /&gt;
**the payload type number along with additional encoding information for dynamically allocated payload types.&lt;br /&gt;
&lt;br /&gt;
The payload type, which is carried in the actual RTP packet header, is used to identify the type of codec information carried in the packet. A list of payload type values for each codec is defined within RFC3551. Unfortunately, since the payload type field is only 7 bits-wide, all codecs cannot have a permanent payload type value understood universally by all VoIp systems. Therefore, some codecs have dynamic values that need to be negotiated through a call control or session control protocol such as SIP before the actual RTP session can take place.&lt;br /&gt;
&lt;br /&gt;
Here is the list of codec payload type values per RFC3551.&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Codec&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Payload type value&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.711 uLaw&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.723.1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.711 aLaw&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.722&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Comfort Noise&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;13&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.728&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.729AB&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;18&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.726-40&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.726-32&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 or dynamic (depends on the network)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.726-24&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.726-16&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;G.729EG&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;AMR&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;EVRC&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;QCELP&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dynamic&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use dynamic payload types, you need to specify the additional encoding information using the attribute for media announcement.&lt;br /&gt;
&lt;br /&gt;
===Attribute for Media Announcement===&lt;br /&gt;
&lt;br /&gt;
A media description may have any number of attributes (&amp;quot;a=&amp;quot; fields) which are media specific. The format of attribute is as follows.&lt;br /&gt;
&lt;br /&gt;
:a=&amp;lt;attribute&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:or&lt;br /&gt;
&lt;br /&gt;
:a=&amp;lt;attribute&amp;gt;:&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dynamic payload type====&lt;br /&gt;
&lt;br /&gt;
You specify the additional encoding information for dynamic payload type in the following format:&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:&amp;lt;payload type&amp;gt; &amp;lt;encoding name&amp;gt;/&amp;lt;clock rate&amp;gt;[/&amp;lt;encoding parameters&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
For audio streams, &amp;lt;encoding parameters&amp;gt; may specify the number of audio channels. This parameter may be omitted if the number of channels is one provided no additional parameters are needed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Other media specific attribute====&lt;br /&gt;
&lt;br /&gt;
The use of other media specific attributes depends on the specification of the RTP payload format for the specific media type. Here are some example of attributes.&lt;br /&gt;
&lt;br /&gt;
*a=fmtp:&amp;lt;format&amp;gt; &amp;lt;format specific parameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This attribute allows parameters that are specific to a particular format to be conveyed in a way that SDP doesn't have to understand them.  The format must be one of the formats specified for the media. Format-specific parameters may be any set of parameters required to be conveyed by SDP and given unchanged to the media tool that will use this format.&lt;br /&gt;
&lt;br /&gt;
*a=ptime:&amp;lt;packet time&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gives the length of time in milliseconds represented by the media in a packet. This is probably only meaningful for audio data. It should not be necessary to know ptime to decode RTP or vat audio, and it is intended as a recommendation for the encoding/packetisation of audio.  It is a media attribute, and is not dependent on charset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Examples  ====&lt;br /&gt;
&lt;br /&gt;
Here are some examples of the attributes found in the default profile SDP description. &lt;br /&gt;
&lt;br /&gt;
 a=rtpmap:97 iLBC/8000&lt;br /&gt;
 a=fmtp:97 mode=20&lt;br /&gt;
&lt;br /&gt;
The above defines iLBC codec of 8000/sec sample rate with 20ms frame size. &lt;br /&gt;
&lt;br /&gt;
  a=rtpmap:98 telephone-event/8000&lt;br /&gt;
&lt;br /&gt;
The above defines the [[DTMF]] relay using RFC2833. &lt;br /&gt;
&lt;br /&gt;
Here is another example, enabling Voice Activity Detection (VAD) for G.711 ulaw, G.711 alaw, G.723.1a and G.729b, in addition to telephony events. &lt;br /&gt;
&amp;lt;pre&amp;gt;m=audio 0 RTP/AVP 0 8 4 18 98 13&lt;br /&gt;
a=rtpmap:0 PCMU/8000&lt;br /&gt;
a=rtpmap:8 PCMA/8000&lt;br /&gt;
a=rtpmap:4 G723/8000&lt;br /&gt;
a=fmtp:4 bitrate=6300;annexa=yes&lt;br /&gt;
a=rtpmap:18 G729/8000&lt;br /&gt;
a=fmtp:18 annexb=yes&lt;br /&gt;
a=rtpmap:98 telephone-event/8000&lt;br /&gt;
a=fmtp:98 0-15&lt;br /&gt;
a=rtpmap:13 CN/8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example to disable silence suppression explicitly in the SDP.&lt;br /&gt;
&amp;lt;pre&amp;gt;m=audio 0 RTP/AVP 0 8 101&lt;br /&gt;
a=rtpmap:101 telephone-event/8000&lt;br /&gt;
a=fmtp:101 0-15&lt;br /&gt;
a=silenceSupp:off - - - -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below shows an example to enable GSM-FR with a dynamic payload type 99:&lt;br /&gt;
&amp;lt;pre&amp;gt;m=audio 0 RTP/AVP  18 4 8 0 96 97 98 99 13&lt;br /&gt;
a=rtpmap:96 iLBC/8000&lt;br /&gt;
a=rtpmap:97 iLBC/8000&lt;br /&gt;
a=fmtp:97 mode=20&lt;br /&gt;
a=rtpmap:98 telephone-event/8000&lt;br /&gt;
a=rtpmap:99 GSM-FR/8000&lt;br /&gt;
a=fmtp:4 bitrate=6.3&lt;br /&gt;
a=fmtp:4 annexa=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
1. Your toolpack license needs to be GSM enabled. Please contact TelcoBridges support if you are not sure.&amp;lt;br&amp;gt; &lt;br /&gt;
2. You may need additional third party GSM license(s) from the corresponding patent holders. e.g. GSM-EFR, GSM-HR&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a direct SIP&amp;amp;nbsp;INVITE&amp;amp;nbsp;with T.38. This can be useful if you know this route will always be with fax. It also doesn't require any IVR resources to detect the fax tones:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;m=image 0 udptl t38&lt;br /&gt;
a=T38FaxVersion:0&lt;br /&gt;
a=T38MaxBitRate:14400&lt;br /&gt;
a=T38FaxFillBitRemoval:0&lt;br /&gt;
a=T38FaxTranscodingMMR:0&lt;br /&gt;
a=T38FaxTranscodingJBIG:0&lt;br /&gt;
a=T38FaxRateManagement:transferredTCF&lt;br /&gt;
a=T38FaxMaxBuffer:400&lt;br /&gt;
a=T38FaxMaxDatagram:400&lt;br /&gt;
a=T38FaxUdpEC:t38UDPRedundancy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*[http://www.ietf.org/rfc/rfc2327.txt RFC2327] - SDP: Session Description Protocol&lt;br /&gt;
*[http://www.ietf.org/rfc/rfc3551.txt RFC3551] - RTP Profile for Audio and Video Conferences with Minimal Control&lt;br /&gt;
*[http://www.ietf.org/rfc/rfc3952.txt RFC3952] - Real-time Transport Protocol (RTP) Payload Format for internet Low Bit Rate Codec (iLBC) Speech&lt;br /&gt;
*[http://www.ietf.org/rfc/rfc2833.txt RFC2833] - RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2014-12-03T14:49:00Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: use string instead of symbol in the section &amp;quot;List of SIP reason causes&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
Those function are used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call params from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, gateway will try them one by one in the same order they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - display information&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - rn&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE - Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE - Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE - Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE - Q931: 'Calling party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP UDP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP UDP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' All values are documented in the '''noa_npi_remap.rb''' script and may change between major release.&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
values for calling_category&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xa)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x0)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;operator_french&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x1)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;operator_english&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x2)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;operator_german&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;operator_russian&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x4)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;operator_spanish&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0x5)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xa)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_with_priority&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xb)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xc)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;test&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xd)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;payphone&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;(0xf)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. 0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg 1/true: Redirecting number (and original called number) is forwarded to outgoing call leg The value for this parameter at input of routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration. &lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== request_uri_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script is always false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains a hash table of custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = {&amp;quot;P-my-custom-header&amp;quot;=&amp;gt;&amp;quot;value1&amp;quot;, &amp;quot;P-my-custom-header2&amp;quot;=&amp;gt;&amp;quot;value2&amp;quot;, &amp;quot;P-my-custom-header3&amp;quot;=&amp;gt;&amp;quot;value3&amp;quot;}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_profile&lt;br /&gt;
*remapped_incoming_profile&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following sections show how to access those different parameters from '''inside''' a filter.  The 'params' hash is the sole argument passed to a filter function and contains call, nap, route and bridge parameters.   This hash is created by the base_routing.rb scripts to regroup all relevant information just before calling the filter functions.&lt;br /&gt;
&lt;br /&gt;
=== Tone string format  ===&lt;br /&gt;
&lt;br /&gt;
All tone strings (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters are using this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== disconnect_tone_answer =====&lt;br /&gt;
  params[:bridge][:disconnect_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the disconnect tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{DefaultName}: Same file name (without parent folder path) as the one used when empty string is provided&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}: Same path as the one used when empty string is provided&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: &amp;quot;73EBA698&amp;quot;&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded or not to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = []&lt;br /&gt;
  bridge[ :diversion_reason ] &amp;lt;&amp;lt; :busy&lt;br /&gt;
  bridge[ :diversion_reason ] &amp;lt;&amp;lt; :unconditional&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number_reason_values|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows to relay [[Call transfer]] requests from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These field are 'read-only'. They won't be included in the outgoing call, as they represent the content of the call transfer request, not the outgoing call to make.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :message_not_compatible&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :msg_with_non_recognized_param_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type.&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;asr_statistics_struct&amp;quot;               Detailed Answer-Seizure Rate Statistics.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;availability_detection_struct&amp;quot;       Detailed availibility detection Statistics&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;registration_struct&amp;quot;                 Detailed registration Statistics&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, it's name in the routing scripts must be composed of the structure name appended by an underscore and the field name. &lt;br /&gt;
&lt;br /&gt;
For example the name to use for the global [[ASR]] percentage is: &lt;br /&gt;
&lt;br /&gt;
  asr_statistics_struct_global_asr_percent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
Example: @params = {:bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;br /&gt;
&lt;br /&gt;
[[category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump</id>
		<title>Support:How To extract backtrace from coredump</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump"/>
				<updated>2014-09-24T14:59:34Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: coredumps goes into the application's working directory.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.&lt;br /&gt;
&lt;br /&gt;
How to give useful informations related to a fault in the code:&lt;br /&gt;
&lt;br /&gt;
# Log to the primary server (ssh)&lt;br /&gt;
# Type tbsetup&lt;br /&gt;
#: Usually all core files goes into the application's working directory.&lt;br /&gt;
# Type cd APPLICATION&lt;br /&gt;
#:where:&lt;br /&gt;
#:&lt;br /&gt;
#:*APPLICATION is the application that crashes&lt;br /&gt;
#: In this example, we'll suppose APPLICATION is toolpack_engine&lt;br /&gt;
#:&lt;br /&gt;
# Execute command:  &amp;lt;pre&amp;gt;gdb -se &amp;quot;APPLICATION&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c CORE &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:where:&lt;br /&gt;
#:&lt;br /&gt;
#:*APPLICATION is the application that crashes&lt;br /&gt;
#:&lt;br /&gt;
#:*CORE is the core file.&lt;br /&gt;
#:&lt;br /&gt;
#:for example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;gdb -se &amp;quot;/lib/tb/toolpack/pkg/2.8.5/bin/release/x86_64-linux64/toolpack_engine&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c core.17900 &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
#:If you are not sure about which application caused the crash, you can look in the created file for:&lt;br /&gt;
#:&lt;br /&gt;
#:Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.&lt;br /&gt;
#:&lt;br /&gt;
#:For example, in that specific example, the crash happened at:&lt;br /&gt;
#:&amp;lt;code&amp;gt; Program terminated with signal 11, Segmentation fault.&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt;No symbol table info available.&lt;br /&gt;
#:&amp;lt;/code&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
# Attach the file /tmp/backtrace.txt in your bugID (ticket that you opened to report the problem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
if you see:	&lt;br /&gt;
 # gdb&lt;br /&gt;
 -bash: gdb: command not found&lt;br /&gt;
&lt;br /&gt;
This is because you did not install the gdb package.&lt;br /&gt;
You can do:&lt;br /&gt;
 yum install gdb&lt;br /&gt;
&lt;br /&gt;
If you prefer to run the application in gdb, consult this [[Support:How_To_Run_Toolpack_Application_In_gdb|page]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump</id>
		<title>Support:How To extract backtrace from coredump</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump"/>
				<updated>2014-09-24T14:01:31Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: created a link to run an application in gdb&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.&lt;br /&gt;
&lt;br /&gt;
How to give useful informations related to a fault in the code:&lt;br /&gt;
&lt;br /&gt;
# Log to the primary server (ssh)&lt;br /&gt;
# cd /tmp&lt;br /&gt;
#: Usually all core files goes into /tmp/&lt;br /&gt;
#:&lt;br /&gt;
# Execute command:  &amp;lt;pre&amp;gt;gdb -se &amp;quot;APPLICATION&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c CORE &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:where:&lt;br /&gt;
#:&lt;br /&gt;
#:*APPLICATION is the application that crashes&lt;br /&gt;
#:&lt;br /&gt;
#:*CORE is the core file.&lt;br /&gt;
#:&lt;br /&gt;
#:for example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;gdb -se &amp;quot;/lib/tb/toolpack/pkg/2.8.5/bin/release/x86_64-linux64/toolpack_engine&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c core.17900 &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
#:If you are not sure about which application caused the crash, you can look in the created file for:&lt;br /&gt;
#:&lt;br /&gt;
#:Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.&lt;br /&gt;
#:&lt;br /&gt;
#:For example, in that specific example, the crash happened at:&lt;br /&gt;
#:&amp;lt;code&amp;gt; Program terminated with signal 11, Segmentation fault.&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt;No symbol table info available.&lt;br /&gt;
#:&amp;lt;/code&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
# Attach the file /tmp/backtrace.txt in your bugID (ticket that you opened to report the problem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
if you see:	&lt;br /&gt;
 # gdb&lt;br /&gt;
 -bash: gdb: command not found&lt;br /&gt;
&lt;br /&gt;
This is because you did not install the gdb package.&lt;br /&gt;
You can do:&lt;br /&gt;
 yum install gdb&lt;br /&gt;
&lt;br /&gt;
If you prefer to run the application in gdb, consult this [[Support:How_To_Run_Toolpack_Application_In_gdb|page]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump</id>
		<title>Support:How To extract backtrace from coredump</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump"/>
				<updated>2014-09-24T13:57:25Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: better formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.&lt;br /&gt;
&lt;br /&gt;
How to give useful informations related to a fault in the code:&lt;br /&gt;
&lt;br /&gt;
# Log to the primary server (ssh)&lt;br /&gt;
# cd /tmp&lt;br /&gt;
#: Usually all core files goes into /tmp/&lt;br /&gt;
#:&lt;br /&gt;
# Execute command:  &amp;lt;pre&amp;gt;gdb -se &amp;quot;APPLICATION&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c CORE &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:where:&lt;br /&gt;
#:&lt;br /&gt;
#:*APPLICATION is the application that crashes&lt;br /&gt;
#:&lt;br /&gt;
#:*CORE is the core file.&lt;br /&gt;
#:&lt;br /&gt;
#:for example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;gdb -se &amp;quot;/lib/tb/toolpack/pkg/2.8.5/bin/release/x86_64-linux64/toolpack_engine&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c core.17900 &amp;gt; /tmp/backtrace.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
#:If you are not sure about which application caused the crash, you can look in the created file for:&lt;br /&gt;
#:&lt;br /&gt;
#:Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.&lt;br /&gt;
#:&lt;br /&gt;
#:For example, in that specific example, the crash happened at:&lt;br /&gt;
#:&amp;lt;code&amp;gt; Program terminated with signal 11, Segmentation fault.&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt; #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&amp;lt;br/&amp;gt;No symbol table info available.&lt;br /&gt;
#:&amp;lt;/code&amp;gt;&lt;br /&gt;
#:&lt;br /&gt;
# Attach the file /tmp/backtrace.txt in your bugID (ticket that you opened to report the problem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
if you see:	&lt;br /&gt;
 # gdb&lt;br /&gt;
 -bash: gdb: command not found&lt;br /&gt;
&lt;br /&gt;
This is because you did not install the gdb package.&lt;br /&gt;
You can do:&lt;br /&gt;
 yum install gdb&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump</id>
		<title>Support:How To extract backtrace from coredump</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump"/>
				<updated>2014-09-24T13:35:25Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: use absolute path instead of relative path&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.&lt;br /&gt;
&lt;br /&gt;
How to give useful informations related to a fault in the code:&lt;br /&gt;
&lt;br /&gt;
 1- Log to the primary server (ssh)&lt;br /&gt;
 2- cd /tmp&lt;br /&gt;
Usually all core files goes into /tmp/&lt;br /&gt;
&lt;br /&gt;
 3- Execute command:  gdb -se &amp;quot;APPLICATION&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c CORE &amp;gt; /tmp/backtrace.txt&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
APPLICATION is the application that crashes&lt;br /&gt;
&lt;br /&gt;
CORE is the core file.&lt;br /&gt;
&lt;br /&gt;
for example:&lt;br /&gt;
 gdb -se &amp;quot;/lib/tb/toolpack/pkg/2.8.5/bin/release/x86_64-linux64/toolpack_engine&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c core.17900 &amp;gt; /tmp/backtrace.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are not sure about which application caused the crash, you can look in the created file for:&lt;br /&gt;
&lt;br /&gt;
Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.&lt;br /&gt;
&lt;br /&gt;
For example, in that specific example, the crash happened at:&lt;br /&gt;
 Program terminated with signal 11, Segmentation fault.&lt;br /&gt;
 #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&lt;br /&gt;
 #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&lt;br /&gt;
 No symbol table info available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 4- Attach the file /tmp/backtrace.txt in your bugID (ticket that you opened to report the problem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
if you see:	&lt;br /&gt;
 # gdb&lt;br /&gt;
 -bash: gdb: command not found&lt;br /&gt;
&lt;br /&gt;
This is because you did not install the gdb package.&lt;br /&gt;
You can do:&lt;br /&gt;
 yum install gdb&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump</id>
		<title>Support:How To extract backtrace from coredump</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Support:How_To_extract_backtrace_from_coredump"/>
				<updated>2014-09-24T13:19:17Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a fault happens in toolpack, developers may need to get more useful informations to fix the problem.&lt;br /&gt;
&lt;br /&gt;
How to give useful informations related to a fault in the code:&lt;br /&gt;
&lt;br /&gt;
 1- Log to the primary server (ssh)&lt;br /&gt;
 2- cd /tmp&lt;br /&gt;
Usually all core files goes into /tmp/&lt;br /&gt;
&lt;br /&gt;
 3- Execute command:  gdb -se &amp;quot;APPLICATION&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c CORE &amp;gt; /tmp/backtrace.txt&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
APPLICATION is the application that crashes&lt;br /&gt;
&lt;br /&gt;
CORE is the core file.&lt;br /&gt;
&lt;br /&gt;
for example:&lt;br /&gt;
 gdb -se &amp;quot;./release/x86_64-linux64/toolpack_engine&amp;quot; -ex &amp;quot;bt full&amp;quot; -ex &amp;quot;thread apply all bt&amp;quot; --batch -c core.17900 &amp;gt; /tmp/backtrace.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are not sure about which application caused the crash, you can look in the created file for:&lt;br /&gt;
&lt;br /&gt;
Core was generated by `./release/x86_64-linux64/toolpack_engine -gw 12358'.&lt;br /&gt;
&lt;br /&gt;
For example, in that specific example, the crash happened at:&lt;br /&gt;
 Program terminated with signal 11, Segmentation fault.&lt;br /&gt;
 #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&lt;br /&gt;
 #0  0x000000000043ce59 in CallBridgingSampleDisplayMenu ()&lt;br /&gt;
 No symbol table info available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 4- Attach the file /tmp/backtrace.txt in your bugID (ticket that you opened to report the problem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
if you see:	&lt;br /&gt;
 # gdb&lt;br /&gt;
 -bash: gdb: command not found&lt;br /&gt;
&lt;br /&gt;
This is because you did not install the gdb package.&lt;br /&gt;
You can do:&lt;br /&gt;
 yum install gdb&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2014-04-04T19:10:48Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Remove useless lines before T38.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
=== Supported codecs ===&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&lt;br /&gt;
=== Codec density ===&lt;br /&gt;
Codec denisty is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711.&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Voice_codecs</id>
		<title>Voice codecs</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Voice_codecs"/>
				<updated>2014-04-04T19:10:19Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: adding clearmode to the universal list.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TelcoBridges products support the following voice codecs.&lt;br /&gt;
&lt;br /&gt;
=== Supported codecs ===&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''Universal codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.711 G.711] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.723.1 G.723.1] - Supported packet durations: 30,60 and 90 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.726 G.726] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729a/ab] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[[Clearmode]] - Supported packet durations: 5,10,20,30,40,50,60 msec&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**[http://en.wikipedia.org/wiki/T.38 T.38]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Wireline codecs''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.728 G.728] - Supported packet durations: 20,30,40,50 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/G.729 G.729eg] - Supported packet durations: 20,30,40,50,60,70 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Low_Bit_Rate_Codec iLBC] - Supported packet durations: [13kbps] 30 and 60 msec, [15kpbs] 20 and 40 msec&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Wireless codecs''' '''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
**[http://en.wikipedia.org/wiki/Adaptive_multi-rate_compression AMR] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Full_Rate GSM-FR] - Supported packet durations: 20 and 30 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Enhanced_Full_Rate GSM-EFR] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/EVRC EVRC] - Supported packet durations: 20,40 and 60 msec&lt;br /&gt;
**[http://en.wikipedia.org/wiki/QCELP QCELP] - Supported packet durations:  20,40 and 60 msec&lt;br /&gt;
**[[G.722.2 (AMR-WB)]] - Supported packet durations: 20,40,60 and 80 msec&lt;br /&gt;
&lt;br /&gt;
=== Codec density ===&lt;br /&gt;
Codec denisty is comprised of two modes:&lt;br /&gt;
*Mixed Mode&lt;br /&gt;
*Fixed Mode&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Mixed Mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is dynamically negotiated.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of &lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711 &lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 341&lt;br /&gt;
| 127&lt;br /&gt;
| 169&lt;br /&gt;
| 154&lt;br /&gt;
| 127&lt;br /&gt;
| 58&lt;br /&gt;
| 64&lt;br /&gt;
| 75&lt;br /&gt;
| 91&lt;br /&gt;
| 59&lt;br /&gt;
| 107&lt;br /&gt;
| 95&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 682&lt;br /&gt;
| 254&lt;br /&gt;
| 338&lt;br /&gt;
| 308&lt;br /&gt;
| 254&lt;br /&gt;
| 116&lt;br /&gt;
| 128&lt;br /&gt;
| 150&lt;br /&gt;
| 182&lt;br /&gt;
| 118&lt;br /&gt;
| 214&lt;br /&gt;
| 190&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1023&lt;br /&gt;
| 381&lt;br /&gt;
| 507&lt;br /&gt;
| 462&lt;br /&gt;
| 381&lt;br /&gt;
| 174&lt;br /&gt;
| 192&lt;br /&gt;
| 225&lt;br /&gt;
| 273&lt;br /&gt;
| 177&lt;br /&gt;
| 321&lt;br /&gt;
| 285&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1364&lt;br /&gt;
| 508&lt;br /&gt;
| 676&lt;br /&gt;
| 616&lt;br /&gt;
| 508&lt;br /&gt;
| 232&lt;br /&gt;
| 256&lt;br /&gt;
| 300&lt;br /&gt;
| 364&lt;br /&gt;
| 236&lt;br /&gt;
| 428&lt;br /&gt;
| 380&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixed mode ====&lt;br /&gt;
&lt;br /&gt;
The following densities are achieved when a codec mix is predefined.&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; rowspan=&amp;quot;2&amp;quot; | Type of.&lt;br /&gt;
VoIP mezzanine&lt;br /&gt;
! width=&amp;quot;400&amp;quot; colspan=&amp;quot;5&amp;quot; | Universal codecs&lt;br /&gt;
! width=&amp;quot;240&amp;quot; colspan=&amp;quot;3&amp;quot; | Other codecs&lt;br /&gt;
! width=&amp;quot;320&amp;quot; colspan=&amp;quot;4&amp;quot; | Wireless codecs'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.711.&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.723.1&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.726&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729ab&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | T.38&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.728&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | G.729eg&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | iLBC&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | AMR-WB&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | GSM-FR/GSM-EFR&lt;br /&gt;
! width=&amp;quot;80&amp;quot; | EVRC/QCELP&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-1&lt;br /&gt;
| 404&lt;br /&gt;
| 128&lt;br /&gt;
| 200&lt;br /&gt;
| 168&lt;br /&gt;
| 128&lt;br /&gt;
| 66&lt;br /&gt;
| 72&lt;br /&gt;
| 84&lt;br /&gt;
| 102&lt;br /&gt;
| 60&lt;br /&gt;
| 120&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-2&lt;br /&gt;
| 808&lt;br /&gt;
| 256&lt;br /&gt;
| 400&lt;br /&gt;
| 336&lt;br /&gt;
| 256&lt;br /&gt;
| 132&lt;br /&gt;
| 144&lt;br /&gt;
| 168&lt;br /&gt;
| 204&lt;br /&gt;
| 120&lt;br /&gt;
| 240&lt;br /&gt;
| 192&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-3&lt;br /&gt;
| 1212&lt;br /&gt;
| 384&lt;br /&gt;
| 600&lt;br /&gt;
| 504&lt;br /&gt;
| 384&lt;br /&gt;
| 198&lt;br /&gt;
| 216&lt;br /&gt;
| 252&lt;br /&gt;
| 306&lt;br /&gt;
| 180&lt;br /&gt;
| 360&lt;br /&gt;
| 288&lt;br /&gt;
|-&lt;br /&gt;
| TM-VOIP-4&lt;br /&gt;
| 1616&lt;br /&gt;
| 512&lt;br /&gt;
| 800&lt;br /&gt;
| 672&lt;br /&gt;
| 512&lt;br /&gt;
| 264&lt;br /&gt;
| 288&lt;br /&gt;
| 336&lt;br /&gt;
| 408&lt;br /&gt;
| 240&lt;br /&gt;
| 480&lt;br /&gt;
| 384&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
['''1'''] May require additional licenses&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Tmedia_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Tdev_Features|Voice Codecs]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Clearmode</id>
		<title>Clearmode</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Clearmode"/>
				<updated>2014-04-04T19:01:12Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ClearMode is defined in RFC4040 and it's a mode used to send data (vs voice).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
To configure clearmode, please see:&lt;br /&gt;
*[[Toolpack v2.7: clearmode_configuration]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[http://tools.ietf.org/html/rfc4040 RFC 4040]&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;br /&gt;
&lt;br /&gt;
[[category:Glossary]]&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration</id>
		<title>Toolpack v2.7: clearmode configuration</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration"/>
				<updated>2014-04-04T18:54:24Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: adding when ptime is not specify, this means 20ms.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== '''''Applies to version(s): v2.7.''''' ===&lt;br /&gt;
{{DISPLAYTITLE:Configure ClearMode}}&lt;br /&gt;
&lt;br /&gt;
Clearmode is defined in RFC4040 and is fully supported and does not required any special licensing or configuration from the Web portal to enable it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== For ISDN/SS7 to SIP calls ==&lt;br /&gt;
If the SETUP/IAM message have its Information Transfer Rate and Information Transfer Capability set to 64kbits/sec Unrestricted, the Codec will be force to Clear Channel on the SIP side.&lt;br /&gt;
&lt;br /&gt;
This will result in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
By not specifying the ptime, this means it's 20ms.&lt;br /&gt;
&lt;br /&gt;
If you want to use a packetization time different from 20ms, you have to go Profile-&amp;gt;RTP and Audio-&amp;gt;Clear Channel.&lt;br /&gt;
&lt;br /&gt;
[[Image:profile_clearmode.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this will result in a SDP like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
a=ptime:10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For SIP to ISDN/SS7 calls ==&lt;br /&gt;
In the INVITE message, if the SDP is received with Clear Channel SDP (CLEARMODE/8000), the SETUP/IAM ISDN/SS7 Information Transfer Rate and Information Transfer Capability will be set accordingly (64kbits/sec Unrestricted).&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
The use of Clear Channel is equivalent to the cost of G.711 codec density.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[http://tools.ietf.org/html/rfc4040 RFC 4040]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration</id>
		<title>Toolpack v2.7: clearmode configuration</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration"/>
				<updated>2014-04-04T18:52:01Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove a note with an internal ticket.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== '''''Applies to version(s): v2.7.''''' ===&lt;br /&gt;
{{DISPLAYTITLE:Configure ClearMode}}&lt;br /&gt;
&lt;br /&gt;
Clearmode is defined in RFC4040 and is fully supported and does not required any special licensing or configuration from the Web portal to enable it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== For ISDN/SS7 to SIP calls ==&lt;br /&gt;
If the SETUP/IAM message have its Information Transfer Rate and Information Transfer Capability set to 64kbits/sec Unrestricted, the Codec will be force to Clear Channel on the SIP side.&lt;br /&gt;
&lt;br /&gt;
This will result in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to use a packetization time different from 20ms, you have to go Profile-&amp;gt;RTP and Audio-&amp;gt;Clear Channel.&lt;br /&gt;
&lt;br /&gt;
[[Image:profile_clearmode.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this will result in a SDP like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
a=ptime:10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== For SIP to ISDN/SS7 calls ==&lt;br /&gt;
In the INVITE message, if the SDP is received with Clear Channel SDP (CLEARMODE/8000), the SETUP/IAM ISDN/SS7 Information Transfer Rate and Information Transfer Capability will be set accordingly (64kbits/sec Unrestricted).&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
The use of Clear Channel is equivalent to the cost of G.711 codec density.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[http://tools.ietf.org/html/rfc4040 RFC 4040]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Profile_clearmode.png</id>
		<title>File:Profile clearmode.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Profile_clearmode.png"/>
				<updated>2014-04-04T18:50:47Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Example where to change the packetization time for the clearmode.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example where to change the packetization time for the clearmode.&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration</id>
		<title>Toolpack v2.7: clearmode configuration</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Toolpack_v2.7:_clearmode_configuration"/>
				<updated>2014-04-04T18:48:52Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== '''''Applies to version(s): v2.7.''''' ===&lt;br /&gt;
{{DISPLAYTITLE:Configure ClearMode}}&lt;br /&gt;
&lt;br /&gt;
Clearmode is defined in RFC4040 and is fully supported and does not required any special licensing or configuration from the Web portal to enable it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== For ISDN/SS7 to SIP calls ==&lt;br /&gt;
If the SETUP/IAM message have its Information Transfer Rate and Information Transfer Capability set to 64kbits/sec Unrestricted, the Codec will be force to Clear Channel on the SIP side.&lt;br /&gt;
&lt;br /&gt;
This will result in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to use a packetization time different from 20ms, you have to go Profile-&amp;gt;RTP and Audio-&amp;gt;Clear Channel.&lt;br /&gt;
&lt;br /&gt;
[[Image:profile_clearmode.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this will result in a SDP like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
m=audio 0 RTP/AVP 96&lt;br /&gt;
&lt;br /&gt;
a=rtpmap:96 CLEARMODE/8000&lt;br /&gt;
&lt;br /&gt;
a=ptime:10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== For SIP to ISDN/SS7 calls ==&lt;br /&gt;
In the INVITE message, if the SDP is received with Clear Channel SDP (CLEARMODE/8000), the SETUP/IAM ISDN/SS7 Information Transfer Rate and Information Transfer Capability will be set accordingly (64kbits/sec Unrestricted).&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
The use of Clear Channel is equivalent to the cost of G.711 codec density.&lt;br /&gt;
We support only 20ms packet duration for now, but we have the Tracking 15313 Support configurable packetization times for RFC 4040 open to support from 5ms to 60ms. Please contact your sale to know what is the expected release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[http://tools.ietf.org/html/rfc4040 RFC 4040]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/SNMP</id>
		<title>SNMP</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/SNMP"/>
				<updated>2014-03-10T20:47:11Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: Correct the link for the RFC2495.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Simple Network Management Protocol (SNMP) is used in network management systems to monitor attached hardware for changes in operation activity. SNMP provides a standardized approach to monitoring and managing network systems. &lt;br /&gt;
&amp;lt;br/&amp;gt;For information on configuring your TMedia product to use the SNMP protocol, see the section labeled [[SNMP#Related Tasks|&amp;quot;'''Related Tasks'''&amp;quot;]].&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== TelcoBridges and SNMP  ==&lt;br /&gt;
TelcoBridges offers basic support  for SNMP versions 1, 2, and 3. '''Toolpack supports SNMP V2 and V3 since release 2.5.80''' (see [[TMG-CONTROL_Version_2.5| TMG-CONTROL version history]]). More specifically, this grants users the ability to remotely poll (or GET) system variables, known as Managed Objects, which are represented in files known as MIB modules.  TelcoBridges currently offers polling on '''standard''' MIB modules (RTP, SONET, DS1, DS3, ISDN, etc...) and on the TelcoBridges '''privately defined''' module ([[TB-MIB|'''TB-MIB''']]).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
''The following procedures should be used to support SNMP v1 '''ONLY''' for '''Toolpack system previous to 2.5.80''':&lt;br /&gt;
*[[Installing NetSNMP from an External Host]]&lt;br /&gt;
*[[TMG SNMP support|How to relay SNMP on TMG products]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported SNMP MIB modules ==&lt;br /&gt;
#[http://www.ietf.org/rfc/rfc1213.txt RFC 1213 MIB II (RFC1213-MIB)]&lt;br /&gt;
#*All tables of the RFC1213-MIB are supported, '''with the exception of''':&lt;br /&gt;
#**ipRouteTable&lt;br /&gt;
#**EGP group&lt;br /&gt;
#**atTable &lt;br /&gt;
#[http://www.ietf.org/rfc/rfc1573.txt RFC 1573 Evolution of Interfaces Group of MIB-II (IF-MIB)]&lt;br /&gt;
#*The following tables are supported:&lt;br /&gt;
#**ifTable&lt;br /&gt;
#**ifStackTable &lt;br /&gt;
#[http://www.faqs.org/rfcs/rfc2495.html RFC 2495 DS1, J1, E1, DS2, and E2 Interfaces (DS1-MIB)]&lt;br /&gt;
#*The following tables of the DS1-MIB are supported:&lt;br /&gt;
#**Dsx1ConfigTable&lt;br /&gt;
#**Dsx1CurrentTable&lt;br /&gt;
#**Dsx1IntervalTable&lt;br /&gt;
#**Dsx1TotalTable&lt;br /&gt;
#[http://www.faqs.org/rfcs/rfc2496.html RFC 2496 - Definitions of Managed Object for the DS3/E3 Interface Type (DS3-MIB)]&lt;br /&gt;
#*The following tables of the DS3-MIB are supported:&lt;br /&gt;
#**Dsx3ConfigTable&lt;br /&gt;
#**Dsx3CurrentTable&lt;br /&gt;
#**Dsx3IntervalTable&lt;br /&gt;
#**Dsx3TotalTable&lt;br /&gt;
#[http://www.faqs.org/rfcs/rfc1595.html RFC 1595 - Definitions of Managed Object for the SONET/SDH Interface Type (SONET-MIB)]&lt;br /&gt;
#*The following tables of the SONET-MIB are supported: &lt;br /&gt;
#**sonetMediumTable&lt;br /&gt;
#**sonetSectionCurrentTable&lt;br /&gt;
#**sonetSectionIntervalTable&lt;br /&gt;
#**sonetLineCurrentTable&lt;br /&gt;
#**sonetLineIntervalTable&lt;br /&gt;
#**sonetFarendLineCurrentTable&lt;br /&gt;
#**sonetFarendLineIntervalTable&lt;br /&gt;
#**sonetPathCurrentTable&lt;br /&gt;
#**sonetPathIntervalTable&lt;br /&gt;
#**sonetFarendPathCurrentTable&lt;br /&gt;
#**sonetFarendPathIntervalTable&lt;br /&gt;
#**sonetVtCurrentTable&lt;br /&gt;
#**sonetVtIntervalTable&lt;br /&gt;
#**sonetFarendVtCurrentTable&lt;br /&gt;
#**sonetFarendVtIntervalTable&lt;br /&gt;
#[http://www.rfc-editor.org/rfc/rfc2127.txt RFC 2127 - ISDN Management Information Base using SMIv2 (ISDN-MIB)]&lt;br /&gt;
#*The following tables of the ISDN-MIB are supported:&lt;br /&gt;
#**isdnBearerGroup&lt;br /&gt;
#**isdnSignalingGroup&lt;br /&gt;
#[[TB-MIB|Telcobridges Private MIB module (TB-MIB)]]&lt;br /&gt;
#*tbMtp2&lt;br /&gt;
#*tbM2pa&lt;br /&gt;
#*tbM2ua&lt;br /&gt;
#*tbM3ua&lt;br /&gt;
#*tbIua&lt;br /&gt;
#*CPU Usage&lt;br /&gt;
#*Memory Usage&lt;br /&gt;
&lt;br /&gt;
=== SNMP IF-MIB ifTable interface type ===&lt;br /&gt;
The table below provides the interfaces type supported by TelcoBridges (ifTable) with their corresponding description. The ifType are described in Internet Assigned Number Authority (IANA) in [http://www.iana.org/assignments/ianaiftype-mib IANAifType-MIB]&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; style=&amp;quot;width: 820px;&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IANA ifType &lt;br /&gt;
! TelcoBridges Interface description&lt;br /&gt;
|-&lt;br /&gt;
| ethernetCsmacd(6)&lt;br /&gt;
| Baseboard Ethernet interfaces &lt;br /&gt;
|-&lt;br /&gt;
| ds1(18)&lt;br /&gt;
| Trunks Line Interface&lt;br /&gt;
|-&lt;br /&gt;
| ds3(30)&lt;br /&gt;
| DS3 Line Interface&lt;br /&gt;
|-&lt;br /&gt;
| sonet(39)&lt;br /&gt;
| SONET/SDH Line Interface&lt;br /&gt;
|-&lt;br /&gt;
| sonetPath(50)&lt;br /&gt;
| SONET/SDH Line Service PATH (VC4/VC3/STS1/DS3)&lt;br /&gt;
|-&lt;br /&gt;
| sonetVT(51)&lt;br /&gt;
| SONET/SDH Line Service SECTION (VC11/VC12/VT15/VT2)&lt;br /&gt;
|-&lt;br /&gt;
| isdn(63)&lt;br /&gt;
| ISDN Stack&lt;br /&gt;
|-&lt;br /&gt;
| lapd(77)&lt;br /&gt;
| ISDN LAPD Link (Primary)&lt;br /&gt;
|-&lt;br /&gt;
| lapd(77)&lt;br /&gt;
| ISDN LAPD Link (Backup)&lt;br /&gt;
|-&lt;br /&gt;
| isdn(63)&lt;br /&gt;
| IUA Link&lt;br /&gt;
|-&lt;br /&gt;
| isdn(63)&lt;br /&gt;
| IUA Peer&lt;br /&gt;
|-&lt;br /&gt;
| lapd(77)&lt;br /&gt;
| LAPD Link&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| SS7 M2PA Link&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| SS7 M2UA Link&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| SS7 M2UA Peer&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| Ss7 M3ua Sap&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| Ss7 M3ua Psp&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| Ss7 M3ua Psrv&lt;br /&gt;
|-&lt;br /&gt;
| ss7SigLink (156)&lt;br /&gt;
| Ss7 Mtp2 Link&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SNMP traps ===&lt;br /&gt;
The '''SNMP traps''' module of TelcoBridges products monitor the operation status of some MIBS OIDs and generates notifications when the states change. The default monitoring polling period is set to 1 minute. This value can be modified in the [[Configuring_tbSnmpAgent#Configuring_traps|tbSnmpAgent configuration]].&lt;br /&gt;
&lt;br /&gt;
====IF-MIB SNMP Trap/Notification====&lt;br /&gt;
* linkDown (1.3.6.1.6.3.1.1.5.3) OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }&lt;br /&gt;
* linkUp   (1.3.6.1.6.3.1.1.5.4) OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }&lt;br /&gt;
&lt;br /&gt;
Example of packet capture:&lt;br /&gt;
 tcpdump port 162 -i mgmt0 -s 0&lt;br /&gt;
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode&lt;br /&gt;
 listening on mgmt0, link-type EN10MB (Ethernet), capture size 65535 bytes&lt;br /&gt;
 14:08:51.491789 IP 10.7.0.13.37452 &amp;gt; 10.7.0.221.snmptrap: V2Trap(144) system.sysUpTime.0=9546160 S:1.1.4.1.0=S:1.1.5.4&lt;br /&gt;
 interfaces.ifTable.ifEntry.ifIndex.452160.26=26 interfaces.ifTable.ifEntry.ifAdminStatus.452160.26=1 &lt;br /&gt;
 interfaces.ifTable.ifEntry.ifOperStatus.452160.26=1  S:1.1.4.3.0=E:8072.3.2.10&lt;br /&gt;
&lt;br /&gt;
=== SNMP SET ===&lt;br /&gt;
The '''SNMP SET''' command is not supported by TelcoBridges products. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Tasks ==&lt;br /&gt;
*[[tbSnmpAgent Configuration|Configuring the tbSnmpAgent application]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Sources  ==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol Wikipedia article on SNMP]&lt;br /&gt;
*[http://www.net-snmp.org/ NetSNMP implementation of the SNMP protocol]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/TSG800</id>
		<title>TSG800</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/TSG800"/>
				<updated>2013-10-31T13:27:29Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: change the wrong chracteristics title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TSG800 is TelcoBridges 1U Signaling/SIGTRAN gateway.&lt;br /&gt;
&lt;br /&gt;
See TelcoBridges web site for additional information about [http://www.telcobridges.com/products/tsig-signaling-gateways/tsg800 TSG800]&lt;br /&gt;
&lt;br /&gt;
==  Characteristics of the TSG800  ==&lt;br /&gt;
*1 to 8 T1/E1s&lt;br /&gt;
*Single or redundant AC or DC power supplies&lt;br /&gt;
&lt;br /&gt;
== Available configurations  ==&lt;br /&gt;
*TSG800-1, (1 x T1/E1) &lt;br /&gt;
*TSG800-2, (2 x T1/E1)&lt;br /&gt;
*TSG800-3, (3 x T1/E1)&lt;br /&gt;
*TSG800-4, (4 x T1/E1)&lt;br /&gt;
*TSG800-5, (5 x T1/E1)&lt;br /&gt;
*TSG800-6, (6 x T1/E1)&lt;br /&gt;
*TSG800-7, (7 x T1/E1)&lt;br /&gt;
*TSG800-8, (8 x T1/E1)&lt;br /&gt;
&lt;br /&gt;
== References  ==&lt;br /&gt;
*[[Media:800_Series_Installation_Guide_Issue3.0.pdf|TSG800 Standalone &amp;amp; TSG800 1+1 System Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
== Related Articles ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs_revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Status_API</id>
		<title>Status API</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Status_API"/>
				<updated>2013-10-25T14:12:03Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove italic code which was incorrect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''******* Getting used with Status API **********'''&lt;br /&gt;
&lt;br /&gt;
Status API consists of status request queries based on a &amp;quot;path&amp;quot;. Each status has a path, like:&lt;br /&gt;
 /adapter&lt;br /&gt;
 /adapter/ip_interface&lt;br /&gt;
 /isup/interface&lt;br /&gt;
 /clock/ref&lt;br /&gt;
 etc.&lt;br /&gt;
&lt;br /&gt;
We already provide two ways of accessing the Toolpack Status:&lt;br /&gt;
 - Web Portal&lt;br /&gt;
 - Command-line tool &amp;quot;tbstatus&amp;quot;, that you will find installed within toolpack installation under /lib/tb/toolpack/pkg/2.X.X/bin/release/[your_platform]/tbstatus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''******* Viewing status tree using Web Portal **********'''&lt;br /&gt;
&lt;br /&gt;
I suggest that you start by using the &amp;quot;browse&amp;quot; option in the WEB portal:&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the Web Portal -&amp;gt; Status -&amp;gt; Browse&amp;lt;br&amp;gt;&lt;br /&gt;
This tool will list available paths that can be queried.&amp;lt;br&amp;gt;&lt;br /&gt;
When you click one of these paths, the web page will show a table that list all fields returned from that path.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''******* Viewing status tree using the command-line tool **********'''&lt;br /&gt;
&lt;br /&gt;
The command-line tool will also allow getting a list of available paths:&lt;br /&gt;
 ./tbstatus&lt;br /&gt;
You can also query stats using one of these path, result is formatted as text output:&lt;br /&gt;
 ./tbstatus /adapter&lt;br /&gt;
Example above show stat of all adapters. You can query more specific stats too:&lt;br /&gt;
 ./tbstatus /adapter:TB005432 &lt;br /&gt;
Or you can query &amp;quot;recursive&amp;quot; information that also includes paths &amp;quot;under&amp;quot; a base path:&lt;br /&gt;
 ./tbstatus /adapter:TB005432/* &lt;br /&gt;
Or you can query very deep and specific information:&lt;br /&gt;
 ./tbstatus /isup:ISUP/interface:ISUP_INTERFACE/cic_group:C002020_2_0_12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''******* Paths for ISUP Circuit states **********'''&lt;br /&gt;
&lt;br /&gt;
You can query states for one circuit group using a path like this one (replace C002020_2_0_12 by your circuit group name, as seen in it's Web portal configuration):&lt;br /&gt;
 ./tbstatus /isup/interface/cic_group:C002020_2_0_12&lt;br /&gt;
&lt;br /&gt;
If you're using version 2.4 or up, you also have access to individual circuits states... but you HAVE to use &amp;quot;-x&amp;quot; option (extended stats mode) to get these.&lt;br /&gt;
To get states for all CICs of a group:&lt;br /&gt;
 ./tbstatus [u]-x[/u] /isup/interface/cic_group:C002020_2_0_12/*&lt;br /&gt;
For example, to get states for CIC #1705, you can use:&lt;br /&gt;
 ./tbstatus -x /isup/interface/cic_group/cic:1705&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''******* Querying/modifying individual field value using the command-line tool **********'''&lt;br /&gt;
&lt;br /&gt;
To query individual field value, you add &amp;quot;::&amp;quot; after the path, then specify the specific field name.&lt;br /&gt;
For example:&lt;br /&gt;
 ./tbstatus /isup/interface/cic_group/cic:1705::desired_cic_state&lt;br /&gt;
Or to modify the circuit state (here to force blocking state):&lt;br /&gt;
 ./tbstatus /isup/interface/cic_group/cic:1705::desired_cic_state=Blocked&lt;br /&gt;
&lt;br /&gt;
* Note: Remember that this change is PERSISTENT, which means circuit will remain blocked forever (no matter trunk state) until you change it again (to &amp;quot;Default&amp;quot;, or &amp;quot;Unblocked&amp;quot; for example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''******* How to write code that use that API **********'''&lt;br /&gt;
&lt;br /&gt;
Now that you understand a bit how Status API works, here is sort explanation on how to write code to manipulate these states.&lt;br /&gt;
&lt;br /&gt;
In short you need to create and start the status client service in your application:&lt;br /&gt;
  pClient = tbnew CTBCAFServiceStatusClient();&lt;br /&gt;
  pClient-&amp;gt;Start();&lt;br /&gt;
&lt;br /&gt;
Then each available stat is reported under a &amp;quot;path&amp;quot;. Your code can call following function to get available paths:&lt;br /&gt;
  pClient-&amp;gt;GetRegisteredPaths();&lt;br /&gt;
&lt;br /&gt;
Once you know the path you want to query, you can retrieve the stats, either synchronously or asynchronously:&lt;br /&gt;
Synchronously:&lt;br /&gt;
  pStatList = pClient-&amp;gt;GetStat(&lt;br /&gt;
    &amp;quot;your_path&amp;quot;,&lt;br /&gt;
    &amp;quot;x&amp;quot;&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
Asynchronously:&lt;br /&gt;
  pClient-&amp;gt;ReqStat(&lt;br /&gt;
    pMyStatPipe,&lt;br /&gt;
    &amp;quot;your_path&amp;quot;,&lt;br /&gt;
    &amp;quot;x&amp;quot;&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
Available options:&lt;br /&gt;
 - Option &amp;quot;x&amp;quot; passed to in_pszOptions means &amp;quot;extended&amp;quot; stats query (provides more detailed stats in some cases, like individual circuits)&lt;br /&gt;
 - Option &amp;quot;d&amp;quot; will make documentation be returned for each field with the query response (by default, only field names and values are returned)&lt;br /&gt;
For more information on &amp;quot;pMyStatPipe&amp;quot;, please read documentation from the header files in the code.&lt;br /&gt;
&lt;br /&gt;
Once you get your &amp;quot;pStatList&amp;quot;, you can get each item it returned (there can be many if your request matches many):&lt;br /&gt;
  pStat = pStatList-&amp;gt;GetItem( un32StatIdx );&lt;br /&gt;
&lt;br /&gt;
And for each item, you can get list of fields:&lt;br /&gt;
  pFieldList = pStat-&amp;gt;GetFields();&lt;br /&gt;
&lt;br /&gt;
... and list each field (one field is one individual stat value):&lt;br /&gt;
  pField = pFieldList-&amp;gt;GetItem( un32FieldIdx );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, as you traverse the stat tree, you will encounter some values that can be changed using:&lt;br /&gt;
  pField-&amp;gt;Set( &amp;quot;new value&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Once you have changed one or more fields of the stat, you can commit it:&lt;br /&gt;
  pStat-&amp;gt;CommitStates();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more detailed information, please refer to the source code of the &amp;quot;tbstatus&amp;quot; application, and to documentation in appropriate header files.&lt;br /&gt;
&lt;br /&gt;
'''******* Note **********'''&lt;br /&gt;
 In order to get/set individual circuits states, you need:&lt;br /&gt;
 - Release 2.4 or more recent, since release 2.3 allowed only to change state per circuit group... (per trunk in other words)&lt;br /&gt;
 - Need to use &amp;quot;-x&amp;quot; in the options field of GetStat, as per-circuit stats are shown only in &amp;quot;extended&amp;quot; mode&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Web_Portal_Tutorial_Guide_v2.7</id>
		<title>Web Portal Tutorial Guide v2.7</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Web_Portal_Tutorial_Guide_v2.7"/>
				<updated>2013-08-06T18:53:23Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: replace CASR2 by CAS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This guide is designed to provide users with a scenario-based approach to installing  [[Tmedia]] and [[Tdev]] systems, using the Web Portal configuration tool. This means that users must first go through the steps that are general to all installations, and subsequently follow the instructions that are specific to their particular application scenario (this corresponds to the type of service, and hardware system being set up).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
This document assumes that the [[Tmedia]] or [[Tdev]] devices are installed as described in their Quick Reference Guides, and in the case of the Tmedia system communication has been established with the control network.&lt;br /&gt;
&lt;br /&gt;
(Note: Tmedia devices are shipped with the Tmedia Web Portal pre-installed, while Tdev devices require that Toolpack be installed as described in the [[Tmedia_Installation#Tdev|Tdev installation guides]].)&lt;br /&gt;
&lt;br /&gt;
Furthermore, in the case of a Tdev device and the initial configuration of the [[Toolpack]] application server, the following will have been provided:&lt;br /&gt;
*The Tdev device to which the Web Portal will first connect.&lt;br /&gt;
*The Tdev device will have been pre-configured with its physical TDM interface.&lt;br /&gt;
*The serial number of the Tdev device will have been entered into the configuration file.&lt;br /&gt;
*The application software for the Tdev device will have been pre-installed on the Toolpack application server, as described in the [[Tmedia_Installation#Tdev|Tdev installation guides]].&lt;br /&gt;
&lt;br /&gt;
This document also assumes familiarity with topics, such as [[ISDN]] signaling, [[SIP]] signaling, [[SS7]], [[CAS|CAS R2]] signaling, and [[SIGTRAN]] signaling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Key Concepts==&lt;br /&gt;
*'''System:''' A system is defined as the complete solution that is designed for a network. If a system solution is comprised of 4 TMP6400’s and a TMS1600, then the combination of these TelcoBridges devices is termed a system.&lt;br /&gt;
*'''Hardware:''' Each TelcoBridges devices, whether it is a TMP6400, TMG3200, or TMS1600 is referred to as a hardware device or hardware adapter.&lt;br /&gt;
*'''Line Interface:''' The physical TDM module installed on the TelcoBridges device is referred to as a line interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General Web Portal Applications ==&lt;br /&gt;
&lt;br /&gt;
'''''IMPORTANT!''''' The Topics covered in the following table are common to &amp;lt;u&amp;gt;all&amp;lt;/u&amp;gt; TMedia installations. Therefore, this section should be consulted before moving on to any other. &lt;br /&gt;
&lt;br /&gt;
'''Topics covered here:''' &lt;br /&gt;
&lt;br /&gt;
=System=&lt;br /&gt;
&lt;br /&gt;
==Access and User Management==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; rowspan=&amp;quot;2&amp;quot; | Web Portal Access&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; colspan=&amp;quot;3&amp;quot;| User Management&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Add User&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Modify User Permission&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Delete User&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Connecting to the Web Server and logging on to the web portal A|Connect to the Web Portal]] &lt;br /&gt;
*[[Toolpack:Logging Off B|Logging Off]]&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Creating User Groups A|Creating User Groups]]&lt;br /&gt;
*[[Toolpack:Creating Users B|Creating Users]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
*[[Modify User Permission]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
*[[Delete User]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Database Backup==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Create Database Backup&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Restore Database&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Database Backup B|Carrying out a First Database Backup]]&lt;br /&gt;
*[[Toolpack:Downloading a Database Backup B|Downloading a Database Backup]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Uploading a Database Backup B|Uploading a Database Backup]]&lt;br /&gt;
*[[Toolpack:Restoring a Database Backup B|Restoring a Database Backup]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Activating a Configuration&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Web Portal Profile&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Activating_the_Configuration B|Activating the Configuration]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Web_Portal_Profile A|Web Portal Profile]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Minor Package Upgrade&amp;quot;&amp;gt;&lt;br /&gt;
==Minor Package Upgrade==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Installing a Package&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Downloading_a_Release_A|Retrieving a software release]]&lt;br /&gt;
*[[Toolpack:Uploading_a_Release_A|Uploading a software release]]&lt;br /&gt;
*[[Toolpack:Activating_a_Release_A|Activating a software release]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Statistics==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Configuration&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Graphs&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Toolpack:Configuring_Statistics_A|Configuring Statistics Polling]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Toolpack:Creating_Statistics_Profile_A|Creating Statistics Profiles]]&lt;br /&gt;
* [[Toolpack:Enabling_Statistics_Profile_A|Enabling Statistics Profiles]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Toolpack:Generating_Graphs_A|Generating Graphs]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Audit Logs==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Audit Logs&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Accessing_Audit_Logs_A|Working with Audit Logs]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==VoIP Bonding==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VoIP Bonding&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Enabling_VoIP_Bonding_A|Enabling VoIP Bonding]]&lt;br /&gt;
|}&lt;br /&gt;
Note: Web portal configuration for VoIP bonding is not yet available.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
==New Hardware==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Add telecom hardware &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Add TMS hardware&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Add 1+1 group&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Add N+1 group&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Adding_an_Adapter_C|Add telecom hardware]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Adding_an_TMS_B|Add TMS hardware]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_1+1_Group_A|Add 1+1 group]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_N+1_Patch_Panel_A|Add N+1 patch panel]]&lt;br /&gt;
*[[Toolpack:Creating_a_N+1_Group_A|Add N+1 group]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==TDM Network==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;System Clock&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create Line Interfaces]] &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create Line Services]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Defining_a_Clocking_Source_B|System Clock]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==IP Network==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;IP Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Create an IP port range&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Configuring_VoIP_Interfaces B|Configuring VoIP Interfaces]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_IP_Port_Range B|Create an IP port range]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Protocol Stacks=&lt;br /&gt;
&lt;br /&gt;
==ISDN NFAS==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configure ISDN-PRI Signaling&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create Line interfaces]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create Line Services]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Configuring_an_ISDN_Stack C|Configure an ISDN stack]]&lt;br /&gt;
OR&amp;lt;br/&amp;gt;&lt;br /&gt;
*[[Toolpack:Configuraing_NFAS A|Configure NFAS]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Allocating_an_ISDN_Network_Access_Point_(NAP) C|Allocate an ISDN NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===''ISDN Advanced Features''===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;ISDN NFAS Overlap&amp;quot; data-expandtext=&amp;quot;ISDN NFAS Overlap&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |ISDN Overlap Sending&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Configuring_Overlap A|''ISDN NFAS Overlap Parameters'']]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CAS==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring a CAS stack&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create Line Interfaces]] &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create Line services]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Copy variant script B|Copy variant script]]&lt;br /&gt;
*[[Toolpack:Create CAS R2 stack B|Create CAS stack]]&lt;br /&gt;
*[[Toolpack:Setting CAS R2 BACK DIGITS variable B|Set backward digits string]] &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_CAS_R2_NAP B|Create a CAS NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==SIP==&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Configure IP port range&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configure SIP Signaling&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configure Codecs and Tone Detection&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_IP_Port_Range A|Create an IP port range]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_a_SIP_Stack B|Create a SIP stack]]&lt;br /&gt;
*[[Toolpack:Creating_a_SIP_Transport_Server B|Create a SIP transport server]]&lt;br /&gt;
*[[Toolpack:Creating_a_Service_Access_Point_(SAP) B|Create a service access point (SAP)]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Accessing_Codec_and_Tone_Detection_Profiles_and_Validating_Settings B|Access profiles and validate settings]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Allocating_a_SIP_Network_Access_Point_(NAP) B|Allocate a SIP NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SIP Advanced Features===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;SIP-I SIP-T&amp;quot; data-expandtext=&amp;quot;SIP-I SIP-T&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | SIP-I SIP-T&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Enabling_SIP_I_SIP_T_B|Enabling SIP-I SIP-T]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;SIP Spiral&amp;quot; data-expandtext=&amp;quot;SIP Spiral&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | SIP Spiral&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Enabling_SIP_Spiral_B|Enabling SIP Spiral]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;NAT traversal&amp;quot; data-expandtext=&amp;quot;NAT traversal&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | Remote NAT Traversal&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | Local NAT Traversal&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Enabling_Remote_NAT_Traversal_A|Enabling Remote NAT Traversal]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Enabling_Local_NAT_Traversal_A|Enabling Local NAT Traversal]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;DNS&amp;quot; data-expandtext=&amp;quot;DNS&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | DNS&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Configuring_DNS_Parameters_A|Enabling DNS]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SS7 ISUP==&lt;br /&gt;
&lt;br /&gt;
===MTP2-MTP3-ISUP===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the MTP2 Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the MTP3 Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configuring the ISUP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 6) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP2_Configuration B|Create an MTP2 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_MTP2_Links A|Create an MTP2 Link]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Configuration C|Create an MTP3 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Network A|Create an MTP3 Network]]&lt;br /&gt;
**[[Toolpack:Creating_SS7_Point_Codes B|Create an MTP3 Point Code]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Linkset A|Create an MTP3 Linkset]]&lt;br /&gt;
***[[Toolpack:Creating_MTP3_Links A|Create MTP3 Links]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Route A|Create an MTP3 Route]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Stack B|Create an ISUP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Network A|Create an ISUP Network]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_User_Part A|Create an ISUP User Part]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Interface A|Create an ISUP Interface]]&lt;br /&gt;
*[[Toolpack:Creating ISUP CIC Groups A|Create ISUP CIC Groups]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_NAP_(SIGTRAN)_B|Create an ISUP NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===M2PA-MTP3-ISUP===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the M2PA Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the MTP3 Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configuring the ISUP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 6) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating the M2PA Configuration B|Create an M2PA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M2PA SAP B|Create an M2PA SAP]] &lt;br /&gt;
**[[Toolpack:Adding M2PA Links A|Add M2PA Links]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Configuration C|Create an MTP3 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Network A|Create an MTP3 Network]]&lt;br /&gt;
**[[Toolpack:Creating_SS7_Point_Codes B|Create an MTP3 Point Code]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Linkset A|Create an MTP3 Linkset]]&lt;br /&gt;
***[[Toolpack:Creating_MTP3_Links A|Create MTP3 Links]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Route A|Create an MTP3 Route]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Stack B|Create an ISUP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Network A|Create an ISUP Network]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_User_Part A|Create an ISUP User Part]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Interface A|Create an ISUP Interface]]&lt;br /&gt;
*[[Toolpack:Creating ISUP CIC Groups A|Create ISUP CIC Groups]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_NAP_(SIGTRAN)_B|Create an ISUP NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===M3UA-ISUP===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the M3UA Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the ISUP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating SS7 Point Codes A|Create SS7 Point Codes]] &lt;br /&gt;
*[[Toolpack:Creating an M3UA Configuration (IPSP) B|Create an M3UA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA SAP A|Create an M3UA SAP]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Network A|Create an M3UA Network]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA User Part A|Create an M3UA User Part]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Signalling Process (IPSP) A|Create an M3UA Peer Signalling Process]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Server A|Create an M3UA Peer Server]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Route A|Create an M3UA Route]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Stack B|Create an ISUP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Network A|Create an ISUP Network]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_User_Part A|Create an ISUP User Part]]&lt;br /&gt;
*[[Toolpack:Creating_an_ISUP_Interface A|Create an ISUP Interface]]&lt;br /&gt;
*[[Toolpack:Creating ISUP CIC Groups A|Create ISUP CIC Groups]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_NAP_(SIGTRAN)_B|Create an ISUP NAP]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SS7 Advanced Features===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;SS7 SPIROU configuration&amp;quot; data-expandtext=&amp;quot;SS7 SPIROU configuration&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | Configuring SPIROU&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modifying_Profile_for_SPIROU A|Modifying Profile]]&lt;br /&gt;
*[[Toolpack:Modifying_Gateway_Configurations_for_SPIROU A|Modifying Gateway Configurations]]&lt;br /&gt;
*[[Toolpack:Modifying_ISUP_Stack_for_SPIROU A|Modifying ISUP Stack]]&lt;br /&gt;
*[[Toolpack:Modifying_ISUP_Userpart_for_SPIROU A|Modifying ISUP Userpart]]&lt;br /&gt;
*[[Toolpack:Optional_configurations_for_SPIROU A|Optional modifications]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SCCP-TCAP==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===MTP2-MTP3-SCCP-TCAP===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the MTP2 Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the MTP3 Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configuring the SCCP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Configuring the TCAP Layer (optional)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP2_Configuration B|Create an MTP2 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_MTP2_Links A|Create an MTP2 Link]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Configuration C|Create an MTP3 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Network A|Create an MTP3 Network]]&lt;br /&gt;
**[[Toolpack:Creating_SS7_Point_Codes B|Create an MTP3 Point Code]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Linkset A|Create an MTP3 Linkset]]&lt;br /&gt;
***[[Toolpack:Creating_MTP3_Links A|Create MTP3 Links]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Route A|Create an MTP3 Route]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Stack A| Create an SCCP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Network A|Create an SCCP Network]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_Userpart A|Create an SCCP Userpart]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_LSAP A|Create an SCCP LSAP]]&lt;br /&gt;
***[[Toolpack:Creating_an_SCCP_Route A|Create an SCCP Route]]&lt;br /&gt;
****[[Toolpack:Creating_an_SCCP_SSN A|Create an SCCP SSN]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_GTT_Association A|Create an SCCP GTT Association]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_GTT_Address_Map A|Create an SCCP GTT Address Map]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_TCAP_Stack A|Create a TCAP Stack]]&lt;br /&gt;
**[[Toolpack:Creating_a_TCAP_Userpart A| Create a TCAP Userpart]]&lt;br /&gt;
*[[Toolpack:Activating_the_Configuration B|Activating the Configuration]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===M2PA-MTP3-SCCP-TCAP===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the M2PA Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the MTP3 Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configuring the SCCP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Configuring the TCAP Layer (optional)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating the M2PA Configuration B|Create an M2PA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M2PA SAP B|Create an M2PA SAP]] &lt;br /&gt;
**[[Toolpack:Adding M2PA Links A|Add M2PA Links]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Configuration C|Create an MTP3 Configuration]]&lt;br /&gt;
*[[Toolpack:Creating_an_MTP3_Network A|Create an MTP3 Network]]&lt;br /&gt;
**[[Toolpack:Creating_SS7_Point_Codes B|Create an MTP3 Point Code]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Linkset A|Create an MTP3 Linkset]]&lt;br /&gt;
***[[Toolpack:Creating_MTP3_Links A|Create MTP3 Links]]&lt;br /&gt;
**[[Toolpack:Creating_an_MTP3_Route A|Create an MTP3 Route]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Stack A| Create an SCCP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Network A|Create an SCCP Network]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_Userpart A|Create an SCCP Userpart]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_LSAP A|Create an SCCP LSAP]]&lt;br /&gt;
***[[Toolpack:Creating_an_SCCP_Route A|Create an SCCP Route]]&lt;br /&gt;
****[[Toolpack:Creating_an_SCCP_SSN A|Create an SCCP SSN]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_GTT_Association A|Create an SCCP GTT Association]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_GTT_Address_Map A|Create an SCCP GTT Address Map]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_TCAP_Stack A|Create a TCAP Stack]]&lt;br /&gt;
**[[Toolpack:Creating_a_TCAP_Userpart A| Create a TCAP Userpart]]&lt;br /&gt;
*[[Toolpack:Activating_the_Configuration B|Activating the Configuration]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===M3UA-SCCP-TCAP===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Configuring the M3UA Layer &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Configuring the SCCP Layer&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configuring the TCAP Layer (optional)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create a new line interface]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create a new line service]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating SS7 Point Codes A|Create SS7 Point Codes]] &lt;br /&gt;
*[[Toolpack:Creating an M3UA Configuration (IPSP) B|Create an M3UA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA SAP A|Create an M3UA SAP]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Network A|Create an M3UA Network]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA User Part A|Create an M3UA User Part]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Signalling Process (IPSP) A|Create an M3UA Peer Signalling Process]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Server A|Create an M3UA Peer Server]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Route A|Create an M3UA Route]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Stack A| Create an SCCP Stack]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_Network A|Create an SCCP Network]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_Userpart A|Create an SCCP Userpart]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_LSAP A|Create an SCCP LSAP]]&lt;br /&gt;
***[[Toolpack:Creating_an_SCCP_Route A|Create an SCCP Route]]&lt;br /&gt;
****[[Toolpack:Creating_an_SCCP_SSN A|Create an SCCP SSN]]&lt;br /&gt;
*[[Toolpack:Creating_an_SCCP_GTT_Association A|Create an SCCP GTT Association]]&lt;br /&gt;
**[[Toolpack:Creating_an_SCCP_GTT_Address_Map A|Create an SCCP GTT Address Map]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_TCAP_Stack A|Create a TCAP Stack]]&lt;br /&gt;
**[[Toolpack:Creating_a_TCAP_Userpart A| Create a TCAP Userpart]]&lt;br /&gt;
*[[Toolpack:Activating_the_Configuration B|Activating the Configuration]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==H.248 MEGACO==&lt;br /&gt;
&lt;br /&gt;
If the Tmedia is used to forward signalling messages to the SSW, you will require to configure M2UA, M3UA or IUA before configuring H.248.&lt;br /&gt;
&lt;br /&gt;
If the Tmedia is used to connect media only, then you can go straight to [[#H.248|H.248 Configuration]]&lt;br /&gt;
&lt;br /&gt;
===M2UA===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Create Line Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Create MTP2 links&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Create M2UA configuration&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create line interfaces]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create line services]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Creating an MTP2 Configuration B|Create an MTP2 Configuration]] &lt;br /&gt;
**[[Toolpack:Creating MTP2 Links A|Create MTP2 Links]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating the M2UA Configuration B|Create an M2UA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M2UA SAP A|Create an M2UA SAP]] &lt;br /&gt;
**[[Toolpack:Creating an M2UA Cluster A|Create an M2UA Cluster]] &lt;br /&gt;
**[[Toolpack:Creating M2UA Links A|Create M2UA Links]] &lt;br /&gt;
**[[Toolpack:Creating M2UA Peers A|Create M2UA Peers]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===M3UA===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Create Line Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Create MTP2 links&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Create MTP3 configuration&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Create M3UA configuration&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create line interfaces]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create line services]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating an MTP2 Configuration B|Create an MTP2 Configuration]] &lt;br /&gt;
*[[Toolpack:Creating MTP2 Links A|Create MTP2 Links]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating SS7 Point Codes A|Create SS7 Point Codes]] &lt;br /&gt;
*[[Toolpack:Creating an MTP3 Configuration C|Create an MTP3 Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an MTP3 Network A|Create an MTP3 Network]] &lt;br /&gt;
**[[Toolpack:Creating an MTP3 Linkset A|Create an MTP3 Linkset]] &lt;br /&gt;
**[[Toolpack:Creating MTP3 Links (M3UA) A|Create MTP3 Links]] &lt;br /&gt;
**[[Toolpack:Creating an MTP3 Route A|Create an MTP3 Route]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating an M3UA Configuration (SGP) A|Create an M3UA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA SAP A|Create an M3UA SAP]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Network A|Create an M3UA Network]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA User Part A|Create an M3UA User Part]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Signalling Process (SGP) A|Create an M3UA Peer Signalling Process]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Peer Server A|Create an M3UA Peer Server]] &lt;br /&gt;
**[[Toolpack:Creating an M3UA Route (SGP) A|Create an M3UA Route]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===IUA===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Create Line Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Create M2UA Configuration&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating a Line Interface B|Create Line Interfaces]] &lt;br /&gt;
*[[Toolpack:Creating a Line Service B|Create Line services]] &lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating the SCTP Configuration B|Edit the SCTP Configuration]] &lt;br /&gt;
*[[Toolpack:Creating the IUA Configuration B|Create an IUA Configuration]] &lt;br /&gt;
**[[Toolpack:Creating an IUA SAP A|Create an IUA SAP]] &lt;br /&gt;
**[[Toolpack:Creating an IUA Cluster A|Create an IUA Cluster]] &lt;br /&gt;
**[[Toolpack:Creating IUA Links A|Create IUA Links]] &lt;br /&gt;
**[[Toolpack:Creating IUA Peers A|Create IUA Peers]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===H.248===&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 1) &amp;lt;br&amp;gt;Allocate Physical Interfaces&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 2) &amp;lt;br&amp;gt;Create IP Port Ranges&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 3) &amp;lt;br&amp;gt;Modify NAP profile&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 4) &amp;lt;br&amp;gt;Configure Network Access Points (NAPs)&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_a_Line_Interface B|Create line interfaces]]&lt;br /&gt;
*[[Toolpack:Creating_a_Line_Service B|Create line services]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Creating_an_IP_Port_Range B|Create IP port ranges]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Modify_NAP_profile B|Modify profile]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Allocating_a_VoIP_Network_Access_Point_(NAP) B|Allocate a VoIP NAP]]&lt;br /&gt;
*[[Toolpack:Allocating_a_TDM_Network_Access_Point_(NAP) B|Allocate a TDM NAP]]&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 5) &amp;lt;br&amp;gt;Configure Media Gateway for H.248 mode&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 6) &amp;lt;br&amp;gt;Add a New Media Gateway Controller&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (Step 7) &amp;lt;br&amp;gt;Associate NAPs Resources to H.248 Configuration&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Configure the Media_Gateway_for_H248_Mode B|Configure the Media Gateway for H.248 mode]]&lt;br /&gt;
*[[Toolpack:Creating_an_H.248_Configuration B|Create a new H.248 configuration]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Adding_a_Media_Gateway_Controller_(MGC) A|Add a new media gateway controller (MGC)]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Toolpack:Associating_NAPs_with_an_H.248_Configuration B|Associate the NAPs with the H.248 configuration]]&lt;br /&gt;
*[[Toolpack:Selecting_Timeslots_for_TDM_Interfaces A|Select timeslots for the TDM interfaces]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;CDR&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=CDR (Call Detail Record)=&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Text CDR&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |RADIUS&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Enabling CDR A|Enabling CDR]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Enabling RADIUS B|Enabling RADIUS]]&lt;br /&gt;
*[[Toolpack:Configuring_RADIUS_client A|Configuring RADIUS client]]&lt;br /&gt;
*[[Toolpack:Adding_RADIUS_server A|Adding RADIUS server(s)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=''Fax''=&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |FAX passthrough&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |FAX T.38&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Configure_Fax_Relay_A|Configure Fax Relay]]&lt;br /&gt;
*[[Configure_Fax_Passthrough_A|Configure Fax Passthrough]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
*[[Configure_Fax_Relay_A|Configure Fax Relay]]&lt;br /&gt;
*[[Configure_Fax_T38_A|Configure Fax T38]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Routes=&lt;br /&gt;
&lt;br /&gt;
==Static Route==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Add routes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Creating_a_First_Call_Route B|Create a first call route]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==''Routing Script''==&lt;br /&gt;
TelcoBridges provides a wide variety of routing script examples which customers can apply directly in their web configuration according to their needs by following just a few simple steps. Please select one of the following examples according to your needs. You may modify it when necessary.&lt;br /&gt;
&lt;br /&gt;
'''*Flexible NOA:''' Remap the Calling/Called NOA flexibly based on the routes. It should cover most of the NOA requests since the routes include the calling/called remapping as well.&lt;br /&gt;
&lt;br /&gt;
'''*Prefix NOA:''' Remapp Calling/Called NOA according to the prefix of the calling/called number, manipulate calling/called number. For calling number, if it is a privacy call, use the number in P-Asserted-Identity line or Remote-Party-ID line as the calling number to remap the NOA and do the manipulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Flexible NOA&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Prefix NOA&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Create_New_Routing_Script_B|Create new routing script]]&lt;br /&gt;
*[[Import_Customized_Routing_Script_A|Import customized routing script]]&lt;br /&gt;
*[[Add_NOA_Columns_in_Routes_B|Add NOA columns in routes]]&lt;br /&gt;
*[[Enable_Routing_Script_A|Enable routing script]]&lt;br /&gt;
*[[Activate_Configuration_B|Activate configuration]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Create_New_Routing_Script_B|Create new routing script]]&lt;br /&gt;
*[[Import_Customized_Routing_Script_A|Import customized routing script]]&lt;br /&gt;
*[[Enable_Routing_Script_A|Enable routing script]]&lt;br /&gt;
*[[Activate_Configuration_B|Activate configuration]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;Configuring Audio Prompts&amp;quot; data-expandtext=&amp;quot;Audio Prompts&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Audio Prompts&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Configuring_Audio_Prompts B|Audio Prompts]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Label Routing==&lt;br /&gt;
&lt;br /&gt;
This section assumes:&lt;br /&gt;
* '''The routing script is already implemented''' (you just need to add the label routing functionality)&lt;br /&gt;
* '''The routeset definition and digimap files are already created'''&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|STYLE=&amp;quot;vertical-align: top&amp;quot;|&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Add label routing functionality&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Adding_Label_Routing_to_any_Routing_Script_B|Add Label Routing to script]]&lt;br /&gt;
*[[Toolpack:Create_Databse_Files_B|Create Database Files]]&lt;br /&gt;
*[[Toolpack:Assign_Routing_Script_DB_Files_to_Gateway_Application_B|Assign Routing/Script Files to the Gateway Application]]&lt;br /&gt;
*[[Toolpack:Add_Digitmap_Files_B|Add the Digit Map Files to the System]]&lt;br /&gt;
*[[Toolpack:Add_Routeset_Definition_Files_B|Add the Routset Definition Files to the System]]&lt;br /&gt;
*[[Toolpack:Assign_Definition_Digitmap_Files_per_NAP_B|Assign Defintion/Digitmap Files on a per NAP Basis]]&lt;br /&gt;
*[[Toolpack:Generate_Dynamic_Routes_B|Generate Dynamic Routes]]&lt;br /&gt;
*[[Activate_Configuration_B|Activate configuration]]&lt;br /&gt;
|}&lt;br /&gt;
|STYLE=&amp;quot;vertical-align: top&amp;quot;|&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Update definition/digitmap files&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Update_Digitmap_Files_B|Update the Digitmap Files]]&lt;br /&gt;
*[[Toolpack:Update_Routeset_Definition_Files_B|Update the Routeset Definition Files]]&lt;br /&gt;
*[[Toolpack:Generate_Dynamic_Routes_B|Generate Dynamic Routes]]&lt;br /&gt;
*[[Activate_Configuration_B|Activate configuration]]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==RADIUS Authorization and Authentication==&lt;br /&gt;
{|&lt;br /&gt;
|STYLE=&amp;quot;vertical-align: top&amp;quot;|&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;240&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |RADIUS&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Configuring_RADIUS_client_B|Configure RADIUS client]]&lt;br /&gt;
*[[Toolpack:Adding_RADIUS_server_B|Add RADIUS authorization server]]&lt;br /&gt;
*[[Toolpack:Configuring_RADIUS_authorization_A|Configure RADIUS authorization]]&lt;br /&gt;
|}&lt;br /&gt;
|STYLE=&amp;quot;vertical-align: top&amp;quot;|&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;300&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |RADIUS (with custom dictionary)&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Import_RADIUS_Custom_Dictionary_A|Import RADIUS Custom Dictionary]]&lt;br /&gt;
*[[Toolpack:Configuring_RADIUS_client_B|Configure RADIUS Client]]&lt;br /&gt;
*[[Toolpack:Adding_RADIUS_server_B|Add RADIUS Authorization Server]]&lt;br /&gt;
*[[Toolpack:Create_New_Routing_Script_B|Create New Routing Script]]&lt;br /&gt;
*[[Toolpack:Configuring_RADIUS_authorization_A|Configure RADIUS Authorization]]&lt;br /&gt;
*[[Toolpack:Enable_Routing_Script_B|Enable Routing Script]]&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Lawful_Intercept&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Lawful Interception=&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;300&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Lawful Interception&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Verifying_lawful_interception_A|Verify Lawful Interception Prerequisite]]&lt;br /&gt;
*[[Toolpack:Importing_lawful_interception_A|Import a Lawful Interception CSV File]]&lt;br /&gt;
*[[Toolpack:Create_New_Routing_Script_B|Create New Routing Script]]&lt;br /&gt;
*[[Toolpack:Enable_Lawful_Interception_in_Routing_Script_A|Enable Lawful Interception in Routing script]]&lt;br /&gt;
*[[Toolpack:Enable_Routing_Script_B|Enable Routing Script]]&lt;br /&gt;
*[[Toolpack:Configuring_lawful_interception_A|Configure Lawful Agencies]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Call Trace==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Call trace&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Toolpack:Configuring_Call_Trace_B|Call trace]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Call==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Test Call&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Creating_A_Test_Call_A|Creating a Test Call]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Target Recording==&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;300&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Activating a Configuration&lt;br /&gt;
! width=&amp;quot;300&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Web Portal Profile&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Enabling_Recordings_A|Enabling the Recording of Calls]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Accessing_Recording|Accessing the Recording]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=''Status Menus''=&lt;br /&gt;
&lt;br /&gt;
The Web Portal configuration tool will guide you through a number of status menus, each of which indicate the current state of a certain hardware service (assuming said service has been configured).&lt;br /&gt;
The following table contains the general conventions of the Web Portal's display '''(A)''', as well as a variety of specific status menus '''(B)'''.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (A) &amp;lt;br&amp;gt;Menus Overview &lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; | (B) &amp;lt;br&amp;gt;Individual Menu Descriptions&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Tmedia_Status_Menus A|Tmedia Status Menus]]&lt;br /&gt;
**[[Toolpack:Status_Menus:Navigation A|Navigation]]&lt;br /&gt;
**[[Toolpack:Status_Menus:Screen_Conventions A|Status Screen Conventions]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Status_Menus:System B|System]]&lt;br /&gt;
*[[Toolpack:Status_Menus:Adapters_and_IP_Interfaces B|Adapters and IP Interfaces]]&lt;br /&gt;
*[[Toolpack:Status_Menus:1+1|1+1]]&lt;br /&gt;
*[[Toolpack:Status_Menus:N+1|N+1]]&lt;br /&gt;
*[[Toolpack:Status_Menus:Hosts A|Hosts]]&lt;br /&gt;
*[[Toolpack:Status_Menus:Applications A|Applications]]&lt;br /&gt;
*[[Toolpack:Status_Menus:TDM_Lines A|TDM Lines]]&lt;br /&gt;
**[[Toolpack:Status_Menus:Line Interfaces A|Line Interfaces]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SCTP A|SCTP]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_MTP2 A|SS7 MTP2]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_M2UA A|SS7 M2UA]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_IUA A|SS7 IUA]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_M2PA A|SS7 M2PA]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_M3UA A|SS7 M3UA]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_MTP3 A|SS7 MTP3]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_ISUP A|SS7 ISUP]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_SCCP A|SS7 SCCP]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SS7_TCAP A|SS7 TCAP]]&lt;br /&gt;
*[[Toolpack:Status_Menus:ISDN A|ISDN]]&lt;br /&gt;
**[[Toolpack:Status_Menus:NFAS A|NFAS]]&lt;br /&gt;
*[[Toolpack:Status_Menus:CAS R2 A|CAS R2]]&lt;br /&gt;
*[[Toolpack:Status_Menus:SIP A|SIP]]&lt;br /&gt;
*[[Toolpack:Status_Menus:Clock B|Clock]]&lt;br /&gt;
**[[Toolpack:Status_Menus:Clock Status List A|Clock Status List]]&lt;br /&gt;
*[[Toolpack:Status_Menus:TMS A|TMS]]&lt;br /&gt;
*[[Toolpack:Status_Menus:NAP A|NAP]]&lt;br /&gt;
**[[Toolpack:Status_Menus:NAP Status List A|NAP Status List]]&lt;br /&gt;
*[[Toolpack:Status_Menus:H.248 A|H.248]]&lt;br /&gt;
*[[Toolpack:Status_Menus:RADIUS A|RADIUS]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Toolpack]]&lt;br /&gt;
[[category:Coming Soon]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CAS</id>
		<title>CAS</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CAS"/>
				<updated>2013-08-06T18:51:07Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: added R1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Channel Associated Signaling is a signaling protocol for the set-up and tear-down of phone calls. It is different from other signaling protocols such as [[SS7]] in that it is not message/packet-based but rather based on bit transition for state changing, and tone transmission for information and state information exchange. In many parts of the world, CAS was first replaced by [[ISDN]] and in many cases, was ultimately replaced by SS7. Today, CAS is often used with low density trunks. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== CAS and TelcoBridges  ==&lt;br /&gt;
&lt;br /&gt;
CAS signaling is supported at the basic API level but is not supported at the [[Toolpack]] / [[Web Portal]] level and is thus not accessible for more basic applications (i.e., that don`t require programming code). As of June 2010, support for CAS R2 has been announced within the [[Web Portal Tutorial Guide v2.5|Toolpack Web Portal v2.5]]; this is slated to ship during the 3rd quarter of 2010. Please note that CAS R2 support is limited to E1 interfaces. It is not compatible with DS-3 or STM-1 interfaces. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== CAS  ===&lt;br /&gt;
&lt;br /&gt;
=== CAS R1  ===&lt;br /&gt;
As of July 2013, support for CAS R1 has been announced within the [[Web Portal Tutorial Guide v2.7|Toolpack Web Portal v2.7]]; this is slated to ship during the 3rd quarter of 2013. Please note that CAS R1 support is not limited to E1 interfaces.&lt;br /&gt;
&lt;br /&gt;
==== Supported CAS R1 variants  ====&lt;br /&gt;
The following CAS variants are currently supported by the Toolpack: &lt;br /&gt;
&lt;br /&gt;
*Wink start (immediate, 1 wink or 2 winks)&lt;br /&gt;
*FXS Loop start &lt;br /&gt;
&lt;br /&gt;
Please contact TelcoBridges regarding support for additional CAS variants. &lt;br /&gt;
&lt;br /&gt;
=== CAS R2  ===&lt;br /&gt;
&lt;br /&gt;
The TelcoBridges CAS R2 stack features a scriptable register signaling engine that, in practice, allows the complete customization of communication processes using tones. More specifically, it is possible to modify the timing(s) of the tone exchanges, change the meaning(s) of each tone and dynamically specify the sequence in which the tones are played. The CAS R2 stack also provides integrated interoperability between variants and between other signaling types. For instance, the calling party category can be converted between variants and propagated to a SS7 call leg. &lt;br /&gt;
&lt;br /&gt;
==== Supported CAS R2 variants  ====&lt;br /&gt;
The following CAS variants are currently supported by the Toolpack: &lt;br /&gt;
&lt;br /&gt;
*Generic (ITU spec base) &lt;br /&gt;
*Brazil &lt;br /&gt;
*Mexico&lt;br /&gt;
&lt;br /&gt;
Using Toolpack's script-based approach to the management of regional variants, variants supplied Toolpack can be adapted to address specific requirements and new variant scripts can be created from scratch, without to need to 'patch' or update the underlying system software version.&lt;br /&gt;
&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
*[[CAS R2 scripting|CAS R2 Scripting guide]] &lt;br /&gt;
*[[Toolpack CAS R2 troubleshooting|CAS R2 Troubleshooting guide]] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Channel_Associated_Signaling Wikipedia article] &lt;br /&gt;
*[http://www.itu.int/rec/T-REC-Q.400-Q.490-198811-I ITU Q.400-Q.490 Specification]&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
[[Category:Needs_revising]]&lt;br /&gt;
[[Category:Revise on Major]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-31T19:52:07Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove E&amp;amp;M specific part.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This page explains how to configure a generic CASr1 script.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CAS_R1_E%26M</id>
		<title>CAS R1 E&amp;M</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CAS_R1_E%26M"/>
				<updated>2013-07-31T19:45:02Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: basic page for E&amp;amp;M&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
* EANA&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
E&amp;amp;M scripts use the same logic specified in [[CASr1 scripting]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
To specify a script to use E&amp;amp;M, you MUST specify one of the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CasR1.Variant = CasR1.VariantTypes.DELAY_START&lt;br /&gt;
CasR1.Variant = CasR1.VariantTypes.WINK_START&lt;br /&gt;
CasR1.Variant = CasR1.VariantTypes.WINK_START_ACK&lt;br /&gt;
CasR1.Variant = CasR1.VariantTypes.EANA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending if you want to use 0, 1 or 2 winks and if you plan to receive or not the ANI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Subvariants ==&lt;br /&gt;
Here are the differences between the subvariants:&lt;br /&gt;
&lt;br /&gt;
=== Delay Start ===&lt;br /&gt;
there's no wink before receiving ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
=== Wink Start ===&lt;br /&gt;
There's 1 wink before receiving ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
=== Wink Start ACK ===&lt;br /&gt;
There's 1 wink before receiving ANI/DNIS.&lt;br /&gt;
There's 1 wink after receiving ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
=== EANA ===&lt;br /&gt;
This variant is similar to wink start, but it contains ANI, while wink-start has no ANI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ANI ==&lt;br /&gt;
&lt;br /&gt;
This is the Automic Number Identification, commonly called the &amp;quot;calling number&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ANI = {&lt;br /&gt;
	prefix = &amp;quot;*&amp;quot;,&lt;br /&gt;
	suffix = &amp;quot;*&amp;quot;,&lt;br /&gt;
	expected_digits = 0,&lt;br /&gt;
	inter_digit_timeout = 0,&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DNIS ==&lt;br /&gt;
&lt;br /&gt;
This is the Dialed Number Identification Service, commonly called the &amp;quot;called number&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DNIS = {&lt;br /&gt;
		prefix = &amp;quot;*&amp;quot;,&lt;br /&gt;
		suffix = &amp;quot;#&amp;quot;,&lt;br /&gt;
		expected_digits = 0,&lt;br /&gt;
		inter_digit_timeout = 0,&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By using the 2 above sections, you're expecting to receive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*ANI*DNIS#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
when you're in the incoming addressing state.&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CAS_R1_E%26M</id>
		<title>CAS R1 E&amp;M</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CAS_R1_E%26M"/>
				<updated>2013-07-31T19:11:36Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: moved E&amp;amp;M to CASr1 scripting: this page is what's needed for all CASr1 script, not specific to E&amp;amp;M.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[CASr1 scripting]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-31T19:11:36Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: moved E&amp;amp;M to CASr1 scripting: this page is what's needed for all CASr1 script, not specific to E&amp;amp;M.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T15:15:51Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T15:13:32Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove displaytitle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/EM</id>
		<title>EM</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/EM"/>
				<updated>2013-07-30T15:12:57Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: moved EM to E&amp;amp;M: more accurate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[E&amp;amp;M]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T15:12:57Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: moved EM to E&amp;amp;M: more accurate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T15:04:43Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
DTMF mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T15:02:44Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove tabs in pre section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
ACTION_WAIT_WINK&lt;br /&gt;
ACTION_SEND_ANI&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional events to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RESULT_OK&lt;br /&gt;
RESULT_FAIL&lt;br /&gt;
RESULT_MISMATCH&lt;br /&gt;
RESULT_OUT_OF_RESOURCE&lt;br /&gt;
RESULT_INVALID_PARAM&lt;br /&gt;
RESULT_INVALID_STATE&lt;br /&gt;
RESULT_NOT_SUPPORTED&lt;br /&gt;
RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
RESULT_BLOCKED_LOCALLY&lt;br /&gt;
RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
CAUSE_FWD_REJECT_CALL&lt;br /&gt;
CAUSE_FWD_HANG_UP&lt;br /&gt;
CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
CAUSE_BWD_REJECT_CALL&lt;br /&gt;
CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TRACE_LEVEL_0&lt;br /&gt;
TRACE_LEVEL_1&lt;br /&gt;
TRACE_LEVEL_2&lt;br /&gt;
TRACE_LEVEL_3&lt;br /&gt;
TRACE_LEVEL_4&lt;br /&gt;
TRACE_LEVEL_ALWAYS&lt;br /&gt;
TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T14:58:32Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_END_SIGNALING&lt;br /&gt;
		ACTION_SET_CAS_BITS&lt;br /&gt;
		ACTION_SEND_WINK&lt;br /&gt;
		ACTION_WAIT_WINK&lt;br /&gt;
		ACTION_SEND_ANI&lt;br /&gt;
		ACTION_SEND_DNIS&lt;br /&gt;
		ACTION_WAIT_ANI&lt;br /&gt;
		ACTION_WAIT_DNIS&lt;br /&gt;
		ACTION_REPORT_SEIZURE&lt;br /&gt;
		ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
		ACTION_REPORT_ACCEPTED&lt;br /&gt;
		ACTION_REPORT_ALERTED&lt;br /&gt;
		ACTION_REPORT_ANSWERED&lt;br /&gt;
		ACTION_REPORT_BLOCKED&lt;br /&gt;
		ACTION_REPORT_UNBLOCKED&lt;br /&gt;
		ACTION_START_TIMER&lt;br /&gt;
		ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_SEND_TONE&lt;br /&gt;
		ACTION_SET_ANI&lt;br /&gt;
		ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		EVENT_CAS_BITS_CHANGED&lt;br /&gt;
		EVENT_WINK_DETECTED&lt;br /&gt;
		EVENT_WINK_COMPLETED&lt;br /&gt;
		EVENT_ANI_RECEIVED&lt;br /&gt;
		EVENT_DNIS_RECEIVED&lt;br /&gt;
		EVENT_ANI_SENT&lt;br /&gt;
		EVENT_DNIS_SENT&lt;br /&gt;
		EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
		EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
		EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
		EVENT_APP_END_SIGNALING&lt;br /&gt;
		EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
		EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
		EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional events to implement special variants&lt;br /&gt;
		EVENT_TONE_RECEIVED&lt;br /&gt;
		EVENT_TONE_SENT&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	RESULT_OK&lt;br /&gt;
	RESULT_FAIL&lt;br /&gt;
	RESULT_MISMATCH&lt;br /&gt;
	RESULT_OUT_OF_RESOURCE&lt;br /&gt;
	RESULT_INVALID_PARAM&lt;br /&gt;
	RESULT_INVALID_STATE&lt;br /&gt;
	RESULT_NOT_SUPPORTED&lt;br /&gt;
	RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
	RESULT_BLOCKED_LOCALLY&lt;br /&gt;
	RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
	CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_FWD_REJECT_CALL&lt;br /&gt;
	CAUSE_FWD_HANG_UP&lt;br /&gt;
	CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_REJECT_CALL&lt;br /&gt;
	CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	TRACE_LEVEL_0&lt;br /&gt;
	TRACE_LEVEL_1&lt;br /&gt;
	TRACE_LEVEL_2&lt;br /&gt;
	TRACE_LEVEL_3&lt;br /&gt;
	TRACE_LEVEL_4&lt;br /&gt;
	TRACE_LEVEL_ALWAYS&lt;br /&gt;
	TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
&lt;br /&gt;
		..'''.''':&lt;br /&gt;
&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_CAS_BITS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_TONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SEND_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_WAIT_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_ANI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameters:&lt;br /&gt;
&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_SEIZURE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ACCEPTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ALERTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_ANSWERED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_BLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_REPORT_UNBLOCKED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_START_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T14:39:00Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting for HandleEvent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_END_SIGNALING&lt;br /&gt;
		ACTION_SET_CAS_BITS&lt;br /&gt;
		ACTION_SEND_WINK&lt;br /&gt;
		ACTION_WAIT_WINK&lt;br /&gt;
		ACTION_SEND_ANI&lt;br /&gt;
		ACTION_SEND_DNIS&lt;br /&gt;
		ACTION_WAIT_ANI&lt;br /&gt;
		ACTION_WAIT_DNIS&lt;br /&gt;
		ACTION_REPORT_SEIZURE&lt;br /&gt;
		ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
		ACTION_REPORT_ACCEPTED&lt;br /&gt;
		ACTION_REPORT_ALERTED&lt;br /&gt;
		ACTION_REPORT_ANSWERED&lt;br /&gt;
		ACTION_REPORT_BLOCKED&lt;br /&gt;
		ACTION_REPORT_UNBLOCKED&lt;br /&gt;
		ACTION_START_TIMER&lt;br /&gt;
		ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_SEND_TONE&lt;br /&gt;
		ACTION_SET_ANI&lt;br /&gt;
		ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		EVENT_CAS_BITS_CHANGED&lt;br /&gt;
		EVENT_WINK_DETECTED&lt;br /&gt;
		EVENT_WINK_COMPLETED&lt;br /&gt;
		EVENT_ANI_RECEIVED&lt;br /&gt;
		EVENT_DNIS_RECEIVED&lt;br /&gt;
		EVENT_ANI_SENT&lt;br /&gt;
		EVENT_DNIS_SENT&lt;br /&gt;
		EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
		EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
		EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
		EVENT_APP_END_SIGNALING&lt;br /&gt;
		EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
		EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
		EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional events to implement special variants&lt;br /&gt;
		EVENT_TONE_RECEIVED&lt;br /&gt;
		EVENT_TONE_SENT&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	RESULT_OK&lt;br /&gt;
	RESULT_FAIL&lt;br /&gt;
	RESULT_MISMATCH&lt;br /&gt;
	RESULT_OUT_OF_RESOURCE&lt;br /&gt;
	RESULT_INVALID_PARAM&lt;br /&gt;
	RESULT_INVALID_STATE&lt;br /&gt;
	RESULT_NOT_SUPPORTED&lt;br /&gt;
	RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
	RESULT_BLOCKED_LOCALLY&lt;br /&gt;
	RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
	CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_FWD_REJECT_CALL&lt;br /&gt;
	CAUSE_FWD_HANG_UP&lt;br /&gt;
	CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_REJECT_CALL&lt;br /&gt;
	CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	TRACE_LEVEL_0&lt;br /&gt;
	TRACE_LEVEL_1&lt;br /&gt;
	TRACE_LEVEL_2&lt;br /&gt;
	TRACE_LEVEL_3&lt;br /&gt;
	TRACE_LEVEL_4&lt;br /&gt;
	TRACE_LEVEL_ALWAYS&lt;br /&gt;
	TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
&lt;br /&gt;
	Parameters : &lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_CAS_BITS_CHANGED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_DETECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_WINK_COMPLETED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Parameter:&lt;br /&gt;
&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&lt;br /&gt;
'''Note''':	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_RECEIVED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TONE_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_ANI_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_DNIS_SENT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_END_SIGNALING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
		..'''.''':&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
	Parameters : &lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
				ACTION_END_SIGNALING:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
				ACTION_SET_CAS_BITS&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
				ACTION_SEND_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
				ACTION_SEND_TONE&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
				ACTION_SEND_DNIS&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_WAIT_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
				ACTION_WAIT_DNIS&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_SET_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				ACTION_SET_DNIS&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
				ACTION_REPORT_SEIZURE&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
				ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
				ACTION_REPORT_ACCEPTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
				ACTION_REPORT_ALERTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
				ACTION_REPORT_ANSWERED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
				ACTION_REPORT_BLOCKED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
				ACTION_REPORT_UNBLOCKED&lt;br /&gt;
					NO parameter.&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
				ACTION_START_TIMER&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
				ACTION_CANCEL_TIMER&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T14:31:28Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_USE_DTMF			 	= 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_END_SIGNALING&lt;br /&gt;
		ACTION_SET_CAS_BITS&lt;br /&gt;
		ACTION_SEND_WINK&lt;br /&gt;
		ACTION_WAIT_WINK&lt;br /&gt;
		ACTION_SEND_ANI&lt;br /&gt;
		ACTION_SEND_DNIS&lt;br /&gt;
		ACTION_WAIT_ANI&lt;br /&gt;
		ACTION_WAIT_DNIS&lt;br /&gt;
		ACTION_REPORT_SEIZURE&lt;br /&gt;
		ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
		ACTION_REPORT_ACCEPTED&lt;br /&gt;
		ACTION_REPORT_ALERTED&lt;br /&gt;
		ACTION_REPORT_ANSWERED&lt;br /&gt;
		ACTION_REPORT_BLOCKED&lt;br /&gt;
		ACTION_REPORT_UNBLOCKED&lt;br /&gt;
		ACTION_START_TIMER&lt;br /&gt;
		ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_SEND_TONE&lt;br /&gt;
		ACTION_SET_ANI&lt;br /&gt;
		ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		EVENT_CAS_BITS_CHANGED&lt;br /&gt;
		EVENT_WINK_DETECTED&lt;br /&gt;
		EVENT_WINK_COMPLETED&lt;br /&gt;
		EVENT_ANI_RECEIVED&lt;br /&gt;
		EVENT_DNIS_RECEIVED&lt;br /&gt;
		EVENT_ANI_SENT&lt;br /&gt;
		EVENT_DNIS_SENT&lt;br /&gt;
		EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
		EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
		EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
		EVENT_APP_END_SIGNALING&lt;br /&gt;
		EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
		EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
		EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional events to implement special variants&lt;br /&gt;
		EVENT_TONE_RECEIVED&lt;br /&gt;
		EVENT_TONE_SENT&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	RESULT_OK&lt;br /&gt;
	RESULT_FAIL&lt;br /&gt;
	RESULT_MISMATCH&lt;br /&gt;
	RESULT_OUT_OF_RESOURCE&lt;br /&gt;
	RESULT_INVALID_PARAM&lt;br /&gt;
	RESULT_INVALID_STATE&lt;br /&gt;
	RESULT_NOT_SUPPORTED&lt;br /&gt;
	RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
	RESULT_BLOCKED_LOCALLY&lt;br /&gt;
	RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
	CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_FWD_REJECT_CALL&lt;br /&gt;
	CAUSE_FWD_HANG_UP&lt;br /&gt;
	CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_REJECT_CALL&lt;br /&gt;
	CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	TRACE_LEVEL_0&lt;br /&gt;
	TRACE_LEVEL_1&lt;br /&gt;
	TRACE_LEVEL_2&lt;br /&gt;
	TRACE_LEVEL_3&lt;br /&gt;
	TRACE_LEVEL_4&lt;br /&gt;
	TRACE_LEVEL_ALWAYS&lt;br /&gt;
	TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
&lt;br /&gt;
	Parameters:&lt;br /&gt;
&lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
&lt;br /&gt;
		'''in_InitialCasBits''' :&lt;br /&gt;
&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
	Parameters : &lt;br /&gt;
		'''in_TimeslotCtx''' :&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
		'''in_EventType''' :&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
		'''...'''	:&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
				EVENT_CAS_BITS_CHANGED:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
				EVENT_WINK_DETECTED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
				EVENT_WINK_COMPLETED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
				EVENT_TONE_RECEIVED&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
				EVENT_ANI_RECEIVED&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
				EVENT_DNIS_RECEIVED&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_TONE_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				EVENT_ANI_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
				EVENT_DNIS_SENT&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
				EVENT_APP_END_SIGNALING&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
				EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
				EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
				EVENT_TIMEOUT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		'''in_TraceLevel''':&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
		'''in_Format''':&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
		..'''.''':&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
	Parameters : &lt;br /&gt;
		'''in_Action''' :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
		'''...''' :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
				ACTION_END_SIGNALING:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
				ACTION_SET_CAS_BITS&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
				ACTION_SEND_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
				ACTION_SEND_TONE&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
				ACTION_SEND_DNIS&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_WAIT_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
				ACTION_WAIT_DNIS&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_SET_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				ACTION_SET_DNIS&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
				ACTION_REPORT_SEIZURE&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
				ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
				ACTION_REPORT_ACCEPTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
				ACTION_REPORT_ALERTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
				ACTION_REPORT_ANSWERED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
				ACTION_REPORT_BLOCKED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
				ACTION_REPORT_UNBLOCKED&lt;br /&gt;
					NO parameter.&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
				ACTION_START_TIMER&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
				ACTION_CANCEL_TIMER&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T14:24:22Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: more formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:E&amp;amp;M}}&lt;br /&gt;
E&amp;amp;M is a CASr1 family.&lt;br /&gt;
This script is used to configure the following variants:&lt;br /&gt;
* Immediate delay&lt;br /&gt;
* Wink-start&lt;br /&gt;
* Double-ack&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configurable global script constants==&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
- TONE_USE_DTMF			 	= 1&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_ON_TIME				= 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_OFF_TIME				= 50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TONE_LEVEL				= -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Static constants pushed by the stack, for usage in this script==&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_END_SIGNALING&lt;br /&gt;
		ACTION_SET_CAS_BITS&lt;br /&gt;
		ACTION_SEND_WINK&lt;br /&gt;
		ACTION_WAIT_WINK&lt;br /&gt;
		ACTION_SEND_ANI&lt;br /&gt;
		ACTION_SEND_DNIS&lt;br /&gt;
		ACTION_WAIT_ANI&lt;br /&gt;
		ACTION_WAIT_DNIS&lt;br /&gt;
		ACTION_REPORT_SEIZURE&lt;br /&gt;
		ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
		ACTION_REPORT_ACCEPTED&lt;br /&gt;
		ACTION_REPORT_ALERTED&lt;br /&gt;
		ACTION_REPORT_ANSWERED&lt;br /&gt;
		ACTION_REPORT_BLOCKED&lt;br /&gt;
		ACTION_REPORT_UNBLOCKED&lt;br /&gt;
		ACTION_START_TIMER&lt;br /&gt;
		ACTION_CANCEL_TIMER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		ACTION_SEND_TONE&lt;br /&gt;
		ACTION_SET_ANI&lt;br /&gt;
		ACTION_SET_DNIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		EVENT_CAS_BITS_CHANGED&lt;br /&gt;
		EVENT_WINK_DETECTED&lt;br /&gt;
		EVENT_WINK_COMPLETED&lt;br /&gt;
		EVENT_ANI_RECEIVED&lt;br /&gt;
		EVENT_DNIS_RECEIVED&lt;br /&gt;
		EVENT_ANI_SENT&lt;br /&gt;
		EVENT_DNIS_SENT&lt;br /&gt;
		EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
		EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
		EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
		EVENT_APP_END_SIGNALING&lt;br /&gt;
		EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
		EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
		EVENT_TIMEOUT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Additional events to implement special variants&lt;br /&gt;
		EVENT_TONE_RECEIVED&lt;br /&gt;
		EVENT_TONE_SENT&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	RESULT_OK&lt;br /&gt;
	RESULT_FAIL&lt;br /&gt;
	RESULT_MISMATCH&lt;br /&gt;
	RESULT_OUT_OF_RESOURCE&lt;br /&gt;
	RESULT_INVALID_PARAM&lt;br /&gt;
	RESULT_INVALID_STATE&lt;br /&gt;
	RESULT_NOT_SUPPORTED&lt;br /&gt;
	RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
	RESULT_BLOCKED_LOCALLY&lt;br /&gt;
	RESULT_BLOCKED_REMOTELY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
	CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_FWD_REJECT_CALL&lt;br /&gt;
	CAUSE_FWD_HANG_UP&lt;br /&gt;
	CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_REJECT_CALL&lt;br /&gt;
	CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_HANG_UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	TRACE_LEVEL_0&lt;br /&gt;
	TRACE_LEVEL_1&lt;br /&gt;
	TRACE_LEVEL_2&lt;br /&gt;
	TRACE_LEVEL_3&lt;br /&gt;
	TRACE_LEVEL_4&lt;br /&gt;
	TRACE_LEVEL_ALWAYS&lt;br /&gt;
	TRACE_LEVEL_ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
== Mandatory functions to implement in this script ==&lt;br /&gt;
&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
=== HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )===&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		in_TimeslotCtx :&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
		in_InitialCasBits :&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
=== HandleEvent( in_TimeslotCtx, in_EventType, ... ) ===&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
	Parameters : &lt;br /&gt;
		in_TimeslotCtx :&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
		in_EventType :&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
		...	:&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
				EVENT_CAS_BITS_CHANGED:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
				EVENT_WINK_DETECTED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
				EVENT_WINK_COMPLETED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
				EVENT_TONE_RECEIVED&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
				EVENT_ANI_RECEIVED&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
				EVENT_DNIS_RECEIVED&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_TONE_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				EVENT_ANI_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
				EVENT_DNIS_SENT&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
				EVENT_APP_END_SIGNALING&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
				EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
				EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
				EVENT_TIMEOUT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
== Stack functions that can be called by this script ==	&lt;br /&gt;
&lt;br /&gt;
=== StackActionToString( in_Action ) ===&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== StackEventToString( in_Event ) ===&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 5.3 StackCauseToString( in_Cause ) ===&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== 5.4 StackLogTrace( in_TraceLevel, in_Format, ... ) ===&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		in_TraceLevel:&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
		in_Format:&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
		...:&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
=== StackAction( in_Action, ... ) ===&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
	Parameters : &lt;br /&gt;
		in_Action :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
		... :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
				ACTION_END_SIGNALING:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
				ACTION_SET_CAS_BITS&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
				ACTION_SEND_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
				ACTION_SEND_TONE&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
				ACTION_SEND_DNIS&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_WAIT_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
				ACTION_WAIT_DNIS&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_SET_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				ACTION_SET_DNIS&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
				ACTION_REPORT_SEIZURE&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
				ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
				ACTION_REPORT_ACCEPTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
				ACTION_REPORT_ALERTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
				ACTION_REPORT_ANSWERED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
				ACTION_REPORT_BLOCKED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
				ACTION_REPORT_UNBLOCKED&lt;br /&gt;
					NO parameter.&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
				ACTION_START_TIMER&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
				ACTION_CANCEL_TIMER&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/CASr1_scripting</id>
		<title>CASr1 scripting</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/CASr1_scripting"/>
				<updated>2013-07-30T13:59:53Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CASR1 script summary&lt;br /&gt;
This script will be identified as a CASR1 script when the following&lt;br /&gt;
variable is set:&lt;br /&gt;
	SCRIPT_TYPE=&amp;quot;CASR1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The CASR1 script allows implementation of all variants of CASR1 stacks&lt;br /&gt;
by controlling what actions must take place following received events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
1. Overview&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
The script will received an indication for each timeslot it has to&lt;br /&gt;
&amp;quot;control&amp;quot; through function HandleNewTimeslot.&lt;br /&gt;
The script will then be notified of any event on that timeslot&lt;br /&gt;
(CAS bits changes and others).&lt;br /&gt;
To each received event, the script will take one ore more action.&lt;br /&gt;
&lt;br /&gt;
It's up to the script implementation to define it's own states&lt;br /&gt;
for handling the calls. The script is thus very flexible in the way&lt;br /&gt;
it implements the CASR1 variant call flow.&lt;br /&gt;
&lt;br /&gt;
The current document does not describe how CASR1 call flows are&lt;br /&gt;
implemented (what are CAS bits, when and why to they &amp;quot;change&amp;quot;,&lt;br /&gt;
how calling/called numbers are exchanged, what is the call flow etc.)&lt;br /&gt;
The reader shall find that information in the specifications for&lt;br /&gt;
CASR1 variants. This script should provide all tools required to&lt;br /&gt;
actually implement CASR1 variants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
2. Configurable global script constants&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
The script can define some constants required by the stack (though&lt;br /&gt;
default values are provided if the script does not define these&lt;br /&gt;
constants.&lt;br /&gt;
&lt;br /&gt;
- SCRIPT_TYPE 				= &amp;quot;CASR1&amp;quot;&lt;br /&gt;
	Defines the type of this sript. Must be CASR1 in current case.&lt;br /&gt;
&lt;br /&gt;
- ABCD_PATTERN_MATCH_MASK 	= 0x1111&lt;br /&gt;
	Mask to apply to CAS bits detected from remote equipment.&lt;br /&gt;
	A bit which mask is set to 0 will be ignored and always reported as&lt;br /&gt;
	zero (0) to this script.&lt;br /&gt;
	This is useful in some cases when unused bits have undefined&lt;br /&gt;
	(and even sometimes toggeling!) values.&lt;br /&gt;
&lt;br /&gt;
- TONE_USE_DTMF			 	= 1&lt;br /&gt;
	Indicates the type of tones must be used to send/receive AND/DNIS.&lt;br /&gt;
	Value of 1 stands for DTMF. Value of 0 defaults to MFR1.&lt;br /&gt;
	DTMF mapping:&lt;br /&gt;
		'0'	-&amp;gt;	DTMF Digit 0: 				941Hz + 1336Hz&lt;br /&gt;
		'1'	-&amp;gt;	DTMF Digit 1: 				697Hz + 1209Hz&lt;br /&gt;
		'2'	-&amp;gt;	DTMF Digit 2: 				697Hz + 1336Hz&lt;br /&gt;
		'3'	-&amp;gt;	DTMF Digit 3: 				697Hz + 1477Hz&lt;br /&gt;
		'4'	-&amp;gt;	DTMF Digit 4: 				770Hz + 1209Hz&lt;br /&gt;
		'5'	-&amp;gt;	DTMF Digit 5: 				770Hz + 1336Hz&lt;br /&gt;
		'6'	-&amp;gt;	DTMF Digit 6: 				770Hz + 1477Hz&lt;br /&gt;
		'7'	-&amp;gt;	DTMF Digit 7: 				852Hz + 1209Hz&lt;br /&gt;
		'8'	-&amp;gt;	DTMF Digit 8: 				852Hz + 1336Hz&lt;br /&gt;
		'9'	-&amp;gt;	DTMF Digit 9: 				852Hz + 1477Hz&lt;br /&gt;
		'*'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'#'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
		'A'	-&amp;gt;	DTMF Digit A: 				697Hz + 1633Hz&lt;br /&gt;
		'B'	-&amp;gt;	DTMF Digit B: 				770Hz + 1633Hz&lt;br /&gt;
		'C'	-&amp;gt;	DTMF Digit C: 				852Hz + 1633Hz&lt;br /&gt;
		'D'	-&amp;gt;	DTMF Digit D: 				941Hz + 1633Hz&lt;br /&gt;
		Alternative values for * and #:&lt;br /&gt;
		'E'	-&amp;gt;	DTMF Digit Star (*): 		941Hz + 1209Hz&lt;br /&gt;
		'F'	-&amp;gt;	DTMF Digit Pound (#): 		941Hz + 1477Hz&lt;br /&gt;
	MFR1 mapping:&lt;br /&gt;
		'0'	-&amp;gt;	MFR1 Digit 0: 				1300Hz + 1500Hz&lt;br /&gt;
		'1'	-&amp;gt;	MFR1 Digit 1: 				700Hz  + 900Hz&lt;br /&gt;
		'2'	-&amp;gt;	MFR1 Digit 2: 				700Hz  + 1100Hz&lt;br /&gt;
		'3'	-&amp;gt;	MFR1 Digit 3: 				900Hz  + 1100Hz&lt;br /&gt;
		'4'	-&amp;gt;	MFR1 Digit 4: 				700Hz  + 1300Hz&lt;br /&gt;
		'5'	-&amp;gt;	MFR1 Digit 5: 				900Hz  + 1300Hz&lt;br /&gt;
		'6'	-&amp;gt;	MFR1 Digit 6: 				1100Hz + 1300Hz&lt;br /&gt;
		'7'	-&amp;gt;	MFR1 Digit 7: 				700Hz  + 1500Hz&lt;br /&gt;
		'8'	-&amp;gt;	MFR1 Digit 8: 				900Hz  + 1500Hz&lt;br /&gt;
		'9'	-&amp;gt;	MFR1 Digit 9: 				1100Hz + 1500Hz&lt;br /&gt;
		'*'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'#'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
		'A'	-&amp;gt;	MFR1 STI: 					900Hz  + 1700Hz&lt;br /&gt;
		'B'	-&amp;gt;	MFR1 STII: 					1300Hz + 1700Hz&lt;br /&gt;
		'C'	-&amp;gt;	MFR1 STIII: 				700Hz  + 1700Hz&lt;br /&gt;
		'D'	-&amp;gt;	Not supported in MFR1&lt;br /&gt;
		Alternative characters:&lt;br /&gt;
		'E'	-&amp;gt;	MFR1 KP (Start of pulsing):	1100Hz + 1700Hz&lt;br /&gt;
		'F'	-&amp;gt;	MFR1 ST (End of pulsing):	1500Hz + 1700Hz&lt;br /&gt;
&lt;br /&gt;
- TONE_ON_TIME				= 60&lt;br /&gt;
	Determines the &amp;quot;on time&amp;quot; (in ms) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
- TONE_OFF_TIME				= 50&lt;br /&gt;
	Determines the &amp;quot;off time&amp;quot; (inter-digit delay)(in ms) of tones used&lt;br /&gt;
	when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
- TONE_LEVEL				= -10&lt;br /&gt;
	Determines the level (in DB) of tones used when sending ANI/DNIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
3. Static constants pushed by the stack, for usage in this script&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
Available actions for &amp;quot;StackAction&amp;quot; function:&lt;br /&gt;
	Commonly used actions:&lt;br /&gt;
		ACTION_END_SIGNALING&lt;br /&gt;
		ACTION_SET_CAS_BITS&lt;br /&gt;
		ACTION_SEND_WINK&lt;br /&gt;
		ACTION_WAIT_WINK&lt;br /&gt;
		ACTION_SEND_ANI&lt;br /&gt;
		ACTION_SEND_DNIS&lt;br /&gt;
		ACTION_WAIT_ANI&lt;br /&gt;
		ACTION_WAIT_DNIS&lt;br /&gt;
		ACTION_REPORT_SEIZURE&lt;br /&gt;
		ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
		ACTION_REPORT_ACCEPTED&lt;br /&gt;
		ACTION_REPORT_ALERTED&lt;br /&gt;
		ACTION_REPORT_ANSWERED&lt;br /&gt;
		ACTION_REPORT_BLOCKED&lt;br /&gt;
		ACTION_REPORT_UNBLOCKED&lt;br /&gt;
		ACTION_START_TIMER&lt;br /&gt;
		ACTION_CANCEL_TIMER&lt;br /&gt;
	Additional actions to implement special variants&lt;br /&gt;
		ACTION_SEND_TONE&lt;br /&gt;
		ACTION_SET_ANI&lt;br /&gt;
		ACTION_SET_DNIS&lt;br /&gt;
&lt;br /&gt;
Events received by this script on &amp;quot;HandleEvents&amp;quot; function:&lt;br /&gt;
	Commonly used events:&lt;br /&gt;
		EVENT_CAS_BITS_CHANGED&lt;br /&gt;
		EVENT_WINK_DETECTED&lt;br /&gt;
		EVENT_WINK_COMPLETED&lt;br /&gt;
		EVENT_ANI_RECEIVED&lt;br /&gt;
		EVENT_DNIS_RECEIVED&lt;br /&gt;
		EVENT_ANI_SENT&lt;br /&gt;
		EVENT_DNIS_SENT&lt;br /&gt;
		EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
		EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
		EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
		EVENT_APP_END_SIGNALING&lt;br /&gt;
		EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
		EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
		EVENT_TIMEOUT&lt;br /&gt;
	Additional events to implement special variants&lt;br /&gt;
		EVENT_TONE_RECEIVED&lt;br /&gt;
		EVENT_TONE_SENT&lt;br /&gt;
		&lt;br /&gt;
Result code that HandleNewTimeslot or HandleEvent funtions must return:&lt;br /&gt;
	RESULT_OK&lt;br /&gt;
	RESULT_FAIL&lt;br /&gt;
	RESULT_MISMATCH&lt;br /&gt;
	RESULT_OUT_OF_RESOURCE&lt;br /&gt;
	RESULT_INVALID_PARAM&lt;br /&gt;
	RESULT_INVALID_STATE&lt;br /&gt;
	RESULT_NOT_SUPPORTED&lt;br /&gt;
	RESULT_TRUNK_RES_NOT_IDLE&lt;br /&gt;
	RESULT_BLOCKED_LOCALLY&lt;br /&gt;
	RESULT_BLOCKED_REMOTELY&lt;br /&gt;
	&lt;br /&gt;
Call release causes to use with ACTION_END_SIGNALING&lt;br /&gt;
	CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
	CAUSE_FWD_SEIZURE_ACK_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_FWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_FWD_REJECT_CALL&lt;br /&gt;
	CAUSE_FWD_HANG_UP&lt;br /&gt;
	CAUSE_BWD_TONE_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_REJECT_CALL&lt;br /&gt;
	CAUSE_BWD_CALL_REFUSED&lt;br /&gt;
	CAUSE_BWD_ALERT_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_ANSWER_TIMEOUT&lt;br /&gt;
	CAUSE_BWD_HANG_UP&lt;br /&gt;
	&lt;br /&gt;
Trace levels (used with function StackLogTrace).&lt;br /&gt;
Least verbose is TRACE_LEVEL_0 (almost never printed).&lt;br /&gt;
Most verbose is TRACE_LEVEL_4 (generally printed)&lt;br /&gt;
	TRACE_LEVEL_0&lt;br /&gt;
	TRACE_LEVEL_1&lt;br /&gt;
	TRACE_LEVEL_2&lt;br /&gt;
	TRACE_LEVEL_3&lt;br /&gt;
	TRACE_LEVEL_4&lt;br /&gt;
	TRACE_LEVEL_ALWAYS&lt;br /&gt;
	TRACE_LEVEL_ERROR&lt;br /&gt;
	&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
4. Mandatory functions to implement in this script&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
The script must provide the following mandatory functions, that will&lt;br /&gt;
be called by the CAS stack at appropriate moments.&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
4.1 HandleNewTimeslot( in_TimeslotCtx, in_InitialCasBits )&lt;br /&gt;
	This function is called to prepare a new timeslot so it's ready to&lt;br /&gt;
	be used to receive events and eventually handle a CASR1 call.&lt;br /&gt;
	When this function is called, the timeslot must be set to &amp;quot;off-hook&amp;quot;&lt;br /&gt;
	state. The stack will later send EVENT_APP_UNBLOCK_TIMESLOT when&lt;br /&gt;
	it's time to go &amp;quot;on-hook&amp;quot; and be ready to make calls.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		in_TimeslotCtx :&lt;br /&gt;
			Context containing variables for this timeslot.&lt;br /&gt;
			This context is a LUA table.&lt;br /&gt;
			This table already contains two values:&lt;br /&gt;
			[&amp;quot;TrunkNumber&amp;quot;] and [&amp;quot;TimeslotNumber&amp;quot;]&lt;br /&gt;
			The script can create it's own variables here (like the&lt;br /&gt;
			&amp;quot;call state&amp;quot;), which will be accessible for any event on&lt;br /&gt;
			this timeslot.&lt;br /&gt;
		in_InitialCasBits :&lt;br /&gt;
			The initial states of CAS bits received from remote equipment&lt;br /&gt;
			(integer like 0x1111)&lt;br /&gt;
			&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
4.2 HandleEvent( in_TimeslotCtx, in_EventType, ... )&lt;br /&gt;
	This function reports that an event occurred on a timeslot&lt;br /&gt;
	Parameters : &lt;br /&gt;
		in_TimeslotCtx :&lt;br /&gt;
			Timeslot context used by the script to store any timeslot-&lt;br /&gt;
			related information, like the &amp;quot;call state&amp;quot;.&lt;br /&gt;
			This is the table that was passed to HandleNewTimeslot.&lt;br /&gt;
		in_EventType :&lt;br /&gt;
			The type of the event that was just received&lt;br /&gt;
			(see constants EVENT_* documented below)&lt;br /&gt;
		...	:&lt;br /&gt;
			Variable number of parameters, that depend on event type.&lt;br /&gt;
			Available event types and their parameters:&lt;br /&gt;
				EVENT_CAS_BITS_CHANGED:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Received CAS bits (integer like 0x1111)&lt;br /&gt;
					Indicates that CAS bits values received by&lt;br /&gt;
					remote equipment have changed.&lt;br /&gt;
				EVENT_WINK_DETECTED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been detected.&lt;br /&gt;
					This event can only follow ACTION_WAIT_WINK.&lt;br /&gt;
				EVENT_WINK_COMPLETED:&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a &amp;quot;Wink&amp;quot; has been sent successfully.&lt;br /&gt;
					This event can only follow ACTION_SEND_WINK.&lt;br /&gt;
				EVENT_TONE_RECEIVED&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- 	String that represents the received tone (digit)&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Indicates that a tone was detected.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This does not include tones that are&lt;br /&gt;
							collected as part of ACTION_WAIT_ANI or&lt;br /&gt;
							ACTION_WAIT_DNIS, which are coalesced and&lt;br /&gt;
							reported as separate events.&lt;br /&gt;
				EVENT_ANI_RECEIVED&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent received (prefix/suffix detected).&lt;br /&gt;
					This event can only follow ACTION_WAIT_ANI.&lt;br /&gt;
					Note: 	The received ANI/DNIS digits are not passed&lt;br /&gt;
							to the script. The script does not have&lt;br /&gt;
							to know them. But the stack keeps them&lt;br /&gt;
							and they will be reported to the&lt;br /&gt;
							application upon ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
				EVENT_DNIS_RECEIVED&lt;br /&gt;
					Same as EVENT_ANI_RECEIVED, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_TONE_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that a tone (digit) as been sent&lt;br /&gt;
					successfully following ACTION_SEND_TONE.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				EVENT_ANI_SENT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that ANI (calling number) has been&lt;br /&gt;
					sent successfully (all tones played).&lt;br /&gt;
					This event can only follow ACTION_SEND_ANI.&lt;br /&gt;
				EVENT_DNIS_SENT&lt;br /&gt;
					Same as EVENT_ANI_SENT, but for DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				EVENT_APP_FWD_MAKE_CALL&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicate that a new &amp;quot;forward&amp;quot; call must be made.&lt;br /&gt;
					The script shall take appropraite actions to&lt;br /&gt;
					initiate a new call (most likely change the&lt;br /&gt;
					CAS bits to the &amp;quot;off hook&amp;quot; state).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ALERT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;alerted&amp;quot; state (meaning we have accepted&lt;br /&gt;
					the call, and received required information to&lt;br /&gt;
					proceed). The decision of when to alert the call&lt;br /&gt;
					is made by the application, and at that moment&lt;br /&gt;
					the script receives this event so it can take&lt;br /&gt;
					appropriate actions to alert a &amp;quot;backward&amp;quot; call.&lt;br /&gt;
					(in most variants, there is nothing to do, on&lt;br /&gt;
					 some variants, a &amp;quot;Wink&amp;quot; may be sent).&lt;br /&gt;
				EVENT_APP_BWD_MUST_ANSWER&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that this &amp;quot;backward&amp;quot; call must now&lt;br /&gt;
					be set to &amp;quot;answered&amp;quot; state. The decision of when &lt;br /&gt;
					set the call &amp;quot;answered&amp;quot;	is made by the application,&lt;br /&gt;
					and at that moment the script receives this event&lt;br /&gt;
					so it can take appropriate actions to answer.&lt;br /&gt;
					(in most variants, CAS bits must be set to&lt;br /&gt;
					 an &amp;quot;answered&amp;quot; pattern).&lt;br /&gt;
				EVENT_APP_END_SIGNALING&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application requests to terminate the call.&lt;br /&gt;
					    The script then take appropriate action, like&lt;br /&gt;
						sedding CAS bits to &amp;quot;idle&amp;quot; state, wait for&lt;br /&gt;
						remote equipment to acknowledge, then at the&lt;br /&gt;
						end use ACTION_END_SIGNALING to confirm that&lt;br /&gt;
						termination is completed.&lt;br /&gt;
					  - Script previously called ACTION_END_SIGNALING,&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script), in which&lt;br /&gt;
						case this event confirms that the application&lt;br /&gt;
						is also ready to terminate the call.&lt;br /&gt;
				EVENT_APP_BLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timeslot must be locally&lt;br /&gt;
					blocked, the next time it becomes &amp;quot;idle&amp;quot;.&lt;br /&gt;
					It's blocked by going &amp;quot;off-hook&amp;quot; and remaining&lt;br /&gt;
					in that state no matter remote state.&lt;br /&gt;
					This is also the default state for a newly&lt;br /&gt;
					created timeslot.&lt;br /&gt;
					This state can only be canceled by&lt;br /&gt;
					EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
				EVENT_APP_UNBLOCK_TIMESLOT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Cancels a previous EVENT_APP_BLOCK_TIMESLOT.&lt;br /&gt;
					This causes our CAS bits to be set to &amp;quot;on hook&amp;quot;.&lt;br /&gt;
				EVENT_TIMEOUT&lt;br /&gt;
					No specific parameter.&lt;br /&gt;
					Indicates that the timer previously started with&lt;br /&gt;
					ACTION_START_TIMER has expired.&lt;br /&gt;
	Returns : &lt;br /&gt;
		RESULT_OK, or one of the return codes defined above.&lt;br /&gt;
		This result code tells to the stack if the event was properly&lt;br /&gt;
		handled by the script. Upon non-OK code, the stack may decide&lt;br /&gt;
		to terminate the call.&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5. Stack functions that can be called by this script&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5.1 StackActionToString( in_Action )&lt;br /&gt;
	Returns string value of an action type.&lt;br /&gt;
	Example:&lt;br /&gt;
		local action = ACTION_END_SIGNALING&lt;br /&gt;
		StackActionToString( action )&lt;br /&gt;
		will return the string &amp;quot;ACTION_END_SIGNALING&amp;quot;.&lt;br /&gt;
	&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5.2 StackEventToString( in_Event )&lt;br /&gt;
	Returns string value of an event type.&lt;br /&gt;
	Example:&lt;br /&gt;
		StackEventToString( in_Event )&lt;br /&gt;
		will return the string &amp;quot;EVENT_TIMEOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5.3 StackCauseToString( in_Cause )&lt;br /&gt;
	Returns string value of a release cause.&lt;br /&gt;
	Example:&lt;br /&gt;
		my_release_cause = CAUSE_FWD_SEIZURE_COLLISION&lt;br /&gt;
		StackCauseToString( my_release_cause )&lt;br /&gt;
		will return the string &amp;quot;CAUSE_FWD_SEIZURE_COLLISION&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5.4 StackLogTrace( in_TraceLevel, in_Format, ... )&lt;br /&gt;
	Asks the stack to print a trace (generally debug traces).&lt;br /&gt;
	Traces will be sent to the &amp;quot;tblogtrace&amp;quot; application.&lt;br /&gt;
	Parameters:&lt;br /&gt;
		in_TraceLevel:&lt;br /&gt;
			Level of the trace (see TRACE_LEVEL_* above)&lt;br /&gt;
		in_Format:&lt;br /&gt;
			String that contains the trace to print, plus refernences&lt;br /&gt;
			to other arguments (&amp;quot;printf&amp;quot; style format)&lt;br /&gt;
		...:&lt;br /&gt;
			Values for printf-style refernces of in_Format.&lt;br /&gt;
	Example:&lt;br /&gt;
		local cas_bits = 0x1100&lt;br /&gt;
		StackLogTrace( TRACE_LEVEL_2, &amp;quot;Send CAS bits %08X&amp;quot;, cas_bits )&lt;br /&gt;
		will print &amp;quot;Send CAS bits 1100&amp;quot; to tblogtrace log.&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
5.5 StackAction( in_Action, ... )&lt;br /&gt;
	This function executes the specified action (in some cases with&lt;br /&gt;
	the specified action-specific arguments).&lt;br /&gt;
	The action is done asynchronously, meaning that control will &lt;br /&gt;
	immediately return to the script. Events will be received later&lt;br /&gt;
	according to the actions taken.&lt;br /&gt;
	Upon an event, the script may perform multiple actions (like&lt;br /&gt;
	starting a timer, declarign the call &amp;quot;alerted&amp;quot; and sending&lt;br /&gt;
	CAS bits for example)&lt;br /&gt;
	Parameters : &lt;br /&gt;
		in_Action :&lt;br /&gt;
			The action to perform.&lt;br /&gt;
			(see constants ACTION_* documented below)&lt;br /&gt;
		... :&lt;br /&gt;
			Variable number of action-specific arguments.&lt;br /&gt;
				ACTION_END_SIGNALING:&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- The call release cause to report.&lt;br /&gt;
						  See values &amp;quot;CAUSE_&amp;quot;.&lt;br /&gt;
					Indicates either that:&lt;br /&gt;
					  - Application previously requested to terminate&lt;br /&gt;
					    the call (with EVENT_APP_END_SIGNALING), in&lt;br /&gt;
						which case this action is used by the script&lt;br /&gt;
						to indicate that signaling is fully idle (local&lt;br /&gt;
						CAS bits set to &amp;quot;idle&amp;quot;, remote equipment &lt;br /&gt;
						has acknowledged too with &amp;quot;idle&amp;quot; CAS bits).&lt;br /&gt;
					  - Script wants to terminate the call&lt;br /&gt;
					    (after remote equipment set CAS bits to &amp;quot;idle&amp;quot;&lt;br /&gt;
						or after an error in the script). After&lt;br /&gt;
						sending ACTION_END_SIGNALING, the script must&lt;br /&gt;
						wait until EVENT_APP_END_SIGNALING is&lt;br /&gt;
						received, which confirms that application is&lt;br /&gt;
						ready to terminate the cally. Only at that&lt;br /&gt;
						moment the script shall set it's CAS bits&lt;br /&gt;
						to &amp;quot;idle&amp;quot; value.&lt;br /&gt;
				ACTION_SET_CAS_BITS&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- CAS bits to set (integer like 0x1111)&lt;br /&gt;
					Used to change the CAS bits that we are&lt;br /&gt;
					sending on current timeslot towawrd remote&lt;br /&gt;
					equipment.&lt;br /&gt;
				ACTION_SEND_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	CAS bits to set during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Duration of the &amp;quot;Wink&amp;quot; (in milliseconds)&lt;br /&gt;
					Used to send a &amp;quot;Wink&amp;quot;, which is temporary change of&lt;br /&gt;
					the CAS bits for few milliseconds, then back to&lt;br /&gt;
					initial CAS bits value.&lt;br /&gt;
					EVENT_WINK_COMPLETED will be received by&lt;br /&gt;
					the script once Wink has completed (CAS bits are&lt;br /&gt;
					back to their initial value)&lt;br /&gt;
				ACTION_WAIT_WINK&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Expected CAS bits during the &amp;quot;Wink&amp;quot;&lt;br /&gt;
							(integer like 0x1111)&lt;br /&gt;
						- 	Minimum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
						- 	Maximum duration of the &amp;quot;Wink&amp;quot; (in ms)&lt;br /&gt;
					Used to request a &amp;quot;Wink&amp;quot; detection.&lt;br /&gt;
					Upon next CAS bits change from remote equipment,&lt;br /&gt;
					the stack will see if the bits match the Wink&lt;br /&gt;
					expected bits.&lt;br /&gt;
					EVENT_WINK_DETECTED will be reported&lt;br /&gt;
					if CAS bits received from remote equipment change&lt;br /&gt;
					to the expected pattern for a duration within&lt;br /&gt;
					specified range, then go back to original value.&lt;br /&gt;
					Any other CAS bits change not deteced as a &amp;quot;Wink&amp;quot;&lt;br /&gt;
					will be reported to the script by&lt;br /&gt;
					EVENT_CAS_BITS_CHANGED (which will probably want&lt;br /&gt;
					to drop the call because a Wink was expected)&lt;br /&gt;
				ACTION_SEND_TONE&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Digit (tone) to send.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send one digit (tone) toward remote&lt;br /&gt;
					equipment. EVENT_TONE_SENT will be received&lt;br /&gt;
					once the tone has been successfully sent.&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
					Note:	This action is not used to send ANI/DNIS&lt;br /&gt;
							(calling/called numbers), it's used to&lt;br /&gt;
							send other tones that may be used within&lt;br /&gt;
							the current CASR1 variant call flow.&lt;br /&gt;
				ACTION_SEND_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to send before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to send after ANI. Can be empty.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
					Used to send ANI (calling number) toward&lt;br /&gt;
					remote equipment, using tones.&lt;br /&gt;
					A prefix may be inserted before ANI.&lt;br /&gt;
					A suffix is mandatory. It's transmitted after ANI.&lt;br /&gt;
					Remote equipment expects that suffix to determine&lt;br /&gt;
					that the ANI has been entirely sent.&lt;br /&gt;
					EVENT_ANI_SENT will be received once &lt;br /&gt;
					transmission of prefix + ANI + suffix completed&lt;br /&gt;
				ACTION_SEND_DNIS&lt;br /&gt;
					Same as ACTION_SEND_ANI, but for sending DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_WAIT_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	Prefix to expect before ANI. Can be empty.&lt;br /&gt;
						- 	Suffix to expect after ANI. Can be empty only&lt;br /&gt;
							if next argument (nb expected digits) is set.&lt;br /&gt;
							(see &amp;quot;Digit format&amp;quot; below)&lt;br /&gt;
						- 	Number of expected digits.&lt;br /&gt;
							Optional. Only required if suffix is empty.&lt;br /&gt;
					Used to wait for ANI (calling number) from&lt;br /&gt;
					remote equipment, by detecting tones.&lt;br /&gt;
					A prefix may be expected before ANI.&lt;br /&gt;
					A suffix is mandatory. It's received after ANI to&lt;br /&gt;
					indicate that the ANI has been entirely transmitted.&lt;br /&gt;
					EVENT_ANI_RECEIVED will be received if a&lt;br /&gt;
					matching prefix + suffix are detected.&lt;br /&gt;
				ACTION_WAIT_DNIS&lt;br /&gt;
					Same as ACTION_WAIT_ANI, but for receiving DNIS&lt;br /&gt;
					(called number)&lt;br /&gt;
				ACTION_SET_ANI&lt;br /&gt;
					Parameters:&lt;br /&gt;
						- 	ANI to set&lt;br /&gt;
					Used to replace the ANI detected by the stack with&lt;br /&gt;
					this ANI provided by the script.&lt;br /&gt;
					This action must be calld before action&lt;br /&gt;
					TBX_CASR2VMLIB_CASR1_ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					(otherwise it's too late to set ANI)&lt;br /&gt;
					Not normally used in CASR1 standard variants.&lt;br /&gt;
				ACTION_SET_DNIS&lt;br /&gt;
					Same as ACTION_SET_ANI, but for DNIS (called number)&lt;br /&gt;
				ACTION_REPORT_SEIZURE&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that seizure (off-hook) has&lt;br /&gt;
					been deteced on a timeslot.&lt;br /&gt;
				ACTION_REPORT_VALIDATE_CALL&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that ANI and/or DNIS have&lt;br /&gt;
					been successfully received, and we now have the&lt;br /&gt;
					information required to process this incoming call.&lt;br /&gt;
				ACTION_REPORT_ACCEPTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been accepted by remote equipment, often by&lt;br /&gt;
					detecting a &amp;quot;Wink&amp;quot;.&lt;br /&gt;
				ACTION_REPORT_ALERTED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been alerted by remote equipment.&lt;br /&gt;
					On most variants, there is no specific indication&lt;br /&gt;
					from remote side, and this action must be taken&lt;br /&gt;
					upon EVENT_DNIS_SENT.&lt;br /&gt;
					On other variants, a &amp;quot;Wink&amp;quot; may be awaited before&lt;br /&gt;
					calling this action.&lt;br /&gt;
				ACTION_REPORT_ANSWERED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tell the application that a &amp;quot;forward&amp;quot; call has&lt;br /&gt;
					been answered by remote equipment, generally&lt;br /&gt;
					because &amp;quot;off-hook&amp;quot; CAS bits have been received.&lt;br /&gt;
				ACTION_REPORT_BLOCKED&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Tells the application that the script considers&lt;br /&gt;
					the timeslot as &amp;quot;remotely blocked&amp;quot;. This is the&lt;br /&gt;
					case when remote side goes &amp;quot;off hook&amp;quot; and remains&lt;br /&gt;
					in that state for some duration after we've&lt;br /&gt;
					returned to &amp;quot;on hook&amp;quot; on our side.&lt;br /&gt;
				ACTION_REPORT_UNBLOCKED&lt;br /&gt;
					NO parameter.&lt;br /&gt;
					Tells the application that the timeslot is no&lt;br /&gt;
					more &amp;quot;remotely blocked&amp;quot;, because remote&lt;br /&gt;
					equipment went &amp;quot;on hook&amp;quot; after we reported&lt;br /&gt;
					ACTION_REPORT_BLOCKED.&lt;br /&gt;
				ACTION_START_TIMER&lt;br /&gt;
					Parameter:&lt;br /&gt;
						- Timer duration in milliseconds.&lt;br /&gt;
					Starts a timer. EVENT_TIMEOUT will be&lt;br /&gt;
					posted if the timer expires before&lt;br /&gt;
					ACTION_CANCEL_TIMER is called.&lt;br /&gt;
				ACTION_CANCEL_TIMER&lt;br /&gt;
					No parameter.&lt;br /&gt;
					Cancels a timer previously started with&lt;br /&gt;
					ACTION_START_TIMER.&lt;br /&gt;
			&lt;br /&gt;
	Digit format:&lt;br /&gt;
		The digit format (for sending tone or ANI/DNIS prefix/suffix)&lt;br /&gt;
		is represented by a string that contains up to 3 of the&lt;br /&gt;
		following characters: 0123456789ABCD*#&lt;br /&gt;
				&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal</id>
		<title>Symmetric NAT Traversal</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal"/>
				<updated>2013-05-03T19:16:33Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: added monenclature.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tmedia supports passive NAT Traversal that addresses the need of peer VoIP endpoint having a private network address. This endpoint device is situated behind a NAT (Network Address Translation) device, e.g. Firewall, while the Tmedia VoIP port has a public IP address. For the passive mode, TMG detects the received RTP packet's source IP address and port. In response, Tmedia uses this source IP address and port as the packet destination for RTP. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Passive NAT Traversal ==&lt;br /&gt;
Tmedia supports passive NAT Traversal starting from Tmedia release 2.6.31.&lt;br /&gt;
&lt;br /&gt;
Passive NAT traversal means the remote endpoint is behind a NAT.&lt;br /&gt;
&lt;br /&gt;
This is also called Remote NAT traversal or far-end NAT traversal.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Active NAT Traversal ==&lt;br /&gt;
Tmedia supports active NAT Traversal starting from Tmedia release 2.7.&lt;br /&gt;
&lt;br /&gt;
Active NAT traversal means the TMG endpoint is behind a NAT.&lt;br /&gt;
&lt;br /&gt;
This is also called Local NAT traversal or near-end NAT traversal. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical Use Case ==&lt;br /&gt;
[[File:passive_nat_traversal_use_case.jpg|700px]]&lt;br /&gt;
&lt;br /&gt;
== Important Reminders ==&lt;br /&gt;
* All devices in the path must support symmetric RTP/RTCP: RFC 4961&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.7#SIP Advanced Features|Toolpack v2.7: SIP Advance Features]]&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.6#SIP Advanced Features|Toolpack v2.6: SIP Advance Features]]&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
* RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP) &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal</id>
		<title>Symmetric NAT Traversal</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal"/>
				<updated>2013-05-03T19:16:00Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tmedia supports passive NAT Traversal that addresses the need of peer VoIP endpoint having a private network address. This endpoint device is situated behind a NAT (Network Address Translation) device, e.g. Firewall, while the Tmedia VoIP port has a public IP address. For the passive mode, TMG detects the received RTP packet's source IP address and port. In response, Tmedia uses this source IP address and port as the packet destination for RTP. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Passive NAT Traversal ==&lt;br /&gt;
Tmedia supports passive NAT Traversal starting from Tmedia release 2.6.31.&lt;br /&gt;
&lt;br /&gt;
Passive NAT traversal means the remote endpoint is behind a NAT.&lt;br /&gt;
&lt;br /&gt;
This is also called Remote NAT traversal or far-end NAT traversal.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Active NAT Traversal ==&lt;br /&gt;
Tmedia supports active NAT Traversal starting from Tmedia release 2.7.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical Use Case ==&lt;br /&gt;
[[File:passive_nat_traversal_use_case.jpg|700px]]&lt;br /&gt;
&lt;br /&gt;
== Important Reminders ==&lt;br /&gt;
* All devices in the path must support symmetric RTP/RTCP: RFC 4961&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.7#SIP Advanced Features|Toolpack v2.7: SIP Advance Features]]&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.6#SIP Advanced Features|Toolpack v2.6: SIP Advance Features]]&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
* RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP) &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal</id>
		<title>Symmetric NAT Traversal</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal"/>
				<updated>2013-05-03T19:15:34Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: added monenclature.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tmedia supports passive NAT Traversal that addresses the need of peer VoIP endpoint having a private network address. This endpoint device is situated behind a NAT (Network Address Translation) device, e.g. Firewall, while the Tmedia VoIP port has a public IP address. For the passive mode, TMG detects the received RTP packet's source IP address and port. In response, Tmedia uses this source IP address and port as the packet destination for RTP. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Passive NAT Traversal ==&lt;br /&gt;
Tmedia supports passive NAT Traversal starting from Tmedia release 2.6.31.&lt;br /&gt;
&lt;br /&gt;
Passive NAT traversal means the remote endpoint is behind a NAT.&lt;br /&gt;
This is also called Remote NAT traversal or far-end NAT traversal.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Active NAT Traversal ==&lt;br /&gt;
Tmedia supports active NAT Traversal starting from Tmedia release 2.7.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical Use Case ==&lt;br /&gt;
[[File:passive_nat_traversal_use_case.jpg|700px]]&lt;br /&gt;
&lt;br /&gt;
== Important Reminders ==&lt;br /&gt;
* All devices in the path must support symmetric RTP/RTCP: RFC 4961&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.7#SIP Advanced Features|Toolpack v2.7: SIP Advance Features]]&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.6#SIP Advanced Features|Toolpack v2.6: SIP Advance Features]]&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
* RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP) &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal</id>
		<title>Symmetric NAT Traversal</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal"/>
				<updated>2013-05-03T19:11:53Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: remove the limitation of not being active&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tmedia supports passive NAT Traversal that addresses the need of peer VoIP endpoint having a private network address. This endpoint device is situated behind a NAT (Network Address Translation) device, e.g. Firewall, while the Tmedia VoIP port has a public IP address. For the passive mode, TMG detects the received RTP packet's source IP address and port. In response, Tmedia uses this source IP address and port as the packet destination for RTP. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Passive NAT Traversal ==&lt;br /&gt;
Tmedia supports passive NAT Traversal starting from Tmedia release 2.6.31.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Active NAT Traversal ==&lt;br /&gt;
Tmedia supports active NAT Traversal starting from Tmedia release 2.7.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical Use Case ==&lt;br /&gt;
[[File:passive_nat_traversal_use_case.jpg|700px]]&lt;br /&gt;
&lt;br /&gt;
== Important Reminders ==&lt;br /&gt;
* All devices in the path must support symmetric RTP/RTCP: RFC 4961&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.7#SIP Advanced Features|Toolpack v2.7: SIP Advance Features]]&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.6#SIP Advanced Features|Toolpack v2.6: SIP Advance Features]]&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
* RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP) &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal</id>
		<title>Symmetric NAT Traversal</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Symmetric_NAT_Traversal"/>
				<updated>2013-05-03T19:11:12Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: adding active NAT&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tmedia supports passive NAT Traversal that addresses the need of peer VoIP endpoint having a private network address. This endpoint device is situated behind a NAT (Network Address Translation) device, e.g. Firewall, while the Tmedia VoIP port has a public IP address. For the passive mode, TMG detects the received RTP packet's source IP address and port. In response, Tmedia uses this source IP address and port as the packet destination for RTP. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Passive NAT Traversal ==&lt;br /&gt;
Tmedia supports passive NAT Traversal starting from Tmedia release 2.6.31.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TelcoBridges and Active NAT Traversal ==&lt;br /&gt;
Tmedia supports active NAT Traversal starting from Tmedia release 2.7.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical Use Case ==&lt;br /&gt;
[[File:passive_nat_traversal_use_case.jpg|700px]]&lt;br /&gt;
&lt;br /&gt;
== Important Reminders ==&lt;br /&gt;
* All devices in the path must support symmetric RTP/RTCP: RFC 4961&lt;br /&gt;
* Currently, TMedia does not support advertising itself behind a NAT (Active NAT Traversal)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.7#SIP Advanced Features|Toolpack v2.7: SIP Advance Features]]&lt;br /&gt;
*[[Web_Portal_Tutorial_Guide_v2.6#SIP Advanced Features|Toolpack v2.6: SIP Advance Features]]&lt;br /&gt;
&lt;br /&gt;
== External Sources ==&lt;br /&gt;
* RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP) &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs revising]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Local_nat_select.png</id>
		<title>File:Local nat select.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Local_nat_select.png"/>
				<updated>2013-05-03T19:09:53Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Local_nat_add.png</id>
		<title>File:Local nat add.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Local_nat_add.png"/>
				<updated>2013-05-03T19:09:26Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Nat_menu.png</id>
		<title>File:Nat menu.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Nat_menu.png"/>
				<updated>2013-05-03T19:09:12Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Enabling_Local_NAT_Traversal_A</id>
		<title>Enabling Local NAT Traversal A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Enabling_Local_NAT_Traversal_A"/>
				<updated>2013-05-03T19:09:00Z</updated>
		
		<summary type="html">&lt;p&gt;Clod Patry: add everything&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== '''''Applies to version: v2.7.''''' ===&lt;br /&gt;
{{DISPLAYTITLE:Enabling Local NAT Traversal}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To enable Local NAT Traversal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1- Select '''NATs''' from the left menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:nat_menu.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2- Click on '''Create New Configuration'''&lt;br /&gt;
* Enter a significant Name&lt;br /&gt;
* Choose a Local Method.&lt;br /&gt;
* If necessary, give extra parameter.&lt;br /&gt;
&lt;br /&gt;
[[Image:local_nat_add.png]]&lt;br /&gt;
&lt;br /&gt;
* Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that the NAT configuration has been done, you have to associate this with your NAP.&lt;br /&gt;
&lt;br /&gt;
3- Select '''NAP''' from the navigation panel&lt;br /&gt;
&lt;br /&gt;
[[Image:NatTraversal_0_A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4- Select a SIP NAP from the '''Network Access Point List'''&lt;br /&gt;
* Click '''Edit'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SipParams_0_1_A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5- In the section '''Network Address Translation''':&lt;br /&gt;
* Choose the proper Local Method. The select box will contain the same name as your Local NAT configuration, that you gave in step #2.&lt;br /&gt;
[[Image:local_nat_select.png]]&lt;br /&gt;
&lt;br /&gt;
* Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Here's more useful regarding the 2 Local NAT Traversal Methods:'''&lt;br /&gt;
&lt;br /&gt;
'''No NAT'''&lt;br /&gt;
&lt;br /&gt;
This method is if you're not behind a NAT. This is the default value.&lt;br /&gt;
&lt;br /&gt;
'''Force Public IP'''&lt;br /&gt;
&lt;br /&gt;
This method will set some SIP Headers and SDP fields with the IP address you set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related actions ==&lt;br /&gt;
[[Symmetric_NAT_Traversal|Symmetric NAT traversal]]&lt;/div&gt;</summary>
		<author><name>Clod Patry</name></author>	</entry>

	</feed>