AstLinux

AstLinux Add-Ons



 

CNAM-fix Asterisk AGI:

The CNAM-fix AGI examines the CNAM (name) portion of the Caller*ID and looks for HTML Entities, a string of special characters like & and substitutes them with a single ASCII character. Even though this is about as simple as asterisk AGI's can be, I decided to publish it. Even if you don't use it as is, the bash script can be easily modified.

I have a SIP provider that offers CNAM, but occasionally I would get garbage characters on my phone's display. Problem solved.

Download:

Download last updated on: Monday, Apr 21 20:17 UTC 2008
Untar's into current (./) directory: cnam-fix.agi.tar.gz
install via "tar xzvf cnam-fix.agi.tar.gz -C /var/lib/asterisk/agi-bin/"

The cnam-fix.agi file should have "chmod 755" permissions.
View the source as text: cnam-fix.agi.txt

Asterisk extensions.conf:

Accessing this AGI from your extensions.conf dialplan is quite simple. Find a spot in the flow of an incomming call and place in this single line of code:

exten => s,n,AGI(cnam-fix.agi)

At that point, if the name portion of your Caller*ID contained an HTML Entity it would be replaced with a single ASCII character.