Your very close..<div><br></div><div>look, your regex shows ^67.+ (starts with 67)</div><div><br></div><div>BUT your string does NOT start with 67. it starts with sip:67 (ie: "si" != "67") so it just doesn't match.</div>
<div><br></div><div>Also, I wouldn't use the $var vars here.. instead try:</div><div> dp_translate("1", "$ruri.user/$ruri.user")</div><div><br></div><div>THEN your shown regex will work ($ruri.user is just the dialed number, does not contain the sip:)</div>
<div>-Brett</div><div><br><div class="gmail_quote">On Tue, Oct 13, 2009 at 3:05 AM, Indiver <span dir="ltr"><<a href="mailto:nehru.indu@gmail.com">nehru.indu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
HI Everyone,<br>
<br>
I want to implement the dialplan module. But i was confused little bit in<br>
the configuration part. my database table of dialplan module is<br>
<br>
+----+------+----+----------+-----------+-----------+-----------+------------------+-------+<br>
| id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp<br>
| attrs |<br>
+----+------+----+----------+-----------+-----------+-----------+------------------+-------+<br>
| 1 | 1 | 1 | 1 | (^67.+) | 0 | (^67.+) | [hidden<br>
email] | |<br>
+----+------+----+----------+-----------+-----------+-----------+------------------+-------+<br>
<br>
and my opensips.cfg configuration is:<br>
<br>
modparam("dialplan", "db_url",<br>
"mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>
route[14]<br>
{<br>
$var(x) = "sip:678";<br>
dp_translate("1", "$var(x)/$var(tmp)");<br>
xlog("-------------$var(tmp)\n");<br>
}.<br>
<br>
My actual intention is when the client dials the number 678... a prefix 1<br>
should add to that numbers. Is the above configuration correct for my<br>
architecture?.<br>
<br>
Thanks,<br>
Nehru.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Dialplan-module-not-working-tp3814747p3814747.html" target="_blank">http://n2.nabble.com/Dialplan-module-not-working-tp3814747p3814747.html</a><br>
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</font></blockquote></div><br></div>