some details:

remove_hf delete all Diversion header, how can I delete or rewrite good header ?

Le 03/05/2013 10:48, Mickael HUBERT a écrit :
Hi,
I have coded with while for treat all diversion headers.

Ex:
....
/while ($var(i) < $(hdrcnt(Diversion)))//
//{//
//if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) || !$(hdr(Diversion)[$var(i)]{param.value,privacy}) || !$(hdr(Diversion)[$var(i)]{param.value,reason}))//
//    {//
//        ..../

after all these treatments, I can not replace the good diversion header, if I have multiple diversion.

Ex:
If I have:

/Diversion: <sip:******@hexanet.fr>; reason="user-busy"; privacy="full" ;counter=3//
//Diversion: <sip:******@hexanet.fr>; reason="user-busy"; privacy="off"/

and if I use:
remove_hf("Diversion"), to rewrite the second diversion header. Opensips delete the first diversion header.

How can I rewrite the good diversion header, here the second ?

thanks

Le 02/05/2013 19:21, Saúl Ibarra Corretgé a écrit :
On May 2, 2013, at 4:20 PM, Mickael HUBERT wrote:

Thank you very much, it's perfect ;)

but, if I have many Diversion header in the same INVITE ? This command works ?

You can index the call to hdr(Diversion), IIRC there is an example in the 
transformations page showing how to iterate through a list of headers with the 
same name.

--
Saúl Ibarra Corretgé
AG Projects




_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to