Execute a command before dialing


I have a misdn channel defined as a custom trunk.

It works ok, but after some time the line is going down. I have to execute misdn_check_l2l1 before the dial command.

Where can I put this command?

There is any place where I can continue using freepbx interface without problems? and without have to change the custom file every time I change my outbound routes?


Maybe you could add:


to your extensions_custom.conf and put your code under it. It would run the code each time you dialed an outside number if you did that.

It might look like:


exten => _X.,1,executeYourCodeHere

Once this is done executing your code it will fall to the normal outbound-allroutes