Iconv function module for the Asterisk PBX

©2007 Sven Slezak <sunny at mezzo.net>

Iconv is an Asterisk function for character conversion.
If you retrieve text from an external data source it might
be necesarry to convert the source characters into a different
character set.

The syntax for Iconv in extensions.conf/extensions.ael is as follows:

Iconv(source-charset|destination-charset|TEXT)

Example:

My handset does not support UTF-8 so I have to convert the CIDNAME into ISO-8859-1.
exten => 1234,2,Set(CIDNAME=${Iconv(UTF-8|ISO-8859-1|${CIDNAME})})
exten => 1234,3,SetCIDName(${CIDNAME}) 

to list the character sets supported by your iconv library type

>iconv -l
on your shell prompt

Compile:

You need the iconv library and header file included in glibc-headers rpm;
and Asterisk of course.
Download (see below) and unpack the package:
tar -xzf func_iconv-release.tgz
In the func_iconv directory:
make install
Restart Asterisk or load the application module with:
load func_iconv.so
done!
show application Iconv
should print the description.

Changes and Download:

Mac version included in Asterisk PBX for Mac OS X
2.0rc1 - new version for Asterisk 1.4

	 \ | /
	- :-) -
	 / | \