How to limit lenght of certain calls?

Is there a way I can limit the lenght of certain calls? I need to cut off calls to mobile phones longer than 13 minutes. In Asterisk you can use TIMEOUT(absolute) or the Dial option L to limit the max time of the call but I do not see how to add this to the FreePBX configuration. Any ideas?

You will have to produce some custom code to make it happen.

I think the biggest issue will be determining what makes a call to a cell number. Here in the US there are many exchanges that have cell numbers in each area code with no specific pattern to them from one area code to the next. If you are in a country where there is a defined pattern then it will probably be easier.

Take a look at the following macros in extensions.conf (BUT do not change them there or they will get overwritten).

If you want to change them you will need to create a file called:
and put the updated macro in that file.

In Mexico it is quite easy to determine because you have to dial 044 before the number. It could also be applied to a trunk because we use GSM adapters to make all mobile calls. For this case I guess it would be easier to apply it to an outgoing rule.