DID and dahdi on pri

Helllo, i have a PRI E1 with 30 channels with one numerve that use as main numer, and 1 hundrend DIDs that are contiguos, our telco calls this GNR, not sure this is a common term.
In the past with my very old freepbx i was able to forward calls coming from GNR DIDs directly to extensions.
When i upgraded to version 14 i’m not able anymore to receive dids, i only receive an “s” and all calls are forwared to ivr.
anyone that have an advice?

All the Best
Rayad

To what context are the inbound calls being sent ?

thank you for your answer, inbound calls go to the ivr instead of the extension

No, the context of the PRI trunk, not the routing if the DID, there is one called [from-did-direct] which is designed to do what I think you are trying to do.

how can i reach the information you asked for?
i’m only able to use web interface, not * guru

Sorry I don’t use the GUI for DAHDI It should be in chan_dahdi.conf but editing it by hand is not for you . Maybe someone who does use the dahdi helper can help.

this is my chan_dahdi.conf
+++++++++++++++++
[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=it
busydetect=yes
busycount=6
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=yes
faxdetect=no
rxgain=0.0
txgain=0.0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf
+++++++++++++++++++

and this is my chan_dahdi_group.conf

; [span_1]
signalling=pri_cpe
switchtype=euroisdn
pridialplan=unknown
prilocaldialplan=unknown
group=0
context=from-digital
channel=>1-15,17-31

>context=from-digital
<context=from-did-direct

stopped answering.
i only get an “s” in in the did

Logs,logs, always paste logs

Basically you have 2 ways :

  1. Create 100 inbound routes. A bit repetitive, but works.

  2. If the extensions are contiguous and have some logic with the DID numbers, you can have only one inbound route. My extensions are 4-digit that match the last 4 of the DID.

Custom destination target :
automap,${CALLERID(DNID):-4},1

in extensions_custom.conf :
[automap]
include => from-did-direct
include => outbound-allroutes

And create an inbound route where 1916nnnn is your contiguous DID block.
_1916nnnnnXX -> go to custom extension.

Don’t ask me how it works, I don’t know. I copied it from Lorne.

This is an extract from extensions.conf ( which comes with raw asterisk and thus pre any FreePBX’ additional contexts)

;-------------------------------------------------------------------------------
; from-did-direct:
;
; forces ext-findmefollow to take precedence over ext-local. Also exposed to
; the public side to allow an extension number to be used as an external DID
; without requiring inbound routes to be created, common in many PRI installations
; where the last 4 digits are used as the extnension and DIDs are delivered in
; 4 digit formats.
;
[from-did-direct]
include => ext-findmefollow
include => ext-local
;-------------------------------------------------------------------------------

This maps, no matter what , any “DID/DDI” apparent from the carrier. Very often this is not a complete phone number but just the last ‘N’ LSD’s (least significant digits) of the complete Number as seen by the PSTN, traditionally 4 in the US, but often now electable by the purchaser.

There needs to be a direct mapping between the DID number as received from the PRI and an endpoint first found in :-

rasterisk -x 'dialplan show @ext-findmefollow'|grep "'[0-9]*'"

then

rasterisk -x ‘dialplan show @ext-local’|grep “’[0-9]*’”

If there is no match it will return ‘s’ otherwise it will go to the endpoint matched, be it an extension an IVR a queue or whatever.

The only way to proceed is to find out what exactly the carrier is sending (and confirm that the call is actually entering the system via [from-did-direct] ) :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.