[asterisk-dev] Unicode in Text frames - how to fix?

Tim Panton tim at mexuar.com
Mon Apr 30 02:28:53 MST 2007

Asterisk's handling of text frames does not support unicode.

We discovered this by accident, our Java IAX stack sends IAX text  
frames in
unicode (ascii is deprecated in Java) without a terminating '\0' byte.
The IAX draft rfc (link) says that text frames should be in unicode.
Asterisk however requires (but doesn't test for) a '\0' byte as the  
'C' end of string marker, and determines the length of the text  
string with

Although we found it in the case of IAX text frames it looks like
this is a general problem.

At first glance it looks easy to fix, just add a lenght attribute to  
the text frame.
However this would change the channel api, so isn't to be done lightly.

Other options would be:
	1) change the IAX rfc to state that text frames are null terminated  
ascii and reject
any packets that aren't. (I.e. drop unicode)
	2) carry the unicode by encoding it in some way (like in html) and  
mandate this.
	3) ??? ideas ????

Tim Panton


More information about the asterisk-dev mailing list