AGI with Perl problem

Hi all,

Got myself a little problem and can’t for the life of me see what I need to do so I’ll have the question and hope a fresh pair of eyes will point me in the right direction.

Here we go. I have build myself an Asterisk server for my home, just for the fun of it. I’m connected to the POTS using an X100P / X101P card, the xaptel drivers have the UK caller ID patch installed.

I want to create a blacklist of callers I don’t want to receive. I’ve created a Perl script which will do this fine, it simply reads a text file and checks it against the callerid. Ths part works fine however I want to pass the result data back to the dialplan and use a gotoif statment to either send the call to a voicemail box or to allow the call to continue.

Any ideas on would help greatly.

Regards

Garry

if you’re using AGI, then you can set the context and priority that Asterisk continues at when you exit. it’s what i use for my blocklist script. if ($nothanks eq "true" ) { $priority = $priority + 1; $AGI->set_priority($priority); exit 0; } else { $priority = $priority + 101; $AGI->set_priority($priority); exit 0; } as an example of priority setting.

:smiley:

Many thanks. I’ll give it go and see where I get to.

Regards

Garry