[Users] Insert name into from header of SIP messages -- trouble with uac_replace_from

Norman Brandinger norm at goes.com
Mon Oct 31 22:17:07 CET 2005


Are you using the most recent CVS version of OpenSER ?  I experienced a 
similar problem that was corrected.

I just tried checked and confirmed that the function: 
uac_replace_from("",""); does not cause a problem with OpenSER 
initialization using today's CVS version.

Regards,
Norm

Brandon Price wrote:
> I am having some trouble with the uac_replace_from module. If I use...
> uac_replace_from("","");
> which should strip the display and leave the the uri alone openser 
> fails to start leaving
> "Oct 31 15:41:57 ser1 /usr/local/sbin/openser[8273]: 
> ERROR:uac:fixup_replace_from2: both parameter are empty " in 
> /var/log/messages. 
>
> If I use something like this...
> uac_replace_from("Superman",""); which should leave the uri alone and 
> write the Display name
> I get a from uri with Superman in the Display name (as it should be) 
> and nothing in the sip from address just From: "Superman" <>;tag=xxxxxx.
> Any help greatly appreciated. 
>
>
>
> On Oct 29, 2005, at 9:51 AM, Daniel-Constantin Mierla wrote:
>
>>
>>
>> On 10/29/05 02:21, Brandon Price wrote:
>>
>>> Following that logic should I not be able to just replace the 
>>> display and leave the uri as is with...
>>> uac_replace_from("$avp(s:cnam)","");
>>>
>> did you get some log messages? use xlog("cnam value 
>> [$avp(s:cnam)]\n") to see if there is a value for the avp in memory.
>>
>> Cheers,
>> Daniel
>>
>>>
>>> I have of coarse already trid that with no success.
>>>
>>> On Oct 28, 2005, at 3:38 PM, Norman Brandinger wrote:
>>>
>>>
>>>> If you break your callerid into 2 parts, you should be able to use 
>>>> something like the following:
>>>>
>>>> AVP display: "John Doe"
>>>> AVP uri: "sip:18005551212 at example.com <mailto:18005551212 at example.com>"
>>>>
>>>> uac_replace_from("$avp(s:display)","$avp(s:uri)");
>>>>
>>>> The above information has been documented at 
>>>> http://www.openser.org/docs/modules/1.0.x/uac.html
>>>>
>>>> Regards,
>>>> Norm
>>>>
>>>> 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?
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at openser.org <mailto:Users at openser.org>
>>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org <mailto:Users at openser.org>
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list