Where should I tap into the dialplan to look up additional info for the picked up extension?

Not sure how to ask this concisely, as the subject line attests. :->

I have some zap lines coming in and some Aastra 57i phones. What I would like is the ability to take the caller-id info and look up some additional information to display on the phones screen AFTER the call is picked up and only on the phone that picked up the call.

Is this accessible from FreePBX, or will I have to go diving into the dialplan. If it’s a dialplan job, which is what my gut says, then could some enlightened individual assist me on where to start looking?

I mainly need the cid info and the attached extension handed out to a script outside of asterisk to make this happen.

Thanks for your time!

Should I add a [ext-local-custom] section to extensions_custom.conf? Will that call the script at the right point in time to allow me to know both the answering extension and the callerid info?

I’m playing with this:

exten => 101,1,AGI(ali.php|101|CALLERID(num))
exten => 102,1,AGI(ali.php|102|CALLERID(num))

Am I on the right track?

That didn’t seem to work. Anyone have any other ideas?


Does anyone see a problem with appending a few lines of code to kick off an AGI from the [macro-auto-blkvm] context?

I’m planning on putting that into the extensions_override_freepbx.conf. Is this an appropriate approach?

Thanks, all.