[asterisk-users] Stripping characters from ${CALLERID(num)} ?

Steve Edwards asterisk.org at sedwards.com
Thu Jul 7 16:10:48 CDT 2011


On Thu, 7 Jul 2011, Tim Nelson wrote:

> In fact, I've noticed many of your posts are Asterisk 1.2.x and AGI/C 
> oriented which is very unique.

I confess. I'm a 1.2 Luddite.

> I know a little C, but would likely start out using PHPAGI as it's more 
> familiar to me. I know, not as efficient, but a stepping stone.

Fortunately, C is my sharpest tool.

The problem with scripting languages is that you can execute hundreds of 
AGIs written in C in the time it takes the interpreter to load and parse 
your script.

Another problem is that scripting languages don't complain about syntax 
errors until they are executed. If you mung an infrequently executed 
section of code, you may not find the error for a long time. The C 
compiler finds most of my fat-fingered accidents for me.

You can go the 'fastagi' route and write 'scripted daemons' to handle your 
agi tasks, but then you are introducing a new level of complexity and new 
failure points.

> I'm currently running some database code in dialplan and its *NASTY*. If 
> anything, DB access would be the incentive for me to dive into AGI.

I confess I've never done any DB code in dialplan beyond a simple select. 
I've looked at what others have done and the hoops they have to crawl 
through to achieve an inferior solution and decided I should stick to what 
I know.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list