Outbound Routes

I loaded Distro 1.812.210.58 today. Everything went fine until I added an outbound route to service a group of FXO trunks. Everything worked fine and calls could be made but when I tried a second call with the first trunk busy on either an incoming or outgoing call a busy tone was returned rather than stepping on to the next trunk. The log showed everything busy on the second call.

The trunks were set up as Dahdi trunks and I also tried setting them up as Zap (Dahdi compatibility mode) trunks but the same thing happened.

I have a GSM Gateway which has four individual SIP trunks that connect to asterisk. I set up an outbound route for this and it performs normally, ie when the first trunk is unavailable it steps to the next trunk and so on.

It seems the problem is only occurring with Dahdi trunks so I think I may have stumbled upon a bug but I am unsure if it is FreePBX or Asterisk related.

Before chasing this further I wonder if anyone else has tried this setup and with what results?

I will collect some data tomorrow and post it. In the meantime I have tried a group and that worked as I would expect so I have got over my immediate problem.

How did you setup the trunks? Did you use a group number or make an individual trunk per channel?

Zap has been gone since version 1.4 so that is not relevant.

One channel per trunk, I find it easier to control selection order that way.

Ok, so what is the output of ‘dahdi show channels’ from Asterisk CLI?

Can we please have a log trace showing that channel one is occupied and try and place a call?

A couple of things, when you post formatted output use the [code]tags[/code] tags so we can read it.

I went back and fixed your message to show you the difference.

Anyway, from-analog is not a valid context, where did you get that from? Did you create that context?

Second, according to the log here you don’t have an entry in your outbound route for the next trunk.

- Executing [[email protected]:22] Dial("SIP/175-000000ae", "DAHDI/3/4651000,300,") in new stack
[2012-05-28 10:43:49] WARNING[6927]: app_dial.c:2277 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 17 - User busy)
== Everyone is busy/congested at this time (1:1/0/0)
-- Executing [[email protected]:23] NoOp("SIP/175-000000ae", "Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17") in new stack
-- Executing [[email protected]:24] Goto("SIP/175-000000ae", "s-BUSY,1") in new stack
-- Goto (macro-dialout-trunk,s-BUSY,1)
-- Executing [[email protected]:1] NoOp("SIP/175-000000ae", "Dial failed due to trunk reporting BUSY - giving up") in new stack
-- Executing [[email protected]:2] PlayTones("SIP/175-000000ae", "busy") in new stack
-- Executing [[email protected]:3] Busy("SIP/175-000000ae", "20") in new stack
== Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on 'SIP/175-000000ae' in macro 'dialout-trunk'
== Spawn extension (from-thecable, 4651000, 5) exited non-zero on 'SIP/175-000000ae'
-- Executing [[email protected]:1] Macro("SIP/175-000000ae", "hangupcall,") in new stack

I have made the tests you suggest. As far as I can see from the logs it seems that the first call goes out on DAHDI/3 which is the first trunk programmed in the Outbound Route and the second call also tries to use DAHDI/3 although DAHDI/1 is programmed as the second trunk in the outbound Route.

DAHDI SHOW CHANNELS:

   Chan Extension  Context         Language   MOH Interpret        Blocked    State
 pseudo            default                    default                         In Service
      1            from-analog     en         default                         In Service
      2            from-analog     en         default                         In Service
      3            from-analog     en         default                         In Service
      4            from-analog     en         default                         In Service
      5            from-analog     en         default                         In Service
      6            from-analog     en         default                         In Service
      7            from-analog     en         default                         In Service
      8            from-analog     en         default                         In Service
      9            from-analog     en         default                         In Service
     10            from-analog     en         default                         In Service
     11            from-analog     en         default                         In Service
     12            from-analog     en         default                         In Service
     13            from-analog     en         default                         In Service
     14            from-analog     en         default                         In Service
     15            from-analog     en         default                         In Service
     16            from-analog     en         default                         In Service
     17            from-analog     en         default                         In Service
     18            from-analog     en         default                         In Service
     19            from-analog     en         default                         In Service
     20            from-analog     en         default                         In Service
     21            from-analog     en         default                         In Service
     22            from-analog     en         default                         In Service
     23            from-analog     en         default                         In Service
     24            from-analog     en         default                         In Service

LOGS:

FIRST CALL:

