[asterisk-users] Asterisk Inbound calls, multiple SIP accounts, calledID

John Kiniston johnkiniston at gmail.com
Wed Apr 8 12:02:30 CDT 2015


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 <andrew.galdes at agix.com.au>
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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150408/eaf2466b/attachment.html>


More information about the asterisk-users mailing list