Hi Joshua > The option strictly controls device state. Any enforcement of a limit for > calling does not exist, and is up to you to do using various methods. > Device state could be queried and used, or GROUP[1] and GROUP_COUNT[2]. > > [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP > [2] > https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP_COUNT
Yes, I had a shot at GROUP and GROUP_COUNT but somehow did not manage to achieve efficient control of the channels. I have hacked together an ugly solution. I use an agi script for routing decision. If the call originates from a Customer Device: ($tech,$device,$callid) = $chan_vars{'channel'} =~ m/([A-Za-z]*)\/(.*)?-(.*)/; So $device contains the part I need to use in: $AGI->get_variable("DEVICE_STATE(PJSIP/$device)"); If this returns BUSY, I send the call to HangUp(17) On calls TO a Customer Device, I use the same $device to build the destination URI: Dial(PJSIP/$destination@$device) and therefore I can also query the state and figure out if I need to send the call to HangUp(17). One interesting observation. If the count of channels is not at the limit (eg 2 of 2 => busy), so for example 3 out of 2 channels, the status does not stay ab BUSY but goes back to IN_USE. Shouldn't that still be busy? :-) Mit freundlichen Grüssen -Benoît Panizzon- -- I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________ -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users