Andrew,

Instead of your SET and GOTO blocks I'd recommend using the Asterisk DB to
make things easier to maintain.

You could make two database entries for each of your DID's

database put 4259981810 name JohnPersonal
database put 4259981810 target kiniston-extern,john-personal,1

Then you could do a single block that would do the lookup and call routing:
Set(DESTINATION=${CUT(PASSTHRU(${SIP_HEADER(TO):5}),@,1)})
Set(CALLERID(name)=${DB(${DESTINATION}/name)})
Goto(${DB(${DESTINATION}/target)})


On Tue, Apr 7, 2015 at 6:06 PM, Andrew Galdes <[email protected]>
wrote:

> 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.
>
> Here is my "extensions.conf" file:
>
> exten => s,5,Set(callersname=${IF($[ ${pseudodid} =
> 081...]?Company1:${callersname})})
> exten => s,6,Set(callersname=${IF($[ ${pseudodid}
> = 082...]?Company2:${callersname})})
>
> exten => s,13,GotoIf($["${callersname}" = "Company1"]?internal,36,1:14);
> to reception
> exten => s,14,GotoIf($["${callersname}" = "Company2"]?internal,88,1:15);
> to department1
>
> And later in same file:
>
> ; Phone 36 reception
>> *exten => 36,1,Set(CALLERID(name)=${callersname})*
>> exten => 36,n,Dial(SIP/36,20)
>> exten => 36,n,VoiceMail(36,u)
>> exten => 36,n,Hangup
>
>
>
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to