Upgrade 3CX to v18 and get it hosted free!

tdd mode

Author image
Usage: TDD MODE <on|off|mate>

Enable/Disable TDD transmission/reception on a channel.
This function is currently (01July2005) only supported on Asterisk ZAP channels channels.
As of 02July2005, this function never returns 0 (Not Capable). If it fails for any reason, -1 (Failure) will be returned, otherwise 1 (Success) will be returned. The capability for returning 0 if the channel is not capable of TDD MODE is a future plan.

Returns:
failure: 200 result=-1
not capable: 200 result=0
success: 200 result=1

It should be noted that there are a number of different TDD protocols used in different countries. Asterisk implements Baudot, 45.5 bits which is the USA standard.
The current implementation requires modifications to TDD.c in order to modify the baud rate.

Please list other country standards here:
Australia
Baudot 50 bps

USA
Baudot 45.5 bps

Currently the TDD mode code is very much Alpha quality as at Dec 2006. The problem appears to be with the underlying fskmodem.c which appears to have problems staying in sync. Testing shows that it will work for about 30 seconds after connecting and then it will nolonger transmitt characters.

The following is a sample agi script (written in bash) which provides a test bed for TDD mode. The script is designed to be called as an agi. When a TDD device connects it transmitts a welcome message and then echos any characters back to the remote TDD console.


#!/bin/bash

#echo verbose "\"Starting TDD script\"" 3
#read

read -s info
while [ -n "$info" ]
do
# echo verbose "\"Info $info\"" 3
read -s info
done

#echo verbose "\"Entering TDD Mode\"" 3
echo "tdd mode on"
read -s
#echo verbose "\"Entering read loop\"" 3
echo send text "\"How can we help you? GA\""
read -s
while [[ $message != "GOODBYE GA" ]]
do
echo receive text 120000
read -s text
export char=${text:14:1}
export message=$char
echo verbose "\"message = $message\"" 3
read -s
while [[ ${message:`expr length "$message"` – 4:3} != " GA" ]]
do
echo receive text 30000
read -s text
export char=${text:14:1}
# if [[ $char == "<" ]]
# do
# export message=${message:0:`expr length "$message"` – 2}
# else
export message=$message$char
# done
echo verbose "\"message = $message\"" 3
read -s
done
echo send text "\"$message\""
read -s
done
echo send text "\"Goodbye SKSK\""
read -s


Go back to Asterisk AGI


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.
Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.