I am setting up my dialplan with quite some outbound numbers. We have a block of 100 DID&#39;s, for which some of them will go direct to specific phones. I am struggling how to solve this, so I am searching for a little advice. These are my concerns.<div>
<br></div><div>I could set the DID in the sip.conf using something like:</div><div><br></div><div>callerid=&quot;137-Roland&quot; &lt;31229253137&gt;</div><div><br></div><div>137 would be my extention number here.</div><div>
<br></div><div>I think the downside of this is, that I should configure this for each SIP account. I could specify a default callerid, which our main DID, in a template, but then people will see this general ID when I call internal extentions as well. This way the receiver cannot see my extention number.</div>
<div><br></div><div>Other solution would be to specify my DID in the dailplan. I tried this solution, which works:</div><div><br></div><div><div>exten =&gt; _00Z.,1,NoOp(Call Received from ${CALLERID(num)} to ${EXTEN:1})</div>
<div>exten =&gt; _00Z./Jeroen_S,2,Set(CALLERID(num)=31229700210)</div><div>exten =&gt; _00Z./Roland_odA,2,Set(CALLERID(num)=31852013900)</div><div>exten =&gt; _00Z./Schoolshopper,2,Set(CALLERID(num)=31852013900)</div><div>
exten =&gt; _00Z.,2,Set(CALLERID(num)=31229700203)</div><div>  same =&gt; n,GotoIf($[${CALLERID(num)}=31852013900]?otconnect:voys)</div><div>  same =&gt; n(otconnect),Set(OUT=999210485)</div><div>  same =&gt; n,Goto(dodial)</div>
<div>  same =&gt; n(voys),Set(OUT=143810001)</div><div>  same =&gt; n(dodial),Dial(SIP/${EXTEN:1}@${OUT})</div></div><div><br></div><div>Upside is that I can be more specific in routing. The same handset could have different DID&#39;s, but I think usually the DID is bound to a SIP account. So I would probably create a second SIP account if a user needs an extra DID anyways.</div>
<div><br></div><div>The downside in my opinion is that my Dialplan will be filled with around 30 extra lines with account specific stuff. I would rather keep my dialplan code clean. Also when I would have more patterns that can be matched, I have to specify them for this pattern as well. That would already take around 60 lines of extra code.</div>
<div><br></div><div>I have considered an AGI call to fetch the data from a database. But wouldn&#39;t this be a higher risk? When the database fails or is too slow, it will not work? I would rather use mysql than the asterisk db, because i can manage mysql easy with phpmyadmin.</div>
<div><br></div><div>Any suggestions would  be appreciated! Am I missing any options here?</div>