No subject


Sun Jul 19 19:54:31 CDT 2009


from-spec = ( name-addr / addr-spec ) *( SEMI from-param )
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
display-name   =  *(token LWS)/ quoted-string
addr-spec =  SIP-URI / SIPS-URI / absoluteURI

For my purposes I would need one of these From headers:

(1) From: sip:0123456789 at server <-- no display name
(2) From: <sip:0123456789 at server> <-- empty display name
(3) From: "" <sip:0123456789 at server> <-- empty display name


I've tested option (2) on the Avaya IP500 and it fixes so name matching
works: the phone book does what it's supposed to.

I chose option (2) over (1) and (3) because:
(1) Might cause incompatibilities with bad SIP parsers.
(3) Is overly explicit that the name is empty when we actually mean
    that the name is not set.



The supplied patches do just this:
* Allow CALLERID(name) to be empty.
* If CALLERID(name) is empty, send the From-header as (2).


Caveats:
The only drawback I see is that some people that expect the display-name
to be automatically set to CALLERID(num) would be disappointed. This is
usually fixed by a simple dialplan change though.


Regards,
Walter Doekes
OSSO B.V.
====================================================================== 

---------------------------------------------------------------------- 
 (0127339) wdoekes (reporter) - 2010-09-23 13:31
 https://issues.asterisk.org/view.php?id=17451#c127339 
---------------------------------------------------------------------- 
There's a bug in both patches: when pedanticsipchecking is on, n is not
expected to be NULL. You'll need a if (!ast_strlen_zero(n)) {} around
ast_uri_encode(n, tmp_n, sizeof(tmp_n), 0); and n = tmp_n; 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-23 13:31 wdoekes        Note Added: 0127339                          
======================================================================




More information about the asterisk-bugs mailing list