[Users] Manipulate Refer To

Steve Blair blairs at isc.upenn.edu
Mon Mar 19 14:06:46 CET 2007


Sam:

I haven't rewritten the Refer-To header but you would do it the same way 
you rewrite any other header. For example try:

if ( search("^(Reply-To): (.*)<sip:\+1(.*)@(.*)") ) {
xlog("L_INFO", "\n[SER]: [$Tf] [$ci] Change Reply-To header From: <$fu> 
\n");
subst('/^Reply-To: (.*)<sip:\+1(.*)@(.*)>(.*)$/Reply-To:\1<sip:\2@\3>\4/i');
}

Of course this is *only* and example. I doubt this code will do anything 
useful but you get the idea.

-Steve

Sam Lee wrote:
> Ha, seems like no way to do it from the OPENSER instead..
> I was hoping to do it in the server instead of adding routes to the
> gateway. 
>
> -----Original Message-----
> From: Klaus Darilion [mailto:klaus.mailinglists at pernau.at] 
> Sent: Monday, March 19, 2007 3:37 PM
> To: Sam Lee
> Cc: users at openser.org
> Subject: Re: [Users] Manipulate Refer To
>
> Solution 1:
> Rewrite the number in the Refer-To Header to match the dialing plan (the
> routes) of the gateway
>
> Solution 2:
> Configure the gateway another route to be able to route to the number in
> the Refer-To header.
>
> regards
> klaus
>
> Sam Lee wrote:
>   
>> Hey guys,
>>
>> Appreciate some advise.
>> The originating gateway does not have a route to the Refer-To number ,
>>     
>
>   
>> so if it takes the Refer message, it will end in a 'no route to 
>> destination'.
>> Is there anyway to work around (get it to send refer to a different 
>> gateway and patch them together?) ?
>>
>> Regards,
>> Sam
>>
>> -----Original Message-----
>> From: Klaus Darilion [mailto:klaus.mailinglists at pernau.at]
>> Sent: Thursday, March 15, 2007 5:43 PM
>> To: Sam Lee
>> Cc: users at openser.org
>> Subject: Re: [Users] Manipulate Refer To
>>
>> Sam Lee wrote:
>>     
>>> Hey guys,
>>>  
>>> How do you manipulate the 'Refer to' header in the REFER Method ?
>>>       
>> 1. copy the header content into an AVP.
>> 2. rewrite the avp
>> 3. remove the Refer-To header (textops module) 4. add a new Refer-To 
>> header (textops module)
>>
>> regards
>> klaus
>>
>>     
>>>  
>>> I need to do some string manipulation to change it to something that 
>>> i
>>>       
>>> want.
>>>  
>>> Thanks ahead! 
>>>  
>>> Regards,
>>> Sam
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> --
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>       
>> --
>> Klaus Darilion
>> nic.at
>>
>>     
>
>
> --
> Klaus Darilion
> nic.at
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list