[asterisk-dev] any difference between NULL and "" in struct?ast_callerid fields ?

Luigi Rizzo rizzo at icir.org
Fri Apr 21 07:02:15 MST 2006


On Fri, Apr 21, 2006 at 08:48:48AM -0500, Tilghman Lesher wrote:
> On Friday 21 April 2006 06:09, Julian Lyndon-Smith wrote:
> > FWIW, I would say that "<unknown>" is the best.
> 
> Actually, that should be "Unknown <>", since the number field
> should be empty.

We are talking about individual fields here (i.e. only name
or only number) which are sent through manager_event()
or astman_append() or agi_something().

Just for the record, the code in trunk as it is replaces both the
number and the name with the same string ("<unknown>" or "unknown"
or "" depending on the source file and the type of message
-- manager, agi, astman_append, log messages...).

The code in astman.js looks for "<unknown>"

If we are talking about the full callerid string (no idea
what is the canonical name for it, but it's something that
looks like
	"John Doe" <5551234>

then the code in callerid.c::ast_callerid_merge()
and another place that i now forget is also inconsistent
on how a string is built - if one of the component
(name or number) is missing, then the string is
produced without quotes or brackets.

	cheers
	luigi




More information about the asterisk-dev mailing list