Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
X
xivo-dao
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xivo.solutions
xivo-dao
Commits
5f553213
Commit
5f553213
authored
Apr 07, 2020
by
Erwan Sevellec
🔥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2524 add configregistrar to the find_sip_user_settings query
parent
1cfa9bb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
debian/changelog
debian/changelog
+4
-0
xivo_dao/asterisk_conf_dao.py
xivo_dao/asterisk_conf_dao.py
+3
-1
xivo_dao/tests/test_asterisk_conf_dao.py
xivo_dao/tests/test_asterisk_conf_dao.py
+3
-2
No files found.
debian/changelog
View file @
5f553213
xivo-dao (2020.07.00) xivo-electra; urgency=medium
[ Tomas Taraba ]
* 3162 As a user with UA I should have only one presence state displayed for other users
[ esevellec ]
* 2524 add configregistrar to the sip user retrieving query
-- Tomas Taraba <ttaraba@avencall.com> Thu, 02 Apr 2020 14:57:19 +0200
xivo-dao (2019.12.07) xivo-deneb; urgency=medium
...
...
xivo_dao/asterisk_conf_dao.py
View file @
5f553213
...
...
@@ -538,6 +538,7 @@ def find_sip_user_settings(session):
UserFeatures
.
id
.
label
(
'user_id'
),
UserFeatures
.
uuid
.
label
(
'uuid'
),
(
Voicemail
.
mailbox
+
'@'
+
Voicemail
.
context
).
label
(
'mailbox'
),
LineFeatures
.
configregistrar
).
join
(
LineFeatures
,
and_
(
LineFeatures
.
protocolid
==
UserSIP
.
id
,
LineFeatures
.
protocol
==
'sip'
)
...
...
@@ -574,9 +575,10 @@ def find_sip_user_settings(session):
row
.
mailbox
,
namedpickupgroup
,
namedcallgroup
,
row
.
configregistrar
],
labels
=
[
'UserSIP'
,
'protocol'
,
'context'
,
'number'
,
'mohsuggest'
,
'user_id'
,
'uuid'
,
'mailbox'
,
'namedpickupgroup'
,
'namedcallgroup'
]
'uuid'
,
'mailbox'
,
'namedpickupgroup'
,
'namedcallgroup'
,
'configregistrar'
]
)
yield
updatedrow
...
...
xivo_dao/tests/test_asterisk_conf_dao.py
View file @
5f553213
...
...
@@ -1495,7 +1495,7 @@ class TestFindSipUserSettings(DAOTestCase, PickupHelperMixin):
voicemail
=
self
.
add_voicemail
(
mailbox
=
'1000'
,
context
=
'default'
)
user
=
self
.
add_user
(
firstname
=
"John"
,
lastname
=
"Smith"
,
voicemailid
=
voicemail
.
id
,
musiconhold
=
'musiconhold'
)
sip
=
self
.
add_usersip
(
category
=
'user'
)
line
=
self
.
add_line
(
protocol
=
'sip'
,
protocolid
=
sip
.
id
,
context
=
"default"
)
line
=
self
.
add_line
(
protocol
=
'sip'
,
protocolid
=
sip
.
id
,
context
=
"default"
,
configregistrar
=
"mds1"
)
self
.
add_user_line
(
user_id
=
user
.
id
,
line_id
=
line
.
id
,
extension_id
=
extension
.
id
)
mailbox
=
'{}@{}'
.
format
(
voicemail
.
mailbox
,
voicemail
.
context
)
...
...
@@ -1506,7 +1506,8 @@ class TestFindSipUserSettings(DAOTestCase, PickupHelperMixin):
'mailbox'
:
mailbox
,
'mohsuggest'
:
user
.
musiconhold
,
'user_id'
:
user
.
id
,
'uuid'
:
user
.
uuid
}
'uuid'
:
user
.
uuid
,
'configregistrar'
:
'mds1'
}
results
=
asterisk_conf_dao
.
find_sip_user_settings
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment