<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 => 975,1,ExecIf($[${DB_EXISTS(CFIM/0317998975)}]?Goto(${DB(CFIM/0317998975)},1)<br />exten => 975,2,Goto(set-caller-id,s,1)<br />exten => 975,3,Goto(975-${DEVICE_STATE(SIP/0317998975)},1)<br />exten => 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 => s,1,ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard<0702221448>))<br />exten => s,1,ExecIf($[${CALLERID(num)}=705886363]?Set(CALLERID(all)=Magnus Benngard<0705886363>))<br />exten => s,2,Goto(inputinterior.se,${CALLERID(dnid)},3)</span></p>
<p><span style="font-family: monospace;"><br /></span></p>
<p> </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 /> Something like...<br /> (???),ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard<0</span><span style="font-family: monospace;">702221448</span><span style="font-family: monospace;">>))<br /> (???),ExecIf($[${CALLERID(num)}=705886363]?Set(CALLERID(all)=Magnus Benngard<0705886363>))<br /> ...<br /><br />2) Standard dialing rules...<br /> 971,1,</span><span style="font-family: monospace;">Dial(SIP/0317998971)</span><br /><span style="font-family: monospace;"> 975,1,Dial(SIP/0317998975)<br /> ...<br /><br />I know hot to do it per extension...<br /> 971,1,</span><span style="font-family: monospace;">ExecIf($[${CALLERID(num)}=702221448]?Set(CALLERID(all)=Cecilia Benngard<0</span><span style="font-family: monospace;">702221448</span><span style="font-family: monospace;">>)</span><br /><span style="font-family: monospace;"> 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> </p></div>