"Follow Me" with special busy-handling

Hi @all

Would like to extend the follow me funktion to be able to make routing decisions based on the extension-status.

Someone calls am busy extension(123456) should hear ->playback: busy an “hungup” after a few seconds.

Someone calls this extension which gets in state “No Answert” should be routet to an other extension. (in my case 30)

A the moment i can only mak eon decision based on “Destionation if no answer”.

Can someone gie me an example how could extend this with a custom context?

Greetings Mysterious

it’s not quite what you are looking for, but you can look at VmX which you can enable/disable based on extension state.

Thanks for that hint. May i could extend the vmX locator to autmatically choose the destination based on the extension-status?

Would be nice if you could give me an sample where and how i could write a custom extension to match with the “busy” status.

If you avoid the use of the GUI on the given extension and look at the structure of the AMPUSER database object for the given extension, it is possible to have different menu choices based on the extension state, but it still requires the user to choose an option of it to go to that destination which does not sound like what you are wanting.

Otherwise, you will need to write yourself a custom bit of dialplan that you use as your Follow-Me destination which sends you off somewhere based on the extension state which is pulled from the DIALSTATUS channel variable. Feel free to submit a feature request for follow-me that sends the call two different destinations based on the DIALSTATUS status for future consideration.

Okay, made my first steps to create an sampe extension called 79 and included it into extensions_custom.conf like this:

include => custom_test

exten => 79,1,NoOp(${DIALSTATUS})
exten => 79,n,Goto(custom-s-${DIALSTATUS},1)

exten =>  custom-s-BUSY,1,Answer()
exten =>  custom-s-BUSY,n,Playback(whatever)
exten =>  custom-s-BUSY,n,Hangup()

Ok its verry basically to test if it would work. I can call this extension from internal now but if i add this extension to the followme list as last extension to ring it fails. I think i made some basic mistakes why this could not work? What would i have to add getting this extension basically working from the followme funktion? Would the DIALSTATUS funktion work if i us it like described above?
This are my really first basic steps with freepbx extension programming :slight_smile:

Thanks for your help.

With the latest versions of FreePBX (2.4 and 2.5) when you create a custom extension like this you need to register it with the system or the system does not know about it and can’t tell other parts of FreePBX about it. if you don’t register the extension it will not work as it thinks that extension does not exist (yes you can still dial it directly but that is about it).

To register the extension go into admin interface, select the tools interface, the select custom extensions so it knows that a extension of that number exists.