Howard Lowndes wrote:

I have actually got a bit more cunning that this by using sipgetheader()
and sipaddheader().

The default user name is "asterisk", hard coded in chan_sip.c, so what I
did was to use sipgetheader() to get the From: header, then I cut() it
at the ":" character and the "@" character and checked the string
between these two characters.  If the string was "asterisk" then I did
sipaddheader(From: ${PIECE_BEFORE}:[EMAIL PROTECTED]).

OK, so it adds a second From: header, but as it gets added after the
original it doesn't seem to matter because it works and
"replacement-string" is what gets displayed on the phone, which is what
I want.  I also don't see that the tag= in the header makes any
difference either.

Can anyone see any probs I am likely to encounter using this?

Well if you like killing a fly with a with a tactical nuke, then no there's nothing wrong with how you are doing it. The rest of us just use the Caller*ID functions of Asterisk to accomplish it.
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to