Tap here to compare the top VoIP providersTap here to hide the top VoIP Providers
Asterisk cmd TestServer
TestServerExecute Interface Test server; to be used together with TestClient()
Introduced with Asterisk 1.1dev (1.2 release)
DetailsTestServer(): Perform test server function and write call report.
Results stored in /var/log/asterisk/testreports/<testid>-server.txt
or possibly /var/log/asterisk/testresults/<testid>-server.txt depending on * version
file format as follows:
-rw-r--r-- 1 root 109 Mar 31 23:18 testa-client.txt
CLIENTTEST ID: testa
WAIT DTMF 1: FAIL
-- END TEST--
Exampleextensions.conf on the server side:
exten => 8787,1,Answer
exten => 8787,n,Testserver
extensions.conf on the client machine:
exten => 8782,1,Answer
exten => 8782,n,Testclient(testa)
Shell script for the client machine to generate calls:
#! /bin/bash # cat <<EOD >/var/spool/asterisk/outgoing.temp/test-$$ Channel: Zap/g1/8787 MaxRetries: 0 RetryTime: 60 WaitTime: 30 Context: default Extension: 8782 Priority: 1 EOD mv /var/spool/asterisk/outgoing.temp/test-$$ /var/spool/asterisk/outgoing/ echo Made call test-$$ >&2
This script triggers an outgoing call to the server being tested, then starts the Testclient on our side. The client and server do their thing and leave a log on both sides.
Make sure you use a valid channel and outgoing extension in the bash script above...
You can confirm the activity in /var/log/asterisk/messages with the tail -f to watch activity.
Tests over ZaptelThe above example needs slight modification over a Zaptel channel.
If you call over zaptel, you'll have to limit yourself you test IDs that are legal phone DTMF chracters. Otherwise you'll end up with the error:
WARNING: app.c:307 ast_dtmf_stream: Illegal DTMF character 't' in string. (0-9*#aAbBcCdD allowed)
(As of writing this I have not yet gotten an app_test call over zaptel working)
Go back to Asterisk - documentation of application commands
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+