Non Geographic DID's in UK

new to telephony and freepbx, so i am sure this will be an easy one to answer

Asterisk (Ver.

i have 4 anlogues lines all with the same number say 123456789
i have a non geographic number 0845 9876543 that terminates on the same line as 123456789

is there anyway that i can get a handle on the number that has been dialled as i will route the calls differently if i can get handle on it



Take a look at outbound route settings.

Hi SkyKingOK, it is actually IB calls that i am looking at.

i.e. if my customer calls 08459876543, this comes through on the phone line 123456789, but what i would like to happen is that if an IB call comes in, to find out if my customer called 123456789 or 08459876543 as i will divert these calls to different teams.

note both these numbers will come through on the same physical phoneline



I don’t think you will be able to do that, your non-geographic mnumber is just forwarded to the analog hunt group.

Are sure they all have the same number? that would be a novelty. :wink:

Best thing to do is change to Sip trunks, then yow will get DID information. Gradwell are particularly good for UK geographic and non geographic numbers.

Actually the information graeme is looking for is the DNIS. which is not the same as DID nor CallerID. It is usually available with ISDN and possibly available from some SIP providers. It is never available on a POTS line.

There is a case where the DNIS is passed to the analog in the form of inband DTMF tones while the caller hears ringback.

One use, is so you can use an external Voicemail server on analog station ports on your PBX and be able to signal it with the destination voicemail boxes based off the DNIS from the CAS/PRI/BRI/SIP Trunk. (I would never expect dialed number information from an analog line from a telco)

Another use for inband DTMF signalling of the DNIS is to route it to a fax mailbox on a fax server attached by analog(s) to your PBX analog station ports. Similar in function to the voice mail server example above.

Many digital PBX’es Ive seen over the years do this inband DTMF signalling for this reason.

Here is an example of how to get FreePBX/Asterisk to do it:

exten => 6195551212,1,Dial(Local/[email protected],D(www${CALLERID(dnid)})r)

602 is a ring group that hunts through 8 analogs which are really 8 extensions in FreePBX that a Grandstream ATA logs into.

Im using SIP INFO for DTMF between the FreePBX and the Grandstream because it makes even 15 digit long DNIS’s reliable… RFC 2833 sometimes missed digits for some reason.

The Grandstream ATA happily sends out the call’s DNIS as derived from the DAHDI PRI Trunk and works nicely for my fax server with DID fax boxes.

For completeness, there are some “legacy” analog single pair DID circuits still in existence here (NANP land), they can so be provisioned to provide that data but they can only be used Inbound and there are no techs at AT&T etc. that know how they work anymore :wink:

So perhaps the easiest thing is to keep the POTS lines if they prove cost effective (rarely so if you do the math though) and arrange for the non-geographic number that gets routed through a new SIP account. After all that is what Asterisk/FreePBX excels at.

Try taking a look at the “CALLERID(dnid)” value and/or “__FROM_DID”.

I think dnid doesn’t work in analog lines, but I have had mixed results. What I do now is evaluate dnid, and if that fails fall back to __FROM_DID. I think FreePBX/Asterisk always knows that one because of the incoming route rather than meta info from the provider.