Re: [SR-Users] Contacts in 302

2017-11-03 Thread John Petrini
If you're trying to modify the contact on your branch I believe you need to do that in a branch route. For example in branch_route[EVAPIRESPONSE] you could modify the contact header and. Just make sure to set the branch route in route[EVAPIRESPONSE]. Then instead of using a var you could use an av

Re: [SR-Users] Contacts in 302

2017-11-03 Thread Diego Nadares
Hi john, thanks for your answer. I'm using this in route[EVAPIRESPONSE] because of async request with evapi. I tried what you said too with no success. #$var(first) = 0; #while ($var(i) < $var(contacts_len)){ # jansson_get("contacts[$var(i)]

Re: [SR-Users] Contacts in 302

2017-11-02 Thread John Petrini
remove_hf('Contact') and then append_hf($var(contact)) should work. What was the problem you were having? Were you using it in a branch route? John John Petrini | Platforms Engineer jpetr...@coredial.com 215.297.440 <215-297-4400>0 751 Arbor Way, Hillcrest I, Suite 150 Blue Bell, PA 19422 ww

Re: [SR-Users] Contacts in 302

2017-11-02 Thread Diego Nadares
Hi again, I found a work around . Modifying $ru changes de first contact uri. if($var(routing)=~"redirect"){ jansson_get("contacts_len", "$var(evmsg)", "$var(contacts_len)"); xlog("L_INFO", "Contacts len $var(contacts_len)"); $var(i) = 0;

[SR-Users] Contacts in 302

2017-11-02 Thread Diego Nadares
Hi Guys, I'm generating a 302 reply from kamailio. In this 302 I append new branches with new contacts. if($var(routing)=~"redirect"){ jansson_get("contacts_len", "$var(evmsg)", "$var(contacts_len)"); xlog("L_INFO", "Contacts len $var(contacts_len)");