Need help regarding simple AGI script

Hello Everybody,

I am new to AGI scripting. I need to create a simple script that will get caller id when a call comes and redirect the call to a particular extension. Can anyone let me know how to achieve this? What language should I use for this purpose?

Thanks.

I think I already answered a more complex version of this question. The answer is that you do not need AGI for this. Google “ex-girl friend logic” for details, now that the the database requirement has gone, but it is still a very trivial bit of Asterisk dialplan coding with the database requirement.

(Where you do use AGI, the choice of language is mainly based on what you already know.)

potentially you could use a GotoIf(CallerID(num)=‘XXXXXXXX’ … and then send to another context directly from the dialplan as as David said above.