Running agi application

snh
Posts: 28
Member Since:
2009-03-18

Hello everyone

I am trying to run an agi application which comes with Asterisk. I inserted the following dial plan in “extensions-custom.conf” file:

[custom-snhagi]
exten => 300,1,Answer
exten => 300,n,AGI(agi-test.agi)
exten => 300,n,Hangup

My newbie question is how do I invoke this dial plan? I created an extension 300 and placed it in a ring group. When extension 300 is answered I receive silence then prompt from voice mail for unanswered call.

Thanks



b14ck
Posts: 773
Member Since:
2009-03-03
Hi there, what you will want

Hi there, what you will want to do is rename your context to:

[from-pstn-custom]
exten => 300,1,Answer()
exten => 300,n,AGI(agi-test.agi)
exten => 300,n,Hangup()

The from-pstn-custom context will be hit whenever incoming calls come into your server from a pstn trunk. If you want to test internally (so you can pick up your phone and dial 300 to run the code, simply do:)

[from-internal-custom]
exten => 300,1,Answer()
exten => 300,n,AGI(agi-test.agi)
exten => 300,n,Hangup()
--

Randall Degges
Lead Developer, RCI Telecommunications
projectb14ck - http://projectb14ck.org/ - Weblog



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.