How to route call from trunk to another trunk?


I right understood, I can’t simple route incoming call from PBX over E1 trunk to E1 trunk with my provider with Inbound Routes?

I’m newbie with Asterisk, and all I find is Custom Contexts module.

What I should do with this?

I have already configured like this:
Provider1 <–E1–> Asterisk <–E1–> LG-Nortel IP-LDK300 <–CO–> Provider2

Asterisk and IP-LDK have common numbering plan and abonents can call each.

But abonents of IP-LDK, which I switch calls through Asterisk can not call in the city over Provider1.

You message is very hard to understand. I am assuming English is not your native language?

You need to slow down and explain what you want.

You must supply the version of FreePBX your are running as the answer is different depending on the version.

Starting in 2.8 trunks can be destinations of inbound routes.

Yes, you’re right about English and me.

I have Asterisk 1.6 with Wildcard TE220 and FreePBX v.

Asterisk connected via E1 trunk to Provider1 and to LG-Nortel ipLDK-300.
Asterisk’s abonents can call to ipLDK abonents and vice versa.

I wanna abonents of ipLDK-300 can calling through Asterisk Provider1.

I have rule in Inbound Routes - if DID is _8XXXXXXXXXX the call destination is trunk Provider1.

But if I dial 98XXXXXXXXXX in ipLDK I hear terminate call.

Asterisk log:
– Accepting call from ‘1655’ to ‘s’ on channel 0/31, span 2
– Executing [s@from-pstn:1] NoOp(“DAHDI/62-1”, “No DID or CID Match”) in new stack
– Executing [s@from-pstn:2] Answer(“DAHDI/62-1”, “”) in new stack
– Executing [s@from-pstn:3] Wait(“DAHDI/62-1”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“DAHDI/62-1”, “ss-noservice”) in new stack
– <DAHDI/62-1> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Span 2: Channel 0/31 got hangup request, cause 16
== Spawn extension (from-pstn, s, 4) exited non-zero on ‘DAHDI/62-1’
– Executing [h@from-pstn:1] Macro(“DAHDI/62-1”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/62-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] Hangup(“DAHDI/62-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘DAHDI/62-1’ in macro ‘hangupcall’
== Spawn extension (from-pstn, h, 1) exited non-zero on ‘DAHDI/62-1’
– Hungup ‘DAHDI/62-1’

I don’t understand, problem are in my config or in ipLDK?

You don’t have an inbound route for digits 1655

 Accepting call from '1655' to 's' on channel 0/31, span 2
-- Executing [s@from-pstn:1] NoOp("DAHDI/62-1", "No DID or CID Match") in new stack


I have some problem, the outbound CID from LG-Nortel is not passed out to E1 card
Have someone an idea why ?


I solved this by configuring Asterisk by CLI, not from WebUI.

But what do you mean outbound CID? Called person doesn’t see the CID of caller?

All outgoing from the LDK-300 PRI contain only Calling Number and no Called Number. Without this it can be routed in Asterisk to outgoing trunk.
May I see your trunk and signalling settings ?

I have to admit - LG-NORTEL LDK PBX are very strange !
This one doesn’t wait, when dial, to enter all digits and AFTER THAT to route on PRI (!?!). After pressing 9 to access CO Group 1 (PRI) it pass immediately connection to provider and wait an outside tone to dial the rest.
(Of course, in a normal PRI connection doesn’t exist such a thing and that’s why we didn’t receive Called ID Number …)
I solved introducing a DISA destination for LGN Extensions which wait user to dial outside number, in this way is working.

On my new job I don’t work with anything PBX, and I have not backup of Asterisk configuration from previous job.

But as I remember problem was in LG. I found the solution on
This is russian forum about LG-Nortel PBX.