[Serusers] avpops question

olivier.taylor olivier.taylor at gmail.com
Thu Mar 23 15:29:24 CET 2006


Hi Steve,

first of all, thanks for a so fast answer :)

The problem is the result I get,
after the avp_write, I use avp_pushto to create a new header (to be used 
for the billing).

        avp_write("$from/username", "$ocn");
        avp_pushto("$X-From", "$ocn");

and I get :
        X-From: 69
as header, I 'dlike to have
        X-From: 45454558

Olivier


Steve Blair a écrit :
>
>
> olivier.taylor wrote:
>
>> hi all,
>>
>> Using ser 0.94
>> I have a sip message coming from an asterisk containing : From: 
>> "45454558" <sip:69 at toto.com>;tag=as2524cec1.
>> I need to extract the 45454558 and add it in a new header.
>
> Did you try something like:
>
> modparam("avpops", "avp_aliases","ocn=i:701")
> avp_write("$from/username", "$ocn");
>
> Then use $ocn as an alias whereever you need to reference this username.
>
> -Steve
>
>>
>> I there a way to do that with avpops?
>>
>> I tried avp_write("$from", "s:from"); and get sip:69 at toto.com
>> also avp_write("$from/username", "s:from"); and get 69
>>
>> is there another way?
>>
>> Cheers,
>>
>> Olivier
>>
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers at lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>
>




More information about the sr-users mailing list