In what file i have to put agi call?

i want to put :smile:
exten => s,n,AGI(DIPControlLlamadas2.agi)

i put in extensions_customs.conf

[ivr-1-custom]
exten => s,n,AGI(DIPControlLlamadas2.agi)
don´t works

becuse i see
include => ivr-1-custom

in [ivr-1]
into (extensions_additional.conf).

what’s wrong ? where i have to put the call?
thanks a lot.

If you wanna make a custom extension you have to add in the extensions_custom.conf, but first you need to add the context: [from-internal-custom]

Ex.:
[from-internal-custom]
exten => 1000,1,Answer()
same => n,NoOp(This is a test)
same => n,HangUp

Not sure if that is what you’re looking for.

extension s is for when nothing matches try using _X.

thanks
i just only want to call an script wich creates issues for every incoming call into a JIRA system
my doubt is in wich file and how i have to put the call
actually in an older tribox is working placed in extensions_additonal.conf :
[ivr-16]

exten => s,n,GotoIf($["${CDR(disposition)}" = “ANSWERED”]?begin)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,AGI(DIPControlLlamadas2.agi)

but i have to rewrite every time i do some change and aplly it

In the new freepbx we have in extesions_additional.conf:

[ivr-1] ; DIARIO NORMAL
include => ivr-1-custom
include => from-did-direct-ivr
exten => s,1,Set(TIMEOUT_LOOPCOUNT=0)

perhaps i’m wrong but i believe that if i put the call into extensions_customs.conf under the key

[ivr-1-custom]
exten => s,n,AGI(DIPControlLlamadas2.agi)

must be the same to put
exten => s,n,AGI(DIPControlLlamadas2.agi) directly in extensiosn_aditional.conf

(I try it and works but have to write every time i apply any change)

i will try _X. also
but actually s is working in additonal.conf

If I understood you correctly, you want to execute the script when a call arrives at the IVR, right?

The way I would do it, it’s send the “Inbound Call” to a custom extension where it would execute the script and then forward the call to the IVR.

extension_custom.conf
exten => 1000,1,Answer()
same => n,GotoIf($["${CDR(disposition)}" = “ANSWERED”]?begin)
same => n,AGI(DIPControlLlamadas2.agi)
same => n,Goto(from-did-direct-ivr,s,1)

Something like that.

Inbound -> Custom Extension -> IVR

Don’t forget to register your extension in the “Admin” > “Custom Extensions”.

Rodrigo’s code will get you half way there, but it won’t work as written. You don’t want to use a Custom Extension, you need to use a Custom Destination.

  1. Add a block of code to extensions_custom.conf that looks similar to this:

    [agi-trigger]
    exten => s,1,noop(entering context [agi-trigger] in extensions_custom.conf)
    exten => s,n,AGI(DIPControlLlamadas2.agi)
    exten => s,n,Return

  2. In FreePBX, Admin, Custom Destinations, create a new Custom Destination that references the code block above like:

    agi-trigger,s,1

    Select the return option, and choose the desired destination (IVR or whatever)

  3. Now instead of sending callers to the IVR, send them to the newly created custom destination. This will execute your AGI then send them to the IVR.

2 Likes

I didn’t know “Custom destinations”.
Very useful.

Thanks for sharing.

1 Like

thanks a lot it works

1 Like

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