Getting the DID number from a CallCentric SIP trunk for FreePBX

I’ve got a few DDI numbers from CallCentric all around the world (UK, US, Australia) and couldn’t figure our how to setup an ‘Inbound Route’ in FreePBX that used the number that had been dialled to route the call.

It turns out that you need to extract the number from the ‘SIP header’ information and there’s no setting in FreePBX to do this so it means hacking at the Asterisk config files just a little.

There are a few methods for doing this but these instructions should work for FreePBX/Asterisk –

When setting up your ‘SIP trunk’ in FreePBX under ‘PEER DETAILS’ you want to put the line –

“context=custom-get-did-from-sip”

then you need to edit the file /etc/asterisk/extensions_custom.conf and add the following lines –