How to cut an Outbound Call

Hi guys!

I need to know how can i cut a dialed number when the patterns matchs.

From the book “Asterisk the Definitive Guide 3rd Edition”:

Here is and example:

When I call 9-555-555512345

in an dial pattern created by my i can do this:

exten => _9555.,1,Dial(dahdi/g0/${EXTEN:1:7)

Here i call over dahdi to the number 555-5555 and the last numbers (can be one or twenty) are deleted and never go to the trunk.

I can’t find any way to get this working over the trunk or outbound route.

Any help will be aprecciated.

Best regards.