Dahdi/libpri help needed

Hello,
I need to configure a transparent asterisk 1.8.12/dahdi 2.6.1/libpri 1.4.12 system between an existing pbx and the telco

telco <-> dahdi span1:asterisk:dahdi span2 <-> pbx

The lines are PRI E1. I did a very basic dialplan (everythin on span 2 is dialed on span 1 and vice-versa. In a second stage I will have to allow/block some calls on their way in/out but for now it’s not the goal.

Both spans are set as HDB,CRC4 (telco requirements) and the clock source is configured as 1 for span 1 and 0 for span2.

At first look everything works fine, but I’ve noticed two things in the pri debug…
a) I can see a lot of small differences between what I get from pbx (i.s. alerting data) and what I send to the telco.
b) How can I set the TON/NPI to be copied from eht incoming call to the outgoing call ? I tried with dynamic on both pirlocaldialplan and pridialplan with no luck

To be truly independent from the pbx (I have no access to the config) and from the telco (they will neve change their configs) I think I have to pass on the very same informations I get, both for incoming and outgoing calls)

TIA

The way that Asterisk works is that it converts signalling events on its interfaces to a standard set of events, internally. It then regenerates on the other interface. In SIP, this is referred to as being a back to back user agent. As such, it is normal for there to be some difference in detail between the signalling on the two interfaces.

I don’t have enough familiarity with the Asterisk ISDN support to answer the TON question. However, it looks to me that it is fixed for the trunk, on outbound calls. I presume there is a function to find the value for incoming calls, and your dialplan will need to transform the (incoming number, incoming type of number) into an acceptable number for the outgoing type of number.

Although the documentation isn’t clear, I assume that dynamic is defined by the ISDN standard, so the remote end would do any dynamic handling. From the examples I’ve seen here, unknown tends to more common when people are sending numbers in human dialed format, i.e. with national and international prefixes present, as required.