With Originate I make a call from a Local channel to an extension with the following code:
app.Dial("PJSIP/100&PJSIP/200", 60)
app.SayDigits("12345")
Asterisk calls the given parties and after answering they call themselves automatically. How to call multiple parties at the same time and say digits after answering?
I mean like Originate ‘PJSIP/100&PJSIP/200’ to extension … and say digits.
Error: Unable to create PJSIP channel with empty endpoint name
You will have to call each endpoint individually.
To me it doesn’t make sense. If the call is answered by one party the other parties shouldn’t ring any more. Is there no way to do that?
I understood your question as being how to call multiple endpoints at the same time and have them all answer and play your message, is that not what you were asking?
If you dial two endpoints at the same time the first endpoint to answer gets the call, the second endpoint will stop ringing.
You are not currently calling an extension, and you don’t currently have a local channel.
With your revised requirement of only only one callee getting the message, you do use an extension, which you invoke with a local channel, and the extension uses the & notation, on Dial, to call multiple devices.
I don’t want to connect two (or multiple) parties to each other. The call shall be something like a notification, so if it’s answered the other dialled parties should get the ‘answered elsewhere’ message.
Unfortunately I cannot use the Originate app with multiple endpoints like
Originate(Channel=PJSIP/100&PJSIP/200,Context=notification,Exten=notify,Priority=1)
This works well:
Originate(Channel=PJSIP/100,Context=notification,Exten=notify,Priority=1)
What I tried:
Originate(Channel=Local/notification@notify,Context=notification,Exten=notify,Priority=1)
[notification]
exten => notify,1,Dial(PJSIP/100&PJSIP/200)
exten => notify,n,SayDigits(12345)
I know that I cannot work but it illustrates what I aim to do.
Use the local channel in place of the SIP device in the originate. The rest of the originate is the same.
Few people realize how importan and powerful are local channels specially when using Originate command