[Kamailio-Users] call forward problem

Iñaki Baz Castillo ibc at aliax.net
Sat Sep 6 17:02:21 CEST 2008


El Viernes, 5 de Septiembre de 2008, muhammad akl escribió:

> what i understood to make such blind call forward feature in firstly i
> should use the function avp_db_load and load in the string AVP callfwd the
> value of the attribute callfwd which matched the requested user (i already
> know that $ru mean the sip request uri )
>
> now after loading the value i should push it to the new R-uri which has the
> "value field " in the usr_preferences column using
> avp_pushto("$ru","$avp(s:callfwd)")

You can do the same easier by doing:

  $ru = $avp(s:callfwd)


> so i want to ask now what is the equivalent pseudo-variable to the new
> R-uri ?

This question makes no sense. The new RURI is just $ru, that has been replaced 
in the above operation.


> i want to make somthing like that 
>
> if(avp_check("$avp(s:callfwd)", "eq/$ru/i"))
> avp_delete("$avp(s:callfwd)");
>
> btw i dont know what /i mean in the op_name but i saw some examples put it

i = case insensitive


> i tried with that sytanx but it didn;t work , as what i understood also
> that the attribute value is being loaded in ram so what i want to achieve
> is to check if the attribute callfwd are found in ram so delete it ,else
> establish the call in normal way

> i hope my words are clear and Understandable

Well, I'd suggest you using "xlog" to debug the varialbes and values you are 
using, before and after any of your operations. Add some "xlog" and paste the 
result.




-- 
Iñaki Baz Castillo




More information about the sr-users mailing list