<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hey Mark,<br>
<br>
It is not nice, but you can do:<br>
<br>
$var(tmp) = $rU;<br>
$rU = $fU<br>
do_routing();<br>
$rU = </tt><tt><tt>$var(tmp);<br>
<br>
Regards,<br>
</tt></tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
</pre>
<div class="moz-cite-prefix">On 4/17/20 11:13 AM, Mark Farmer wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOvQDevshDMXsJSpBR+gbnFCrbA8B28troWOAcz14htKDC=jiQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Bogdan, I will try to explain better.
<div><br>
</div>
<div>In rule_attrs I have a customer identifier which is used by
acc to add the identifier into the CDR database.</div>
<div>This works fine for calls from PSTN which are routed to
another SIP gateway but calls from that gateway routed to PSTN
can come from multiple customers and there is no way to
identify which. So I'd like to match the incoming $fU to the
rule that would match $rU in the from PSTN scenario in order
to retrieve the rule_attrs (the customer identifier) from that
rule.</div>
<div><br>
</div>
<div>Does that make sense?</div>
<div><br>
</div>
<div>Many thanks and regards</div>
<div>Mark.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 16 Apr 2020 at 16:55,
Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> <tt>Hi Mark,<br>
<br>
What kind of matching you want to do between $fU and the
dr prefixes ? You want to do the same as what drouting()
does with $rU ?<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
</pre>
<div>On 4/16/20 6:14 PM, Mark Farmer wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi everyone
<div><br>
</div>
<div>I am looking for a way to compare $fU in INVITE to
the matching drouting() prefix of another group and
retrieve the rule_attrs from that rule.</div>
<div><br>
</div>
<div>At the moment I am thinking I'll have to run a
custom DB query so I have 2 questions:</div>
<div><br>
</div>
<div>1. Is there a better way to do this?</div>
<div>2. If not, what is the best way to run custom DB
queries?</div>
<div><br>
</div>
<div>I have been reading through the drouting()
documentation but that hasn't helped.</div>
<div><br>
</div>
<div>OpenSIPS 2.4.7</div>
<div><br>
</div>
<div>Many thanks!</div>
<div>Mark.</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">Mark Farmer<br>
<a href="mailto:farmorg@gmail.com" target="_blank"
moz-do-not-send="true">farmorg@gmail.com</a></div>
</blockquote>
<br>
</body>
</html>