ARI Create Channel - PJSIP Multi Endpoints

I want to create an outbound call via ARI, and this works fine if my PJSIP Endpoint is only registered on one device.
But when i use multiple Endpoints only one of them rings.

eg:
Extension PJSIP:4@192.168.0.150 is registered on my Softphone and my Hardphone

POST Request: pbx.lan:8088/ari/channels
endpoint: PJSIP/4
extension: numberIWantToCall

When i execute this only one of my two registered ends ring.

How can i call all registered Endpoints?

There is no easy mechanism from ARI to do this. The quickest is probably to create some dialplan logic that accepts an endpoint name and then uses Dial with the PJSIP_DIAL_CONTACTS dialplan function. You can then use a Local channel in ARI and call all registered contacts.

I could solve my problem now by replacing PJSIP/4 with local/4
this way all endpoints ring.

(I´m not very experienced with Asterisk, so i don´t know if my solution only works because i use FreePBX with asterisk)

Hello Joshua,

this issue is related to your ticket https://issues.asterisk.org/jira/browse/ASTERISK-25283

Do you think you could push that up. Looks like it’s a wanted missing feature in ARI.

Thanks !!!
Ricardo

I’ve already pushed it up for Sangoma, but that doesn’t mean it will be worked on anytime soon.

Thanks Joshua !!

Meanwhile we’ve found a way to use it inside ARI. I’m leaving it here as a reference.

  • First we get the AOR uris, like ricardo@10.10.10.10:5080 and ricardo@20.20.20.20:5080
  • Then we format it as PJSIP/ricardo/sip:ricardo@10.10.10.10:5080
  • Then you can originate as many channels as contacts using that string
1 Like

If I understand what you are asking, I do this:

context all_phones {
    all => {
        Dial(PJSIP/foo&PJSIP/bar,30,tw);
        Hangup();
    }
}

and then my single endpoint that I can use to ring foo and bar is Local/all@all_phones.

Not sure how correct this all is. Happy to take suggestions if it can be improved.