[Serusers] Re: How to change Caller ID in FROM field ?
Kristian Larsson
kristian at netatonce.se
Wed Oct 25 13:11:06 CEST 2006
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 at netatonce.se irc: kll at ircnet
phone: +46 470 592717 cell: +46 704 910401
More information about the sr-users
mailing list