Help with custom extensions for FreePBX / Asterisk

Hello!

I’m trying to find a robust way to use the PITCH_SHIFT feature of Asterisk, in combination with FreePBX. I’ve have a setup of Asterisk and FreePBX fully running, and would like to be able to use the PITCH_SHIFT feature on demand.

Right now, I have the following line in /etc/asterisk/extensions_custom.conf:

exten => _[*#0-9]!,1,Set(PITCH_SHIFT(rx)=2)

This works like a charm, for any number, by using the _[*#0-9]! . However, I would like to find a way to trigger the PITCH_SHIFT on demand, not in a static way.

For example: prepending a phone number with *123*, and then dial a normal number, which will activate the PITCH_SHIFT.

Is something like this possible by maybe using a dial pattern which catches this and strips it off and goes ahead and dials a number? I could then change the extension line to something like *123*! .

Also, I have all recording options on Forced, for both the extension I’m using, but also the routes. However, when the above PITCH_SHIFT function is active, calls aren’t being recorded anymore. Is there a solution to this?

BTW: I’m using freepbx/Asterisk as a hobby project. So fiddling around with settings like these are fully possible for me.

Thanks in advance!

KR,
Fairlynuts

You can define a feature code prefix with dialplan of this format:

[from-internal-custom]
exten => _**22XX!,1,NoOp(Entering custom defined context from-internal-custom in extensions_custom.conf)
exten => _**22XX!,n,Set(PITCH_SHIFT(rx)=2)
exten => _**22XX!,n,Goto(from-internal,${EXTEN:4},1) ; strip prefix and proceed to from-internal

You’re now on the slippery slope to Completelynuts. Once you start writing your own dialplan the fun never stops.

4 Likes

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