[OpenSIPS-Users] Compare $fU to drouting prefix

Mark Farmer farmorg at gmail.com
Fri Apr 17 08:13:30 EST 2020


Hi Bogdan, I will try to explain better.

In rule_attrs I have a customer identifier which is used by acc to add the
identifier into the CDR database.
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.

Does that make sense?

Many thanks and regards
Mark.




On Thu, 16 Apr 2020 at 16:55, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> Hi Mark,
>
> 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 ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>
> On 4/16/20 6:14 PM, Mark Farmer wrote:
>
> Hi everyone
>
> 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.
>
> At the moment I am thinking I'll have to run a custom DB query so I have 2
> questions:
>
> 1. Is there a better way to do this?
> 2. If not, what is the best way to run custom DB queries?
>
> I have been reading through the drouting() documentation but that hasn't
> helped.
>
> OpenSIPS 2.4.7
>
> Many thanks!
> Mark.
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>

-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200417/ba6fc89c/attachment.html>


More information about the Users mailing list