Hello,<br><br>AVPs are multi-value variables, so:<br><br>$avp(x) = 1;<br>$avp(x) = 2;<br><br>Create a list with two values, the last added is first retrieved. You can use indexes to access them.<br><br>For example:<br>- $avp(x) will return now 2 (same as $(avp(x)[0]) )<br>
- $(avp(x)[1]) will return 1<br><br>You can use variable as index:<br><br>$var(i) = 0;<br><br>then: $(avp(x)[$var(i)]))<br><br>To go through the list, you can use while(...) { ... } statement with an variable for index that increments in each step.<br>
<br>When there is no value for avp at that index, then the returned value is $null, e.g.,<br><br>while($(avp(x)[$var(i)]) != $null) {<br>   ...<br>   $var(i) = $var(i) + 1;<br>}<br><br>Cheers,<br>Daniel<br><br><div class="gmail_quote">
On Wed, Mar 9, 2011 at 2:07 PM, Geoffrey Mina <span dir="ltr">&lt;<a href="mailto:geoffreymina@gmail.com">geoffreymina@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p>There is nothing wrong with the carriers, so I wouldn&#39;t want to mark them.  Just no route to destination type scenario.</p>
<p>I like daniels option with the drop on_branch.  Only challenge I have is keeping a list of all the flags I have already tried.  Say I have five carrier groups and I set the flags in gw to 1 2 3 4 or 5 respectivley.  How could I use an AVP to efficiently keep a running list and then check against that list?</p>


<p>Thanks!</p><div><div></div><div class="h5">
<div class="gmail_quote">On Mar 8, 2011 9:02 PM, &quot;Juha Heinanen&quot; &lt;<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>&gt; wrote:<br type="attribution">&gt; Daniel-Constantin Mierla writes:<br>&gt; <br>
&gt;&gt; &gt; The issue I am running into is that in a scenario where<br>
&gt;&gt; &gt; both my carriers respond with a 5XX, I end up presenting the same call to<br>&gt;&gt; &gt; all 4 gateways.  I would like to present the call to one gateway on each<br>&gt;&gt; &gt; carrier and not try the same carriers second gateway for the same<br>

&gt;&gt; &gt; call.<br>&gt; <br>&gt; currently only lcr rule can be a stopper rule, i.e., if it matches,<br>&gt; other matching rules are not tried.<br>&gt; <br>&gt; you can disable a failing gateway for some number of seconds, which<br>

&gt; should reduce unsuccessful attempts.<br>&gt; <br>&gt; -- juha<br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Daniel-Constantin Mierla<br>  <a href="http://www.asipto.com">http://www.asipto.com</a><br>