[Users] Insert name into from header of SIP messages

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Oct 28 21:51:57 CEST 2005


On 10/28/05 22:21, Brandon Price wrote:
> We are storing cnam (callerid name) values in a mysql database for use 
> with openser. I have openser  pulling the values from the database 
> using avpops but I need to know how to insert the value into the from 
> so that it will be passed to my sip user agents. Related code posed below
>
> modparam("avpops","db_scheme","cnam_scheme:username_col=phonenumber;table=cnam_cache;value_col=cnam;value_type=string") 
>
> modparam("avpops", "avp_aliases", "cnam=s:cnam")
>
> avp_db_load("$from/cnam_scheme","cnam/$cnam_scheme"); #sample query -- 
> select cnam from cnam_cache where phonenumber='13143212222'
>
> this should now store that value in $cnam.
> now how do I put that value for example "John Smith" in the from 
> portion of sip messaging so that it displays on the users sip phone, 
> or phone attached to an ata?
See the uac module, it seems to be what you are looking for:
http://openser.org/docs/modules/1.0.x/uac.html
http://openser.org/docs/modules/1.0.x/uac.html#AEN108

Cheers,
Daniel





More information about the Users mailing list