DISA and Mobile Contact Center

I have a FreePBX/Asterisk 15 box that we have deployed mobile agents to:


  • Small call center using mobile phones
  • PJSIP extension with FMFM to their cell phone
  • The PJSIP extension and their mobile number are identical (cell = 555.555.5555 PJSIP = 555.555.5555)
  • Calls are routed to queue, then to the the PJSIP extension (then FMFM) and, it works fine.
  • We have to use PSTN for now, we cannot use any apps.

The Problem

  • Occasionally, members will use need to make an outbound call, We have them use a DISA for this to mask their caller ID.

  • When they use DISA to make the outbound call, their extension doesn’t change to INUSE and they will still be eligible for queue calls. This is a small call center, so they might be constantly ringing while on this outbound DISA calls. We don’t want them to log out to make outbound calls, because they will likely forget to log back in.


  • Does anyone have any clever ideas around this? Essentially I think what I need to do is update their hint every time them come in via DISA and eventually when they hang up. I know @lgaetz has posted some hook post that might be the right path, but what does everyone think?

Thanks in advance for any insights.

This could be s silly question. Why don’t they just call out? The caller ID can be set in many places without needing DISA.

Agents are calling from their personal or work cellphones via PSTN. These phones are not directly connected to Asterisk/FreePBX. When they call the customer, we want a uniform caller ID.

I think this is the approach I am going to take:

Basic flow:

  • Read the caller ID of the mobile agent calling the number for DISA
  • Activate the DND for the extension based on the incoming caller ID (mobile phone number matches extension)
  • Send the agent to the DISA app
  • Post call use the perform a custom action on hangup outlined by @lgaetz on their post the turns the DND off for that agent (We don’t use this box for anything else so this could be applied globally without issue)
    Hooking for fun and income


  • Does anyone know how to activate DND from the server side command line (feature code *78)?
  • I’ve not used the macros before:
    1. I know I would use the [macro-dialout-one-predial-hook] to call [cc-do-this-on-hangup]
    2. I am not sure what to call here to ensure the original calling DISA agent has their DND turned off (feature code *79) when they hang up the DISA call.
    3. Will the original agent caller ID be available, or do I need to define if as a unique channel variable (${OCID} so I can call it from the hangup_handler_push?

Any guidance?

Thanks All!

*78 does more than one thing. There is a CustomDevstate(s) that need to be updated so the hints/BLF will be updated plus you need to update the AstDB DND setting for this extension.

You don’t use Macro()'s anymore as app_macro is deprecated and no longer compiled by default. FreePBX does this for you. As well, app_macro will be removed from Asterisk in v21 so it will no longer be available. You should look into GoSub()'s for this.

Hangup handlers will do this for you.

On the DISA, you can specify your own context do do all the preprocessing before going to the destination. Much easier than using a hook.

Does anyone know how to activate DND from the server side

You don’t have to actually change the DND setting, just manipulate the hint used to track DND status. So at the start of the call you would determine the current setting of the hint by getting the current value of


Adding a hangup handler to restore that hint state at the end of the call
Temporarily set the hint to INUSE with


This is not perfect, but I suspect it will be good enough. Would like to see the finished product.

1 Like

This will indeed be good enough. I’ll report back the final implementation.

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