[OpenSER-Users] using remove_hf and append_hf in both route and failure route

Mik Cheez michael_bulk at wildgate.com
Fri Jun 22 19:09:22 CEST 2007


Worked beautifully...thank you!

Bogdan-Andrei Iancu wrote:
> Hi Mik,
> 
> what you added in main route (Request_Route) cannot be removed at all. 
> So, the idea is not to add there any hdr that you might want to remove 
> later.
> 
> If you want to add temporary, use the branch route because the changes 
> you do there are per-branch.
> 
> regards,
> bogdan
> 
> Mik Cheez wrote:
>> I use remove_hf and append_hf to modify the RPID in the Request_Route, 
>> which works fine, but then if I try it in Failure_Route I end up with 
>> two RPID headers.
>>
>> Is it possible the revert_uri() is doing something to it?  If not, can 
>> you just not do a remove/append like this?  I checked to make sure the 
>> remove_hf is returning true.  I triple checked to make sure my 
>> variable contains only one header.
>>
>> Here are some snippets from my config:
>>
>> route {
>> ...
>> ...
>>  if (method=="INVITE") {
>>   perl_exec("command", "0");  /*sets rpid and ouri vars*/
>>   if (is_avp_set("$avp(rpid)")){
>>     if(is_present_hf("Remote-Party-ID")){
>>         remove_hf("Remote-Party-ID");
>>     }
>>     append_hf("$avp(rpid)");
>>   }
>>   avp_pushto("$ru","$avp(ouri)");
>> ...
>> ...
>> failure_route[1]{
>>   if(method == "INVITE" ....blah blah blah
>>    revert_uri();
>>    perl_exec("command", "1"); /*sets rpid and ouri vars*/
>>
>>    if (is_avp_set("$avp(rpid)")){
>>     if(is_present_hf("Remote-Party-ID")){
>>         remove_hf("Remote-Party-ID");
>>     }
>>     append_hf("$avp(rpid)");
>>    }
>>    avp_pushto("$ru","$avp(ouri)");
>> ...
>> ...
>>
>> Best regards,
>>
>> Mik Cheez
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>
> 
> 
> 





More information about the Users mailing list