QueuePause action impossible to unpause
Hello,
You need to remove 'and 'true' or 'false'' like below to allow unpause action :
def QueuePause(self, queue, interface, paused):
'Pause <interface> in <queue>.'
id = self._write_action('QueuePause', {
'Queue': queue,
'Interface': interface,
'Paused': paused
})
Hi,
Why ? Don't you enjoy to use a python boolean ?
Jean
Le lundi 01 juillet 2019 à 08:06 -0700, Briareos12 a écrit :
Hello, You need to remove 'and 'true' or 'false'' like below to allow unpause action : def QueuePause(self, queue, interface, paused): 'Pause
in .' id = self._write_action('QueuePause', { 'Queue': queue, 'Interface': interface, 'Paused': paused })
-- Jean Schurger [email protected] | http://schurger.org GPG: 21D0 4702 758D 5656 C0D6 3288 1609 9E15 596A E928
Hi, Aha I am using boolean var but it's not working in this case. When I passed 'false' to unpause the agent, it does nothing but 'true' works fine. After removing this condition all works fine :)
In Python, both 'false' and 'true' are True. You want to use False or True
Le mar. 2 juill. 2019 11 h 03, Briareos12 [email protected] a écrit :
Hi, Aha I am using boolean var but it's not working in this case. When I passed 'false' to unpause the agent, it does nothing but 'true' works fine. After removing this condition all works fine :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeansch/py-asterisk/issues/36?email_source=notifications&email_token=AABUPX253HLOOFSMZ3TG5DTP5NU2NA5CNFSM4H4TK7QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZBSLWA#issuecomment-507717080, or mute the thread https://github.com/notifications/unsubscribe-auth/AABUPXYXDNOFBYSSHLUMKXTP5NU2NANCNFSM4H4TK7QA .
I'v quote boolean in my text but my test was with True and False :)
I'closing this issue. Reviewed the code, and it work as expected.