I&#39;m able to make generic dialplan but don&#39;t know how to make subscriber based dialplan. Here is my generic dialplan sample config file and dialplan table;<div><br></div><div>----</div><div><br></div><div><div>loadmodule &quot;avpops.so&quot;</div>
<div>loadmodule &quot;dialplan.so&quot;</div><div><br></div><div><div>#------ avpops params -----</div><div>modparam(&quot;avpops&quot;, &quot;db_url&quot;, &quot;mysql://openser:openserrw@localhost/kamailio&quot;)</div><div>
modparam(&quot;avpops&quot;, &quot;avp_table&quot;, &quot;usr_preferences&quot;)</div><div>#------ load the dpid field to a pseudo-variable $avp(s:dpid) ------</div><div>### modparam(&quot;auth_db&quot;, &quot;load_credentials&quot;, &quot;$avp(s:rpid)=rpid ;$avp(s:countrycode)=contrycode;$avp(s:areacode)=areacode&quot;)</div>
<div><br></div><div>modparam(&quot;dialplan&quot;, &quot;db_url&quot;,&quot;mysql://openser:openserrw@localhost/kamailio&quot;)</div><div>## attribute of the matched line will be store in the $avp(s:dest)</div><div>modparam(&quot;dialplan&quot;, &quot;attrs_pvar&quot;, &quot;$avp(s:dest)&quot;)</div>
</div><div><br></div><div><div>if(!dp_translate(&quot;0&quot;,&quot;$rU/$rU&quot;)){</div><div>send_reply(&quot;420&quot;, &quot;Invalid Destination&quot;);</div><div>exit;</div><div>}</div><div>xlog(&quot;$avp(s:dest)&quot;);</div>
<div>if ($avp(s:dest)==&quot;pstn&quot;) {</div><div>#route to pstn</div><div>prefix(&quot;+90454&quot;);</div><div>enum_query();</div><div>$ru = &quot;sip:&quot; + $rU + &quot;@&quot; + $sel(cfg_get.pstn.gw_ip);</div><div>
route(RELAY);</div><div>}</div></div><div><br></div><div>----</div><div><br></div><div><div># kamctl db show dialplan</div><div>database engine &#39;MYSQL&#39; loaded</div><div>Control engine &#39;FIFO&#39; loaded</div><div>
+----+------+----+----------+------------------+-----------+--------------------+----------+-------+</div><div>| id | dpid | pr | match_op | match_exp        | match_len | subst_exp          | repl_exp | attrs |</div><div>
+----+------+----+----------+------------------+-----------+--------------------+----------+-------+</div><div>|  1 |    0 |  1 |        1 | ^[2-9][0-9]{6}.* |         0 | (^[2-9][0-9]{6}).* | 90212\1   | pstn  |</div><div>
+----+------+----+----------+------------------+-----------+--------------------+----------+-------+</div></div><div><br><br><div class="gmail_quote">2012/1/31 Bayram Karagoz <span dir="ltr">&lt;<a href="mailto:karagoz.bayram@gmail.com">karagoz.bayram@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>I&#39;m trying to make when each subscriber dials 7 digits add subscriber based specific prefix to dialed number defined in subscriber or dialplan table. I know that it&#39;s possible with avp but I&#39;m not professional about avp. could you send me a successful scenario and config example please? </div>


</blockquote></div><br><br clear="all"><div><br></div>-- <br><b>Bayram KARAGOZ</b><br>System Administrator<br><br><a href="mailto:bayram@bayramkaragoz.org" target="_blank">bayram@bayramkaragoz.org</a><br><br><a href="http://www.bayramkaragoz.org" target="_blank">www.bayramkaragoz.org</a><br>
<br>
</div></div>