On Tue, Oct 24, 2006 at 03:45:01PM -0700, lawrence k.y. lin wrote:
Hi all,
Appreciate if someone can give me a suggestion or even an answer.
Since the call from SIP device to PSTN phone did not have Caller ID and
our Telco carriers request for the Caller ID, we have to set a number
before the calls are routed to PSTN gateway.
I did it in Asterisk before with the function calls SetCallerID(CLID) or
Set(CALLERID(number)=CLID) (depends on the Asterisk version) and these
function calls worked. But because of the scalabliity issue, I changed to
SER and would like to do the similar thing as in Asterisk.
I read the SER document and awared SIP_HF_FROM has the data for the
entired FROM field. Is there any other variables for Caller ID only ?
I searched the mailing list for SER and did not find any related topic
(only found one with title: caller-id with raius using sip-rpid, but it is
irrelevant).
There is a function called uac_replace_from which
can replace values in the From header, however I
would need some help with it myself.
For example, towards one of my SIP "peers", I need
to prefix a "0" on all From headers which is no
problem, just do a
uac_replace_from("0$fU","sip:0$fU@$fd");
$fU is the from user part and $fd is the from
domain...
But how do I do if I first want to strip a few
characters of from $fU and then add a few others?
Regards,
Kristian.
--
Kristian Larsson KLL-RIPE
Network Engineer Net At Once [AS35706]
email: kristian(a)netatonce.se irc: kll@ircnet
phone: +46 470 592717 cell: +46 704 910401