engin switchboard – Knowing which number was called

Using engin I was having trouble as all incoming calls from switchboard numbers were appearing on my primary number.

This was annoying as I wanted more control in the inbound routes of trixbox. The following extensioins_custom.conf contect worked for me.

include => ext-did
exten => _X.,1,SIPGetHeader(Var_TO=To)
exten => _X.,n,Goto(ext-did,switch${Var_TO:5:10},1)

As you can see, the SIP header contains a TO header which can be looked at. I simply add a Custom app inbound route for the main number like “custom-from-engin,${EXTEN},1” and using the above context, it re-routes the call back to the inbound contect (ext-did) with thenumber called with a “switch” prefix.

Then its just a simple matter of adding inbound routes like
switch0297990000 and making them do as you like.

One Reply to “engin switchboard – Knowing which number was called”

  1. Hi Kevin,

    I modified your suggestion here a little bit so that the DID works as per a normal DID with the DID number defined in the users’s extension.

    exten => s,n,SIPGetHeader(Var_TO=To)
    exten => s,n,Goto(ext-did,${Var_TO:5:10},1)

Comments are closed.