dave69s
(Dave69s)
November 24, 2015, 12:47pm
1
I’m creating a new IVR that needs to retrieve data from a web service. I’m trying to use a Custom Destination and then creating a context in extensions_custom.conf which will call my agi script. I’ve named my Custom Destination Main-IVR, and created my entry in extensions_custom.conf, but I get a Gosub address is invalid: 'Main-IVR(). For now, I have test code just to see if I can reach my Custom Destination and playback some digits.
The custom destination code in extensions_additional.conf
[customdests]
exten => dest-1,1,Noop(Entering Custom Destination Main-IVR)
exten => dest-1,n,Gosub(Main-IVR())
exten => dest-1,n,Noop(Returned from Custom Destination Main-IVR)
exten => dest-1,n,Goto(app-announcement-1,s,1)
The extensions_customer.conf code
[Main-IVR]
exten => s,1,SayDigits(8675309)
Any advice on what my issue is would be greatly appreciated!! I’m running version 12 right now (need to upgrade!)
dave69s
(Dave69s)
November 24, 2015, 12:48pm
2
Mistyped question … should have said extensions_custom.conf, not extensions_customer.conf.
lgaetz
(Lorne Gaetz)
November 24, 2015, 12:54pm
3
If you read the tooltip for the Custom Destination you will see that the field is expected to be formatted exactly as you would for a goto/gosub application, which is “context, exten, priority”. In your case it would be:
Main-IVR,s,1
If you are using a Gosub, then you will need to ensure there is a return statement added to your user defined context.
dave69s
(Dave69s)
November 24, 2015, 1:30pm
4
Thank you! I should have paid closer attention to that.
I’m still getting the following and can’t seem to find the issue …
Attempt to reach a non-existent destination for Gosub(Context:Main-IVR, Extension: s, Priority:1)
extensions_custom.conf looks like this now … it’s the only thing in the extension_custom.conf file.
[Main-IVR]
exten => s,1,SayDigits(8675309)
exten => s,n, Return()
lgaetz
(Lorne Gaetz)
November 24, 2015, 1:46pm
5
I gave you the exact string you need for the custom dest.
dave69s
(Dave69s)
November 24, 2015, 7:06pm
6
Yes, you did. And that’s exactly what is in my custom destination under Admin/Customer Destinations. However, the error I am getting is
“Attempt to reach a non-existent destination for Gosub(Context:Main-IVR, Extension: s, Priority:1)”
Maybe I am misunderstanding you.
dave69s
(Dave69s)
November 24, 2015, 7:11pm
7
To clarify, this is the error in the CLI when I make my test call and it attempts to go to the custom destination.
dicko
(dicko)
November 24, 2015, 7:17pm
8
lgaetz
(Lorne Gaetz)
November 24, 2015, 8:02pm
9
At the asterisk CLI what is the output from:
dialplan show Main-IVR
dialplan show customdests
dave69s
(Dave69s)
November 24, 2015, 8:24pm
10
Thank you! Lorne … here it is.
dialplan show Main-IVR
[ Context 'Main-IVR' created by 'pbx_config' ]
's' => 1. SayDigits(8675309) [pbx_config]
2. Return() [pbx_config]
-= 1 extension (2 priorities) in 1 context. =-
dialplan show customdests
[ Context 'customdests' created by 'pbx_config' ]
'dest-1' => 1. Noop(Entering Custom Destination Main-IVR) [pbx_config]
2. Gosub(Main-IVR, s, 1()) [pbx_config]
3. Noop(Returned from Custom Destination Main-IVR) [pbx_config]
4. Goto(app-announcement-1,s,1) [pbx_config]
-= 1 extension (4 priorities) in 1 context. =-
lgaetz
(Lorne Gaetz)
November 24, 2015, 9:08pm
11
The stray spaces in the gosub string are at fault. Never saw that one before.
dave69s
(Dave69s)
November 24, 2015, 9:23pm
12
That did it! Thanks so much for your help!! I’ll be more aware of my syntax and spaces moving forward.
1 Like