Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
3941ad34
Commit
3941ad34
authored
Jun 28, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added account.pstn.idd_prefix setting and made use of it
parent
0ff3e1a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
account.py
blink/configuration/account.py
+6
-0
sessions.py
blink/sessions.py
+2
-0
No files found.
blink/configuration/account.py
View file @
3941ad34
...
...
@@ -5,16 +5,22 @@
__all__
=
[
'AccountExtension'
,
'BonjourAccountExtension'
]
from
sipsimple.account
import
PSTNSettings
from
sipsimple.configuration
import
Setting
,
SettingsGroup
,
SettingsObjectExtension
from
blink.configuration.datatypes
import
CustomSoundFile
,
DefaultPath
class
PSTNSettingsExtension
(
PSTNSettings
):
idd_prefix
=
Setting
(
type
=
unicode
,
default
=
None
,
nillable
=
True
)
class
SoundSettings
(
SettingsGroup
):
inbound_ringtone
=
Setting
(
type
=
CustomSoundFile
,
default
=
CustomSoundFile
(
DefaultPath
),
nillable
=
True
)
class
AccountExtension
(
SettingsObjectExtension
):
pstn
=
PSTNSettingsExtension
sounds
=
SoundSettings
...
...
blink/sessions.py
View file @
3941ad34
...
...
@@ -1770,6 +1770,8 @@ class SessionManager(object):
@
staticmethod
def
create_uri
(
account
,
address
):
address
=
re
.
sub
(
r'\(\s?0\s?\)|[-() ]'
,
''
,
address
)
if
isinstance
(
account
,
Account
)
and
account
.
pstn
.
idd_prefix
is
not
None
:
address
=
re
.
sub
(
r'^\+'
,
account
.
pstn
.
idd_prefix
,
address
)
if
not
address
.
startswith
(
'sip:'
)
and
not
address
.
startswith
(
'sips:'
):
address
=
'sip:'
+
address
if
'@'
not
in
address
:
...
...
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