I want to start a call from Asterisk CLI with “channel originate” command.
But I’d like to simulate a call to a specific SIP trunk. How can I do that ?
Without any additional parameters, the following cli command just makes a call with “anonymous” CLI.
When dialing a Local Channel you are dialing within Asterisk into the Asterisk dialplan.
I was meaning somthing like this mabye, where 447589975480 is the caller ID on the outbound call, so you can replace it. NOTE THIS IS NOT AN STEP BY STEP GUIDE, just an example in order you get the logic of what I mean
thanks.
should I use “channel originate” as in below example ? Because without “channel” keyword, I get “no such command”
With the “channel” keyword , nothing outputs as seen below.
What are the parameters after keyword “Local/” ?
I guess "myoutbound " is the trunk name. But what are the 2 numbers ?
myoutbound is not the trunk name; it is the context in the dialplan used for outbound calls. You should use whatever name you would already use for this purpose for simple, directly dialled outbound calls.
moh is a dialplan context that is being created to isolate the special extension used to isolate the special extension used for generating music on hold. It can have any, otherwise used, name, as long as you use the same name in the originate. It looks as though it is simply being used to provide a complete demonstration configuration, and you should really be using a context that can dial the call you actually want.
You presumably chose the context name in the first place! Otherwise, if the person who did write the dialplan cannot be contacted, you will need to look at how the dialplan works.
actually I am not an Asterisk expert , I did not write my dialplan myself. I had used a GUI version named Trixbox.
So I know nothing about dialplan or context names. is there a quick way to find out ?
Unfortunately, once you use a GUI, you tend to lose the ability to use the full power of Asterisk, and this may be one of those cases. The people who marketed Trixbox have cut off their users so fully that they haven’t even left their peer support forums open.
GUIs tend to write dialplans dynamically, and also have very complex libraries of dialplan code.
The former means that the relevant parts of the dialplan may only exist in memory. The latter means you need expertise on the specific GUI to understand how to safely modify any dialplan that you can access.
@mrmrmrmr In order you be able to use local channels and write customized codes on GUI system, you should at least have basic asterisk knowledges, but this is one of the biggest problem with newbies, they are always trying to achieve advanced and intermediate stuff, and they dont take time at least to understand the basic concepts of Asterisk .
At the end you will have 3 options :
Start learning Asterisk by the basic
Hire a consultant
abandoning your project
If you decide to take the hard way , but at the end your best option. the path to your success http://www.asteriskdocs.org/
well , actually I am not an Asterisk expert and I do not intend to be.
I am using Asterisk at home for a very basic home IP PBX purpose.
I had thought that starting a call from CLI should be very easy, so I thought of a basic integration with my Amazon Alexa - SamsungSmartthings environment.
I would just call “Alexa ask Asterisk to call some_number” , and it would call.
The Alexa side of this setup is ready.
I just thought that making a call over Asterisk from CLI would be very very simple.
I did not thought that I should learn deep Asterisk dialplan structure etc.
I am very sorry for the disturbance caused to you all Asterisk experts.
I can not afford to hire a consultant for just a “nice to have” functionality.
Only one option left : abandone project
(but it would be very easy if I figured out what context and dialplan to use when calling from CLI)
Checking that, I also found my context name as "access"
Following call file solved my issue. It also connects the extension with the called number.
Now I will work on the Amazon Alexa side.