<div dir="ltr"><div><div><div>Andrew,<br><br></div>Instead of your SET and GOTO blocks I'd recommend using the Asterisk DB to make things easier to maintain.<br><br>You could make two database entries for each of your DID's<br><br>database put 4259981810 name JohnPersonal<br></div><div>database put 4259981810 target kiniston-extern,john-personal,1<br><br></div><div>Then you could do a single block that would do the lookup and call routing:<br></div><div>Set(DESTINATION=${CUT(PASSTHRU(${SIP_HEADER(TO):5}),@,1)})<br>Set(CALLERID(name)=${DB(${DESTINATION}/name)})<br>Goto(${DB(${DESTINATION}/target)})<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 6:06 PM, Andrew Galdes <span dir="ltr"><<a href="mailto:andrew.galdes@agix.com.au" target="_blank">andrew.galdes@agix.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Solved it, kinda. It's not cute. I'm sure this is the way NOT to do it but it does work. For prosperity, the SIP service is through Internode. </div><div><br></div><div>Here is my "extensions.conf" file:<br><span class=""><br></span>exten => s,5,Set(callersname=${IF($[ ${pseudodid} = 081...]?Company1:${callersname})})<br>exten => s,6,Set(callersname=${IF($[ ${pseudodid} = 082...]?Company2:${callersname})})<br><br></div><div>exten => s,13,GotoIf($["${callersname}" = "Company1"]?internal,36,1:14); to reception<br>exten => s,14,GotoIf($["${callersname}" = "Company2"]?internal,88,1:15); to department1<br><br>And later in same file:</div><div><br></div><div>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>; Phone 36 reception</span><span><br></span><span><b>exten => 36,1,Set(CALLERID(name)=${callersname})</b><br></span><span>exten => 36,n,Dial(SIP/36,20)<br></span><span>exten => 36,n,VoiceMail(36,u)<br></span><span>exten => 36,n,Hangup</span></blockquote><br></div></div></blockquote></div><br></div></div>