Trying to do trunk to trunk transfer

First post, little FreePBX experience, thanks for your patience. I will try to describe what I am attempting.

I have two Asterisk servers connected with an AIX2 trunk. Server B is also connected to a Cisco Call Manager with a SIP trunk. Domain A users have 5xxx as numbers, Domain B have 4xxx and the Cisco has 1613556xxxx. Here is what I can and cannot do:

  • 5xxx can call 4xxx
  • 4xxx can call 5xxx
  • 4xxx can call 1613556xxxx
  • 5xxx cannot call 1613556xxxx

So it looks like it is not transferring the incoming call on the IAX2 trunk to the outgoing SIP trunk. Here is the key log entry from Asterisk B (note “highdomain” = domain A):

NoOp(“IAX2/highdomain-5063”, “Received an unknown call with DID set to 16135561002”) in new stack
Executing [[email protected]:3] Goto(“IAX2/highdomain-5063”, “s,a2”) in new stack
Goto (from-trunk,s,2)
Executing [[email protected]:2] Answer(“IAX2/highdomain-5063”, “”) in new stack
Executing [[email protected]:3] Wait(“IAX2/highdomain-5063”, “2”) in new stack
[2016-05-30 19:16:16] WARNING[1993] chan_iax2.c: Received trunked frame before first full voice frame
[2016-05-30 19:16:16] WARNING[1999] chan_iax2.c: Received trunked frame before first full voice frame
Executing [[email protected]:4] Playback(“IAX2/highdomain-5063”, “ss-noservice”) in new stack

So what I am getting is a number is not in service reply from Asterisk B. It doesn’t seem to know what to do with that DID but it looks like it is trying to throw it back to “highdomain”. I have an incoming route for that DID and it forwards 161356xxx calls from 4xxx out to the correct trunk. I am at loss.

Let me know if there are configurations you would need to see. Thanks you in advance.

That means you do not have an inbound route for that number on that server.

First of all I’m assuming the 161355xxxxxx number is an extension of sorts on the Cisco call manager and from my experience all I have to do in the incoming trunk settings (that will be on Server B) is specify context as “from-internal” and all calls that would traditionally work directly from server B will work when attempted from server A. No need for inbound routes. If you shared your configurations it would definitely help.

Perhaps my inbound route is not configured correctly. I have only two entries:

DID Number: 1613556xxxx
Set Destination>Trunks>“trunkname”

DID Number: 1613556xxxx

I don’t think that works, but there’s been some changes there recently. If it is going to work, it needs to start with an underscore, and the X’s need to be capitals.

I’m honestly not sure if there is a way to do that, and preserve the destination. I normally would do that in two or three lines of dialplan.

exten => _1613556XXXX,1,Dial(SIP/trunkname/${EXTEN})
exten => _X.,1,Goto(from-trunk, ${EXTEN}, 1)

Then set the incoming context of that peer to from-my-trunk

That did it. I set my context on both trunks to from-internal and I now have connectivity. Thanks for that!