<div style="font-family:Arial;font-size:14px"><p><span style="font-family: monospace;">Did found a way to do it:</span></p>
<p><span style="font-family: monospace;">exten =&gt; 975,1,ExecIf($[${DB_EXISTS(CFIM/0317998975)}]?Goto(${DB(CFIM/0317998975)},1)<br />exten =&gt; 975,2,Goto(set-caller-id,s,1)<br />exten =&gt; 975,3,Goto(975-${DEVICE_STATE(SIP/0317998975)},1)<br />exten =&gt; 975-INUSE,1,VoiceMail(0317998975@inputinterior.se,bs)</span></p>
<p><span style="font-family: monospace;">......</span></p>
<p><span style="font-family: monospace;">[set-caller-id]<br />;<br />exten =&gt; s,1,ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard&lt;0702221448&gt;))<br />exten =&gt; s,1,ExecIf($[${CALLERID(num)}=705886363]?Set(CALLERID(all)=Magnus Benngard&lt;0705886363&gt;))<br />exten =&gt; s,2,Goto(inputinterior.se,${CALLERID(dnid)},3)</span></p>
<p><span style="font-family: monospace;"><br /></span></p>
<p>&nbsp;</p>
<blockquote style="border-left: 2px solid #1010ff; padding-left: 5px; margin-left: 5px; width: 100%;">
<div style="font-family:Arial;font-size:14px">
<div style="font-family: Arial; font-size: 14px;"><span style="font-family: monospace;">Hi!<br /><br />I am trying to figure out how to rewrite calling number for all extensions.<br />What I am trying to do is:<br /><br />1) Have a "block" of rewriting rules that will apply to all calls:<br />&nbsp;&nbsp; Something like...<br />&nbsp;&nbsp; (???),ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard&lt;0</span><span style="font-family: monospace;">702221448</span><span style="font-family: monospace;">&gt;))<br />&nbsp;&nbsp; (???),ExecIf($[${CALLERID(num)}=705886363]?Set(CALLERID(all)=Magnus Benngard&lt;0705886363&gt;))<br />&nbsp;&nbsp;&nbsp; ...<br /><br />2) Standard dialing rules...<br />&nbsp;&nbsp; 971,1,</span><span style="font-family: monospace;">Dial(SIP/0317998971)</span><br /><span style="font-family: monospace;">&nbsp;&nbsp; 975,1,Dial(SIP/0317998975)<br />&nbsp;&nbsp; ...<br /><br />I know hot to do it per extension...<br />&nbsp;&nbsp; 971,1,</span><span style="font-family: monospace;">ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard&lt;0</span><span style="font-family: monospace;">702221448</span><span style="font-family: monospace;">&gt;)</span><br /><span style="font-family: monospace;">&nbsp;&nbsp; 971,2,</span><span style="font-family: monospace;">Dial(SIP/0317998971)</span><br /><span style="font-family: monospace;"><br />But there must be a better way to do it, or?<br /></span></div>
</div>
</blockquote>
<p>&nbsp;</p></div>