Seeking Guidance on Using the Asterisk Interface Test Application

Hello,

While I’m not entirely new to this, I’m looking to explore the functionalities of the Asterisk Interface Test Application (app_test.so). Could you please direct me to any documentation or provide some guidance on how to effectively test the TestClient and TestServer components?

I would greatly appreciate any suggestions or information you can provide regarding this matter.

Thank you in advance for your assistance.

The Test application sends (Client) and receives (Server) DTMF and other noise, logging the results. You can test either calls between different Asterisk systems or loopback calls on the same system.

For example, a loopback test of your SIP trunk provider might include something like the following in your dialplan extensions.conf file, assuming all your incoming calls from your SIP trunk provider land in your from-pstn dialplan context:

[from-pstn]
exten = 3035551234/3035550000,1,TestServer()

[muh-test-client]
exten = s,1,TestClient(777)

The above matches on a specific caller ID (3035550000) so you can graft it on to your existing DID(s). It also shows a Test ID of 777 but you could change that to ${EPOCH} which would let you make one test per second and store in a new file each time (see further below).

After reloading that bit of dialplan, you can generate a sample.call file that you copy into the /var/spool/asterisk/outgoing/ directory, including the following into this file:

Channel: PJSIP/+13035551234@muh-trunk
Context: muh-test-client
Extension: s
Priority: 1
Callerid: PBX <(303) 555-0000>

The call should start, You won’t see much on the Asterisk CLI. But you can view test results in /var/log/asterisk/testresults/ directory, as two separate files:

777-client.txt

CLIENTCHAN:    PJSIP/muh-trunk-00000099
CLIENTTEST ID: 777
ANSWER:        PASS
WAIT DTMF 1:   PASS
SEND DTMF 2:   PASS
WAIT 1 SEC:    PASS
MEASURENOISE:  PASS (0)
WAIT DTMF 4:   PASS
SENDTONE:      PASS
WAIT DTMF 5:   PASS
WAIT 1 SEC:    PASS
MEASURETONE:   PASS (6639)
SEND DTMF 7:   PASS
WAIT DTMF 8:   PASS
-- END TEST--

777-server.txt


SERVERCHAN:    PJSIP/muh-trunk-00000098
SERVERTEST ID: 777
ANSWER:        PASS
SEND DTMF 1:   PASS
WAIT DTMF 2:   PASS
MEASURENOISE:  PASS (0)
SEND DTMF 4:   PASS
WAIT 1 SEC:    PASS
MEASURETONE:   PASS (6634)
SEND DTMF 5:   PASS
SENDTONE:      PASS
WAIT DTMF 7:   PASS
SEND DTMF 8:   PASS
WAIT HANGUP:   PASS
-- END TEST--

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.