Connected to Asterisk 1.8.12.0 currently running on hostedpbx (pid = 5421)
Verbosity is at least 3
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]:1] Macro("SIP/174-000000ad", "user-callerid,LIMIT,") in new stack
    -- Executing [[email protected]:1] Set("SIP/174-000000ad", "AMPUSER=174") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/174-000000ad", "0?report") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/174-000000ad", "1?Set(REALCALLERIDNUM=174)") in new stack
    -- Executing [[email protected]:4] Set("SIP/174-000000ad", "AMPUSER=174") in new stack
    -- Executing [[email protected]:5] Set("SIP/174-000000ad", "AMPUSERCIDNAME=Stone Home Test 1") in new stack
    -- Executing [[email protected]:6] GotoIf("SIP/174-000000ad", "0?report") in new stack
    -- Executing [[email protected]:7] Set("SIP/174-000000ad", "AMPUSERCID=174") in new stack
    -- Executing [[email protected]:8] Set("SIP/174-000000ad", "CALLERID(all)="Stone Home Test 1" <174>") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/174-000000ad", "0?limit") in new stack
    -- Executing [[email protected]:10] ExecIf("SIP/174-000000ad", "1?Set(GROUP(concurrency_limit)=174)") in new stack
    -- Executing [[email protected]:11] GosubIf("SIP/174-000000ad", "7?sub-ccss,s,1(from-thecable,4651000)") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/174-000000ad", "0?Return()") in new stack
    -- Executing [[email protected]:2] Set("SIP/174-000000ad", "CCSS_SETUP=TRUE") in new stack
    -- Executing [[email protected]:3] GosubIf("SIP/174-000000ad", "0?monitor_config,1(from-thecable,4651000):monitor_default,1(from-thecable,4651000)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/174-000000ad", "0?is_exten") in new stack
    -- Executing [[email protected]:2] StackPop("SIP/174-000000ad", "") in new stack
    -- Executing [[email protected]:3] Return("SIP/174-000000ad", "FALSE") in new stack
    -- Executing [[email protected]:12] ExecIf("SIP/174-000000ad", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [[email protected]:13] GotoIf("SIP/174-000000ad", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [[email protected]:26] Set("SIP/174-000000ad", "CALLERID(number)=174") in new stack
    -- Executing [[email protected]:27] Set("SIP/174-000000ad", "CALLERID(name)=Stone Home Test 1") in new stack
    -- Executing [[email protected]:28] Set("SIP/174-000000ad", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:2] Set("SIP/174-000000ad", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:3] Set("SIP/174-000000ad", "_NODEST=") in new stack
    -- Executing [[email protected]ecable:4] Gosub("SIP/174-000000ad", "sub-record-check,s,1(out,4651000,)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/174-000000ad", "1?check") in new stack
    -- Goto (sub-record-check,s,6)
    -- Executing [[email protected]:6] Set("SIP/174-000000ad", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:7] GotoIf("SIP/174-000000ad", "1?next") in new stack
    -- Goto (sub-record-check,s,10)
    -- Executing [[email protected]:10] ExecIf("SIP/174-000000ad", "0?Return()") in new stack
    -- Executing [[email protected]:11] GotoIf("SIP/174-000000ad", "0?out,1") in new stack
    -- Executing [[email protected]:12] Set("SIP/174-000000ad", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/174-000000ad", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [[email protected]:14] Set("SIP/174-000000ad", "NOW=1338216216") in new stack
    -- Executing [[email protected]:15] Set("SIP/174-000000ad", "__DAY=28") in new stack
    -- Executing [[email protected]:16] Set("SIP/174-000000ad", "__MONTH=05") in new stack
    -- Executing [[email protected]:17] Set("SIP/174-000000ad", "__YEAR=2012") in new stack
    -- Executing [[email protected]:18] Set("SIP/174-000000ad", "__TIMESTR=20120528-104336") in new stack
    -- Executing [[email protected]:19] Set("SIP/174-000000ad", "__FROMEXTEN=174") in new stack
    -- Executing [[email protected]:20] Set("SIP/174-000000ad", "__CALLFILENAME=out-4651000-174-20120528-104336-1338216216.319") in new stack
    -- Executing [[email protected]:21] Goto("SIP/174-000000ad", "out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] ExecIf("SIP/174-000000ad", "1?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/174-000000ad", "0?record,1(exten,4651000,174)") in new stack
    -- Executing [[email protected]:3] Return("SIP/174-000000ad", "") in new stack
    -- Executing [[email protected]:5] Macro("SIP/174-000000ad", "dialout-trunk,13,4651000,") in new stack
    -- Executing [[email protected]:1] Set("SIP/174-000000ad", "DIAL_TRUNK=13") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/174-000000ad", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/174-000000ad", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("SIP/174-000000ad", "DIAL_NUMBER=4651000") in new stack
    -- Executing [[email protected]:5] Set("SIP/174-000000ad", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [[email protected]:6] Set("SIP/174-000000ad", "OUTBOUND_GROUP=OUT_13") in new stack
    -- Executing [[email protected]:7] GotoIf("SIP/174-000000ad", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [[email protected]:9] GotoIf("SIP/174-000000ad", "0?skipoutcid") in new stack
    -- Executing [[email protected]:10] Set("SIP/174-000000ad", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [[email protected]:11] Macro("SIP/174-000000ad", "outbound-callerid,13") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/174-000000ad", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/174-000000ad", "0?Set(REALCALLERIDNUM=174)") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/174-000000ad", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [[email protected]:6] Set("SIP/174-000000ad", "USEROUTCID=Stone Home Test 1<9727462758>") in new stack
    -- Executing [[email protected]:7] Set("SIP/174-000000ad", "EMERGENCYCID=Stone Home Test 1<8695670174>") in new stack
    -- Executing [[email protected]:8] Set("SIP/174-000000ad", "TRUNKOUTCID=") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/174-000000ad", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [[email protected]lerid:12] ExecIf("SIP/174-000000ad", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/174-000000ad", "1?Set(CALLERID(all)=Stone Home Test 1<9727462758>)") in new stack
    -- Executing [[email protected]:14] ExecIf("SIP/174-000000ad", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/174-000000ad", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:12] GosubIf("SIP/174-000000ad", "0?sub-flp-13,s,1()") in new stack
    -- Executing [[email protected]:13] Set("SIP/174-000000ad", "OUTNUM=4651000") in new stack
    -- Executing [[email protected]:14] Set("SIP/174-000000ad", "custom=DAHDI/3") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/174-000000ad", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/174-000000ad", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("SIP/174-000000ad", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] Set("SIP/174-000000ad", "TRUNK_GROUP_2=DAHDI/3") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/174-000000ad", "0?rotaryhunting_2") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/174-000000ad", "0?rotaryhunting_2") in new stack
    -- Executing [[email protected]:4] MacroExit("SIP/174-000000ad", "") in new stack
    -- Executing [[email protected]:18] GotoIf("SIP/174-000000ad", "0?bypass,1") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/174-000000ad", "1?Set(CONNECTEDLINE(num,i)=4651000)") in new stack
    -- Executing [[email protected]:20] ExecIf("SIP/174-000000ad", "1?Set(CONNECTEDLINE(name,i)=CID:9727462758)") in new stack
    -- Executing [[email protected]:21] GotoIf("SIP/174-000000ad", "0?customtrunk") in new stack
    -- Executing [[email protected]:22] Dial("SIP/174-000000ad", "DAHDI/3/4651000,300,") in new stack
    -- Called DAHDI/3/4651000
    -- DAHDI/3-1 answered SIP/174-000000ad

SECOND CALL, FIRST CALL ONGOING:

  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]:1] Macro("SIP/175-000000ae", "user-callerid,LIMIT,") in new stack
    -- Executing [[email protected]:1] Set("SIP/175-000000ae", "AMPUSER=175") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/175-000000ae", "0?report") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/175-000000ae", "1?Set(REALCALLERIDNUM=175)") in new stack
    -- Executing [[email protected]:4] Set("SIP/175-000000ae", "AMPUSER=175") in new stack
    -- Executing [[email protected]:5] Set("SIP/175-000000ae", "AMPUSERCIDNAME=Stone Home Test 2") in new stack
    -- Executing [[email protected]:6] GotoIf("SIP/175-000000ae", "0?report") in new stack
    -- Executing [[email protected]:7] Set("SIP/175-000000ae", "AMPUSERCID=175") in new stack
    -- Executing [[email protected]:8] Set("SIP/175-000000ae", "CALLERID(all)="Stone Home Test 2" <175>") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/175-000000ae", "0?limit") in new stack
    -- Executing [[email protected]:10] ExecIf("SIP/175-000000ae", "1?Set(GROUP(concurrency_limit)=175)") in new stack
    -- Executing [[email protected]:11] GosubIf("SIP/175-000000ae", "7?sub-ccss,s,1(from-thecable,4651000)") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/175-000000ae", "0?Return()") in new stack
    -- Executing [[email protected]:2] Set("SIP/175-000000ae", "CCSS_SETUP=TRUE") in new stack
    -- Executing [[email protected]:3] GosubIf("SIP/175-000000ae", "0?monitor_config,1(from-thecable,4651000):monitor_default,1(from-thecable,4651000)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/175-000000ae", "0?is_exten") in new stack
    -- Executing [[email protected]:2] StackPop("SIP/175-000000ae", "") in new stack
    -- Executing [[email protected]:3] Return("SIP/175-000000ae", "FALSE") in new stack
    -- Executing [[email protected]:12] ExecIf("SIP/175-000000ae", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [[email protected]:13] GotoIf("SIP/175-000000ae", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [[email protected]:26] Set("SIP/175-000000ae", "CALLERID(number)=175") in new stack
    -- Executing [[email protected]:27] Set("SIP/175-000000ae", "CALLERID(name)=Stone Home Test 2") in new stack
    -- Executing [[email protected]:28] Set("SIP/175-000000ae", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:2] Set("SIP/175-000000ae", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:3] Set("SIP/175-000000ae", "_NODEST=") in new stack
    -- Executing [[email protected]:4] Gosub("SIP/175-000000ae", "sub-record-check,s,1(out,4651000,)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/175-000000ae", "1?check") in new stack
    -- Goto (sub-record-check,s,6)
    -- Executing [[email protected]:6] Set("SIP/175-000000ae", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:7] GotoIf("SIP/175-000000ae", "1?next") in new stack
    -- Goto (sub-record-check,s,10)
    -- Executing [[email protected]:10] ExecIf("SIP/175-000000ae", "0?Return()") in new stack
    -- Executing [[email protected]:11] GotoIf("SIP/175-000000ae", "0?out,1") in new stack
    -- Executing [[email protected]:12] Set("SIP/175-000000ae", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/175-000000ae", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [[email protected]:14] Set("SIP/175-000000ae", "NOW=1338216229") in new stack
    -- Executing [[email protected]:15] Set("SIP/175-000000ae", "__DAY=28") in new stack
    -- Executing [[email protected]:16] Set("SIP/175-000000ae", "__MONTH=05") in new stack
    -- Executing [[email protected]:17] Set("SIP/175-000000ae", "__YEAR=2012") in new stack
    -- Executing [[email protected]:18] Set("SIP/175-000000ae", "__TIMESTR=20120528-104349") in new stack
    -- Executing [[email protected]:19] Set("SIP/175-000000ae", "__FROMEXTEN=175") in new stack
    -- Executing [[email protected]:20] Set("SIP/175-000000ae", "__CALLFILENAME=out-4651000-175-20120528-104349-1338216229.321") in new stack
    -- Executing [[email protected]:21] Goto("SIP/175-000000ae", "out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] ExecIf("SIP/175-000000ae", "1?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/175-000000ae", "0?record,1(exten,4651000,175)") in new stack
    -- Executing [[email protected]:3] Return("SIP/175-000000ae", "") in new stack
    -- Executing [[email protected]:5] Macro("SIP/175-000000ae", "dialout-trunk,13,4651000,") in new stack
    -- Executing [[email protected]:1] Set("SIP/175-000000ae", "DIAL_TRUNK=13") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/175-000000ae", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/175-000000ae", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("SIP/175-000000ae", "DIAL_NUMBER=4651000") in new stack
    -- Executing [[email protected]:5] Set("SIP/175-000000ae", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [[email protected]:6] Set("SIP/175-000000ae", "OUTBOUND_GROUP=OUT_13") in new stack
    -- Executing [[email protected]:7] GotoIf("SIP/175-000000ae", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [[email protected]:9] GotoIf("SIP/175-000000ae", "0?skipoutcid") in new stack
    -- Executing [[email protected]:10] Set("SIP/175-000000ae", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [[email protected]:11] Macro("SIP/175-000000ae", "outbound-callerid,13") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/175-000000ae", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/175-000000ae", "0?Set(REALCALLERIDNUM=175)") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/175-000000ae", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [[email protected]:6] Set("SIP/175-000000ae", "USEROUTCID=Stone Home Test 2<9727462758>") in new stack
    -- Executing [[email protected]:7] Set("SIP/175-000000ae", "EMERGENCYCID=Stone Home Test 2<8695670175>") in new stack
    -- Executing [[email protected]:8] Set("SIP/175-000000ae", "TRUNKOUTCID=") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/175-000000ae", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [[email protected]:12] ExecIf("SIP/175-000000ae", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/175-000000ae", "1?Set(CALLERID(all)=Stone Home Test 2<9727462758>)") in new stack
    -- Executing [[email protected]:14] ExecIf("SIP/175-000000ae", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/175-000000ae", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:12] GosubIf("SIP/175-000000ae", "0?sub-flp-13,s,1()") in new stack
    -- Executing [[email protected]:13] Set("SIP/175-000000ae", "OUTNUM=4651000") in new stack
    -- Executing [[email protected]:14] Set("SIP/175-000000ae", "custom=DAHDI/3") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/175-000000ae", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/175-000000ae", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("SIP/175-000000ae", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] Set("SIP/175-000000ae", "TRUNK_GROUP_2=DAHDI/3") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/175-000000ae", "0?rotaryhunting_2") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/175-000000ae", "0?rotaryhunting_2") in new stack
    -- Executing [[email protected]:4] MacroExit("SIP/175-000000ae", "") in new stack
    -- Executing [[email protected]:18] GotoIf("SIP/175-000000ae", "0?bypass,1") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/175-000000ae", "1?Set(CONNECTEDLINE(num,i)=4651000)") in new stack
    -- Executing [[email protected]:20] ExecIf("SIP/175-000000ae", "1?Set(CONNECTEDLINE(name,i)=CID:9727462758)") in new stack
    -- Executing [[email protected]:21] GotoIf("SIP/175-000000ae", "0?customtrunk") in new stack
    -- Executing [[email protected]:22] Dial("SIP/175-000000ae", "DAHDI/3/4651000,300,") in new stack
[2012-05-28 10:43:49] WARNING[6927]: app_dial.c:2277 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 17 - User busy)
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [[email protected]:23] NoOp("SIP/175-000000ae", "Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17") in new stack
    -- Executing [[email protected]:24] Goto("SIP/175-000000ae", "s-BUSY,1") in new stack
    -- Goto (macro-dialout-trunk,s-BUSY,1)
    -- Executing [[email protected]:1] NoOp("SIP/175-000000ae", "Dial failed due to trunk reporting BUSY - giving up") in new stack
    -- Executing [[email protected]:2] PlayTones("SIP/175-000000ae", "busy") in new stack
    -- Executing [[email protected]:3] Busy("SIP/175-000000ae", "20") in new stack
  == Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on 'SIP/175-000000ae' in macro 'dialout-trunk'
  == Spawn extension (from-thecable, 4651000, 5) exited non-zero on 'SIP/175-000000ae'
    -- Executing [[email protected]:1] Macro("SIP/175-000000ae", "hangupcall,") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/175-000000ae", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] Hangup("SIP/175-000000ae", "") in new stack
  == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/175-000000ae' in macro 'hangupcall'
  == Spawn extension (from-thecable, h, 1) exited non-zero on 'SIP/175-000000ae'

Scott

Actaully for analog lines from-analog is correct starting with 2.9 and newer. its the same as from-zaptel.

Anyways this has always been my issue with Digium analog cards. If you setup each channels as a seperate trunk instead of using the whole group 0 it does not realize a channel is in use. I have seen this over and over again.

Learn something new every day.

Actually, it’s returning cause 17 busy. It’s like he does not have another trunk programmed as the next destination in the outbound route.

I have checked, there is a second trunk there in the outbound route. I think the busy is coming from the first trunk that is busy from the first call because for some reason the second trunk is not being seen.

Where should I look to check that the trunk list has got out of FreePBX into the configuration files?

It’s all DB driven and doesn’t write a dial plan in the conventional sense.

Maybe someone else will chime in, or Tony is correct and this is a digium card/channel type issue.

The card was working normally before in an asterisk 1.4 trixbox installation so I don’t think it will be a hardware issue, in which case it is more likely a software issue. I would like to eliminate fpbx before speaking to digium about it. Has anyone any suggestions on how to go about this?

This has nothing to do withe FreePBX. Its all handled as part of the Asterisk/DAHDI dealings. I would contact Digium as we have always used groups with DAHDI for this reason.

OK will discuss with Digium.

As an aside this has caused me to dig a little deeper into groups and I have found them to be more versatile than I had previously thought. g plus group number hunts from top to bottom G plus group number hunts from bottom to top r plus group number does a round robin and R plus group number does a round robin in I think [but not entirely sure] in the oposite direction.

Thanks for your help Scott and Tony.

Out of interest I tried allocating each channel to a group of its own and then put the individual groups in Outbound Routes. I found that everything behaved as one would expect so there is an easy workaround for the problem I was experiencing if there is a need to use an individual trunk for each Dahdi channel.