There seem to be many, many articles and forum posts on the internet about how to trigger a call directly from the Asterisk command line.
Mostly they reference the “dial” command, which on Asterisk 17.4 doesn’t seem to exist.
Then there is voip-info which references the “originate” command but doesn’t give any context or examples. If you just type in originate into the command line it doesn’t recognise it.
You need to
channel originate PJSIP/02082446556@voiceflex-endpoint extension 01309655655@Voiceflex-Incoming
This command would dial on an outbound PJSIP extension at the VoIP provider. And would link it to extension 01309655655 in the context Voiceflex-Incoming.
(This article is mainly for my own reference at a later date).
No such command ‘channel originate’ (type ‘core show help channel originate’ for other possible commands)
What version of Asterisk are you on?
server*CLI> core show version
Asterisk 14.3.0 built by root @ server on a x86_64 running Linux on 2017-02-26 14:48:13 UTC
server*CLI> channel originate
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: channel originate application [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: channel originate 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.
hey! this one is Asterisk 18.1.1, damn bored with this lame pjsip as everything works and was clear with sip.conf, all my call back scripts for php is not working now, not clear how to dialout without registration, as before Dial(SIP/123@sip.456.com:5060,123). Incoming calls also hell non logic way to terminate, no such endpoint if not specifiend fone number, so temporary make all anonymous calls to sip phone. Unknown or disables wrong options just block all sections to ignore without any error no matter what debug level you set.. old configs gone, this is why from scratch setuping now pjsip.
channel request hangup all – works well.
Edit /etc/asterisk/modules.conf
set
autoload = yes
Then reload asterisk and see if the channel originate command appears?
If not – check you have
/usr/lib/asterisk/modules/res_clioriginate.so
The migration to PJSIP is painful! The config is so different to sip.conf but it is a good change once done, much more reliable. Remember that your dialplan or originate commands need PJSIP/ not SIP/
hold on, need to compile it
[modules]
autoload=yes
noload => chan_rtp.so
noload => chan_alsa.so
noload => chan_console.so
noload => res_hep.so
noload => res_hep_pjsip.so
noload => res_hep_rtcp.so
noload => chan_sip.so
noload => app_voicemail_odbc.so
noload => app_voicemail_imap.so
INVITE sip
From: “Anonymous” ;tag
SIP/2.0 100 Trying
SIP/2.0 180 Ringing
cool, now is working.. calling itself if not metion second end,
channel originate PJSIP/123 extension 456@blabla
channel originate PJSIP/123 application DISA(
The first leg will have to answer before it then makes the call to the other side (the extension or application)
right. and that is what i call 100 times try with this digium before get the way how it can go through(and probably just until the next version). no correct manuals or info.. ..expecting to work:
channel originate PJSIP/123&PJSIP/234 extension 222@blabla
but its not, and for disa(000) says No such application ‘DISA(000)’, but without arguments:
WARNING[19761]: app_disa.c:168 disa_exec: DISA requires an argument (passcode/passcode file)
heh.. from cli should be working outdial:
channel originate PJSIP/sip:12125551234@sip.something.com extension 123@blabla
Unable to create PJSIP channel – endpoint ‘sip.something.com’ was not found
not clear if i want to make each call with different servers or to siphones without any registrations, need to put every single termination point in config?!
got email? or freenode?