Dialing pjsip contacts via REST API

Hey guys,

We have written a stasis app in nodejs using the ari-client which works really well on our asterisk platform (v16.5.1) which is also running realtime.

We have started receiving more requests to support multiple devices on individual endpoints and having a little trouble.

Inbound/outbound calls all work well outside of our stasis app, however when dialing a users extension (1 x phone, 1 x softphone) from the stasis app we end up with only the last device registered ringing.

Before we look at using the ps_contacts table to find the uri for the endpoint and start dialing the contacts listed there, is there a better way to do this?

We have tried originating to the local/123456 channel however this also didn’t work. Last registered rings only.


Using a Local channel does work, but it’s up to you to write the dialplan logic to do such a thing. If you don’t use PJSIP_DIAL_CONTACTS in the dialplan then it won’t dial multiple.

Thanks for confirming jcolp,

I thought you couldn’t use pjsip_dial_contacts unless the call was going through a dialplan natively, not whilst it was in stasis, using the dial application?

Either way we have written the logic to dial each contact/channel and manage it ourselves.

I was referring to the use of a Local channel. As that dials dialplan, it’s up to you to write the dialplan accordingly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.