Originate a call in Asterisk

Hi all,
In my application I want to make a call using Asterisk AMI with the node-red-asterisk-ami-manager in my Grandstream PBX.
The node status is connected and I receive events from the node, but when I try to send the "originate" action with all the parameters, I receive a RequestBadFormat event.
The message I send to the node is sent in msg.payload with the following text:
"action: Originate \ r \ n
channel: PJSIP / 7000 \ r \ n
context: from-internal \ r \ n
exten: 205 \ r \ n
priority: 1 \ r \ n
timeout: 60000 \ r \ n".

Any ideas about the format of the actions?

Regards

are you sure it’s supposed to be a string with windows line endings?

Rather than an object?

I'm not sure since there is no information in the node.
I will try to send an object.

1 Like

Thanks ukmoose for the suggestion, I used an object and it Works.
I have created an IVR on extension 7005 with a warning message and in case of receiving an event, an automatic call is made to extension 205.
This is my object:
msg.payload.action= "Originate"
msg.payload.channel= "PJSIP/205"
msg.payload.context= "from-internal"
msg.payload.exten= "7005"
msg.payload.priority= "1"
msg.payload.timeout="60000"

1 Like

I get the error Extension does not exist, while I know that the extension exits since is my phone.
How can I troubleshoot this?

.

Hi Andre_x,
Can you try another command, for example CoreShowChannels?

I get a Success response.

P.s. How do I get all the commands? Sorry, but I'm a complete newbie!

You can see the commands here Asterisk 18 AMI Actions - Asterisk Project - Asterisk Project Wiki

The main parameters are channel and exten. Channel is the destination of the call and exten the source. in my case exten is the ivr number where the message is recorded.

In which form should the channel be?
If I put my my number (my extension or my mobile number) I always get Invalid channel or Extension does not exist, but all the extensions I'm trying exists...

In my case the channel is in the form msg.payload.channel= "PJSIP/205", where 205 is the destination number and PJSIP is the protocol. I have a Grandstream IP PBX and the extension 205 is declared.

I have declared the extensiĂłn 7005 as IVR, with the format msg.payload.exten= "7005".

The extension is in the same way that I use it, I don't understand why it still says that it doesn't exist...mmm....