Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch to work with chan_dongle #26

Open
dandantheitman opened this issue Feb 9, 2015 · 0 comments
Open

Patch to work with chan_dongle #26

dandantheitman opened this issue Feb 9, 2015 · 0 comments

Comments

@dandantheitman
Copy link

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                 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant