Most efficient way to Dial a late-SIP joiner in the dialplan

Hi all,

I was looking for the most efficient way to Dial late-registering SIP endpoints on the PJSIP channel.

I was assuming to use RetryDial for this, however this has following problems:

  • It does not start calling when no PJSIP destination endpoint is registered at the moment the call starts.
  • The PJSIP_DIAL_CONTACTS application only returns the list of currently registered devices. Devices that join 2-5 sec later are hence not being called

exten => phone,n,RetryDial(priv-trying, 1, 45, ${PJSIP_DIAL_CONTACTS(${EXTEN})})

How can I achieve that Asterisk keeps trying to dial all PJSIP AoR’s, even those who REGISTER af few seconds later ?

Thanks in advance for the insights/hints.

You can’t. At the point the call is already in progress and you can’t add new contacts to it.

You’d have to do what Queue does (or use Queue) and timeout and abandon the call, then re-ring with an updated list. I’m not sure if Queue flags the cancel as not being a missed call, but I imagine doing it with Dial will generate missed calls on those which were early arrivers but went unanswered.

Thanks for the answers.
I will have a look what I can do with queues, however what I want to avoid is that (mobile) phones that start ringing suddenly stop (due to SIP CANCEL) and restart again after a while.

And additional problem is that the number of AoR’s that register with the SIP account is dynamic, depending on the phone’s reachability.

So at one time PJSIP_DIAL_CONTACTS might contain only one endpoint, but later that day it might contain up to 10 destinations.

What others do is use a Local channel specifically for dialing a mobile device, that waits a fixed amount of time or has logic via an outside source that awaits registration of an endpoint. Having separate AORs/endpoints helps with that.

Thanks everyone.

I’ve created a separate local channel for the mobile devices that polls for incoming devices.
Wired devices get called immediately in the other local channel.

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