how to make a test call from CLI

If you want to test your extension from Asterisk CLI you can use the “originate” command:

Example: asterisk -rx “originate SIP/1007 application Playback hello-world”

After this 1007 will ring and hello-world will be played.

There are two ways to use this command. A call can be originated between a
channel and a specific application, or between a channel and an extension in
the dialplan. This is similar to call files or the manager originate action.
Calls originated with this command are given a timeout of 30 seconds.

Usage1: originate <tech/data> application <appname> [appdata]
This will originate a call between the specified channel tech/data and the
given application. Arguments to the application are optional. If the given
arguments to the application include spaces, all of the arguments to the
application need to be placed in quotation marks.

Usage2: originate <tech/data> extension [exten@][context]
This will originate a call between the specified channel tech/data and the
given extension. If no context is specified, the ‘default’ context will be
used. If no extension is given, the ‘s’ extension will be used.

asterisk -rx “originate SIP/<extn #> application Playback echo-instruct”


You may also like