Use the buffer length returned by the driver instead of trying to use strlen()
FreeTDM http://wiki.freeswitch.org/wiki/FreeTDM