[OpenSIPS-Users] DialPlan Module Nested dp_translate

Jamuel Starkey jamuel at hcvoip.com
Wed May 2 06:38:01 CEST 2012


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





More information about the Users mailing list