Are you trying to do loop detection? If so, how about Max-Forwards? > On Dec 23, 2024, at 8:38 am, Benoit Panizzon via sr-users > <[email protected]> wrote: > > Hi > > https://www.kamailio.org/wikidocs/cookbooks/5.7.x/pseudovariables/#selname-selects > https://www.kamailio.org/wikidocs/cookbooks/5.7.x/selects/#viaihost > > I'm trying to list all via hosts: > > $var(dooh) = @via[1].host; > xlog("L_INFO","******** VIA HOST 1: $var(dooh) \n"); > > This above works as expected I get the 2nd entry. > > $var(i) = 0; > while ($var(i) < $hflc(Via)) { > $var(dooh) = @via[$var(i)].host; > xlog("L_INFO","******** VIA HOST: $var(dooh) \n"); > $var(i) = $var(i) + 1; > } > > This fails with syntax error. > > How do I specify the index of the via header I want to extract the host > from? > > I also attempted $sel(via[$var(i)].host) or via[$var(i)] or > $sel(hfl(via[$var(i)])).host but I found no variant not throwing an > error. > > PS: Is there maybe another nice function to figure out if we have > already seen (and how many times we have) this same message? > > Mit freundlichen Grüssen > > -Benoît Panizzon- > -- > I m p r o W a r e A G - Leiter Commerce Kunden > ______________________________________________________ > > Zurlindenstrasse 29 Tel +41 61 826 93 00 > CH-4133 Pratteln Fax +41 61 826 93 01 > Schweiz Web http://www.imp.ch > ______________________________________________________ > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- > [email protected] > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply only to the > sender!
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800 __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
