I've been trying to use this package with chan_dongle and had to make some changes. They are below if you want to consider including them in the next release. Changes are to trunkbalance.php, added lines are 365 to 378 below.
342 switch ($destrunk_tech)
343 {
344 case 'sip':
345 if ($count_inbound) {
346 $channel_filter="(dstchannel LIKE 'SIP/".$destrunk_channelid."%' OR channel LIKE 'SIP/".$destrunk_channelid."%')";
347 } else {
348 $channel_filter="dstchannel LIKE 'SIP/".$destrunk_channelid."%'";
349 }
350 break;
351 case 'iax':
352 if ($count_inbound) {
353 $channel_filter="(dstchannel LIKE 'IAX2/".$destrunk_channelid."%' OR channel LIKE 'IAX2/".$destrunk_channelid."%')";
354 } else {
355 $channel_filter="dstchannel LIKE 'IAX2/".$destrunk_channelid."%'";
356 }
357 break;
358 case 'dahdi':
359 if ($count_inbound) {
360 $channel_filter="(dstchannel LIKE 'DAHDI/".$destrunk_channelid."%' OR channel LIKE 'DAHDI/".$destrunk_channelid."%')";
361 } else {
362 $channel_filter="dstchannel LIKE 'DAHDI/".$destrunk_channelid."%'";
363 }
364 break;
365 case 'custom':
366 if (strcmp(substr($destrunk_channelid,0,6),"dongle") == 0){
367 $dongleid=explode("/",$destrunk_channelid);
368 $dongleid=$dongleid[1];
369 if ($count_inbound) {
370 $channel_filter="(dstchannel LIKE 'Dongle/".$dongleid."%' OR channel LIKE 'Dongle/".$dongleid."%')";
371 } else {
372 $channel_filter="dstchannel LIKE 'Dongle/".$dongleid."%'";
373 }
374 }
375 else{
376 $channel_filter=$destrunk_channelid;
377 }
378 break;
379 default: $channel_filter=$destrunk_channelid;;
380 }
I've been trying to use this package with chan_dongle and had to make some changes. They are below if you want to consider including them in the next release. Changes are to trunkbalance.php, added lines are 365 to 378 below.