Routing calls to AGI script

liquidfire
Posts: 2
Member Since:
2008-05-05

Good morning,

I am trying to figure out how to route an incoming call to an AGI script.

My question is. Where in the conf files do i need to call the AGI script. I have looked through them but can't figure out exactly where it needs to go.

I can make and recieve IAX2 calls through a softphone. I just want the inbound number that rings to extention 6000 to instead go straight to an AGI script.

Thanks for your help.

Cheers

Jay



ddwyer
Posts: 221
Member Since:
2006-06-03
AGI in Dialplan

add in [extenions_custom]
exten => 6000,1,Answer
exten => 6000,n,AGI(my_agi_script.php|arg1|arg2|arg3)
exten => 6000,n,Hangup

you can pass variables to your script like CID or DTMF anyhow here is a link to some god documentation http://www.voip-info.org/wiki-Asterisk+AGI



liquidfire
Posts: 2
Member Since:
2008-05-05
Thanks for your reply.Thats

Thanks for your reply.

Thats what i was working on, but do i need to create a specific context in the extensions_custom. Do i need to link the context anywhere. I know it sounds simple but these conf files get confusing when you integrate a gui.

Thanks for your help.

here is what my conf file looks like

extensions-custom

; This file contains example extensions_custom.conf entries.
; extensions_custom.conf should be used to include customizations
; to AMP's Asterisk dialplan.

; All custom context should contain the string 'custom' in it's name

; Extensions in AMP have access to the 'from-internal' context.
; The context 'from-internal-custom' is included in 'from-internal' by default

#include extensions_hud.conf

[from-internal-custom]

;1234,1,Playback(demo-congrats) ; extensions can dial 1234
;1234,2,Hangup()
;h,1,Hangup()
;include => custom-recordme ; extensions can also dial 5678

; custom-count2four,s,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-count2four]
;s,1,SayDigits(1234)
;s,2,Hangup

; custom-recordme,5678,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-recordme]
;exten => 5678,1,Wait(2)
;exten => 5678,2,Record(/tmp/asterisk-recording:gsm)
;exten => 5678,3,Wait(2)
;exten => 5678,4,Playback(/tmp/asterisk-recording)
;exten => 5678,5,Wait(2)
;exten => 5678,6,Hangup

[custom-meetme3]
exten => s,1,Answer
exten => s,n,Wait(3)
exten => s,n,CBMysql()
exten => s,n,Hangup



Comment viewing options

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