Correct way to integrate custom dialplan (Adventure game) w/FreePBX IVR -and- as Extension?


#1

Part of my extensions_custom.conf file (the rest is “Lenny” stuff):

; IVR Adventure Game, extension 505/506
[from-internal-custom]
exten => *506,1,Goto(Adventure,505,1)

[Adventure]
; Includes for IVR Adventure Game, extension 505
include => ivr-game-entry
#include extensions-ivr-intro-end.conf       ; IVR Game - introduction menus and ending
#include extensions-ivr-game.conf            ; IVR Game - main dialplan script
#include extensions-ivr-room-desc.conf       ; IVR Game - room description contexts
#include extensions-ivr-obj-desc.conf        ; IVR Game - object description contexts
#include extensions-ivr-game-actions.conf    ; IVR Game - actions

Misc Destinations -> Adventure is the destination for an IVR, defined as “Adventure” and “*506”. I can’t directly call extension 505 or 506 as an extension (“Your call cannot be completed as dialed”) but everything works from the IVR. I defined 505/506 as Custom Extensions.

At some point I was able to dial 506 as an extension but it wouldn’t work in an IVR: I might have had it defined as a Custom Destination at that point (As I have with the “Lenny” code).

How can I get it working both as extension 505 -and- as the destination of an IVR? I’d like to get rid of the 506 extension too which I added just to try to get this working. The original game code didn’t have the code from the top through the [Adventure] tag in the listing above. Extension 505 is used throughout the game code.


(Jared Busch) #2

You want to create a Misc Application that points to it.
image


(Lorne Gaetz) #3

The reason you can’t dial 506 is because you have not defined a 506 extension in the from-internal context. You would need to dial *506. Jared’s suggestion to create a Custom Destination/Misc Application pair is the normal way to do this, but you say you want to be able to access this dialplan from an IVR, in which case the preferred way is with an Extension of type “custom”. You would create an extension with a custom dial string of local/505@Adventure. This new extension number is then dialable directly and from an IVR.


#4

Interesting: I had a “Custom Extensions” defined in FreePBX but got rid of that and made an Extensions->Custom instead. Works great. I also got rid of both the “Misc Destinations” entry and the top part of “extensions_custom.conf” where I defined the [from-internal-custom] extension 506. Now everything is simpler, I only have extension 505 defined for the Adventure game, plus I can now dial the extension -and- use it in an IVR. Thanks!


#5

Jared: Thanks for your answer. I may try that one later to see which solution works better / is simpler.


(K4n4lj3) #6

You can also just use

[ivr-1-custom]
exten => 1302,1,Goto(Example,10,1)

in extensions_custom.conf
If you enter 1302 in ivr-1 it jumps to Example,10,1…

(Watch out: ivr-1 is not the Name of the IVR… It is just the “first configured IVR” (Asterisk internal name))


(system) closed #7

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