[asterisk-dev] [svn-commits] oej: trunk r89531 - /trunk/include/asterisk/channel.h

Russell Bryant russell at digium.com
Sat Nov 24 13:25:57 CST 2007


SVN commits to the Digium repositories wrote:
> Author: oej
> Date: Fri Nov 23 03:40:02 2007
> New Revision: 89531
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=89531
> Log:
> Let's start with implementing the base architecture for UTF8 caller ID's
> so we can handle multiple formats properly. This is not carved in stone,
> but a proposal to start with.
> 
> We need to add support for transliterations as well as UTF8 handling,
> propably with libiconv. Murf is looking into that for the dialplan.

Why don't we do this in a branch until this is a bit more complete?  I don't
like the idea of throwing these new fields in trunk without having any code that
uses them yet.

> 
> Modified:
>     trunk/include/asterisk/channel.h
> 
> Modified: trunk/include/asterisk/channel.h
> URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=89531&r1=89530&r2=89531
> ==============================================================================
> --- trunk/include/asterisk/channel.h (original)
> +++ trunk/include/asterisk/channel.h Fri Nov 23 03:40:02 2007
> @@ -203,13 +203,29 @@
>   * \note All string fields here are malloc'ed, so they need to be
>   * freed when the structure is deleted.
>   * Also, NULL and "" must be considered equivalent.
> + * 
> + * SIP and IAX2 has utf8 encoded Unicode caller ID names.
> + * In some cases, we also have an alternative (RPID) E.164 number that can be used
> + * as caller ID on numeric E.164 phone networks (zaptel or SIP/IAX2 to pstn gateway).
> +
> + * SIP and IAX2 will prefer the cid_utf8 if it exists, otherwise use the cid_name.
> + * \todo Implement this in chan_sip.c and chan_iax2.c
> + *
> + * \todo Implement settings for transliteration between UTF8 caller ID names in
> + *       to Ascii Caller ID's (Zaptel). Östen Åsklund might be transliterated into
> + *	 Osten Asklund or Oesten Aasklund depending upon language and person...
> + *	 We need automatic routines for incoming calls and static settings for
> + * 	 our own accounts.
>   */
>  struct ast_callerid {
>  	char *cid_dnid;		/*!< Malloc'd Dialed Number Identifier */
>  	char *cid_num;		/*!< Malloc'd Caller Number */
> -	char *cid_name;		/*!< Malloc'd Caller Name */
> +	char *cid_name;		/*!< Malloc'd Caller Name (ASCII) */
>  	char *cid_ani;		/*!< Malloc'd ANI */
>  	char *cid_rdnis;	/*!< Malloc'd RDNIS */
> +	char *cid_utf8;		/*!< Malloc'd Caller ID name in utf8 */
> +	char *cid_domain;	/*!< Malloc'd Caller ID domain (ascii. IDN supported) */
> +	char *cid_e164;		/*!< Malloc'd Alternative Caller ID E.164 (alternative to SIP/IAX2 utf8 uri, RPID) */
>  	int cid_pres;		/*!< Callerid presentation/screening */
>  	int cid_ani2;		/*!< Callerid ANI 2 (Info digits) */
>  	int cid_ton;		/*!< Callerid Type of Number */


-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.



More information about the asterisk-dev mailing list