Calls not going out correct dahdi trunk

Hi, i have an asterisknow system with a TE110P that is pretending to be a phone company. it has a dahdi trunk setup to use group 0 (a pri-net with context from-pstn), with a route that requires 9 to dial out.

there is also another asterisknow box (the “local” box) that is on the other end of the t1 crossover, setup similarly but with a dual span TE205P: it has a dahdi trunk setup to use group 0 (a pri-CPE with context from-pstn), with a route that requires 6 to dial out.

It also has a dahdi span (group 1, FXOKS with context from-internal), with a number of zap extensions setup. This is connected to a norstar mics PBX.

Now, calls go through from the “phone company” box to the “local” asterisk box and hit the IVR, can then dial extensions etc…

also, calls from physical extensions on the mics can be made to other SIP extensions.

However, when i try to call 6xxxx from a local extension (SIP or mics) it is routed to the prime set of the mics, if i pickup the handset then i hear the DTMF tones for the four digits dialed after the 6.

Now, if i unplug the T1 crossover from the mics, and dial 61234 from a SIP extension (cause the mics ext are not connected…) then the call goes through to the “phone company”. the setup seems simple and mostly works, i have tried looking everything over but must be missing something.

what should i be double-checking? thanks in advance.

i should mention i upgraded to freepbx 2.9, but am still at asterisk 1.6 (that came with the asterisknow disc).

i found a work around. swap the two T1 crossover cables at the dual span card and change the appropriate dahdi settings so that span 1 is now the pri-cpe and span 2 is the fxo_ks.

so now when i dial 61234, from any mics or SIP extension, the call goes up through to the other asterisk box. i can still call back down from the “fake phone company” to the “local” box and get a desired extension.

i upgraded to asterisk 1.8, and freepbx 2.9 before trying this and neither fixed the issue.

who do i let know about this, that even though an outbound route and trunk are specified to use a certain group that the group on span 1 is used first, unless its unavailable…