[OpenSIPS-Users] DialPlan Module Nested dp_translate

pavel@eremina.net eremina.net at gmail.com
Wed May 2 07:23:29 CEST 2012


I can't understand what for you need to set a Attribute?

pseudo code:
dp_translate("0","$ruri/$ruri")

(in dialplan table present rule with dpid=1, match_reg_exp=1415.*)
if (dp_translate("1","$riru/$var(smth)") { $var(myvar) = '415'; do_anything; }



2012/5/2 Jamuel Starkey <jamuel at hcvoip.com>:
> Hi,
>
> I'm using OpenSIPs v1.7.2 and trying to come up with a way to nest dialplan dp_translate.  I'd like to match against a fairly broad regex and do a replacement and then match the resulting replacement with a narrower regex this time just set an attribute (no replacement).  I don't see how this could be done.  Is there a way to emulate this in the routing block instead?
>
> Pseudo code:
>
> $avp(dpid)=0;
> dp_translate("$avp(dpid)", "$ruri.user/$ruri.user");
>
> Broad match:
> Matching Regular Expression: ^\+1.*
> Substitution Regular Expression: ^\+(1.*)
> Replacement Expression: \1
> Attribute: <Don't Care>
>
> Narrower Match 1:
> Matching Regular Expression: 1415.*
> Attribute: 415
>
> Narrower Match 2:
> Matching Regular Expression: 1800.*
> Attribute: 800
>
> Any help would be greatly appreciated.
>
>
> Cheers,
>
> JPS
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list