Skip to content

Commit c53b778

Browse files
committed
AMI: fix QueueAdd multi message wrong detect
1 parent c786190 commit c53b778

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

panoramisk/actions.py

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def multi(self):
7979
return True
8080
elif 'will follow' in msg:
8181
return True
82+
elif msg == 'added interface to queue':
83+
return False
8284
elif msg.startswith('added') and msg.endswith('to queue'):
8385
return True
8486
elif msg.endswith('successfully queued') and self['async'] != 'false':

tests/fixtures/queue_add.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Response: Success
2+
ActionID: action/transaction_uid/1/1
3+
Message: Added interface to queue
4+
5+

tests/test_manager_with_fixtures.py

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ def test_queue_status(manager):
5454
assert len(responses) == 9
5555

5656

57+
def test_queue_add(manager):
58+
manager = manager(stream='queue_add.yaml')
59+
future = manager.send_action({'Action': 'QueueAdd',
60+
'Queue': 'xxxxxxxxxxxxxxxx-tous',
61+
'Interface': 'SIP/000000'})
62+
responses = future.result()
63+
assert len(responses) == 4
64+
65+
5766
def test_pjsip_show_endpoint(manager):
5867
manager = manager(stream='pjsip_show_endpoint.yaml')
5968
future = manager.send_action({'Action': 'PJSIPShowEndpoint',

0 commit comments

Comments
 (0)