Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
65366a43
Commit
65366a43
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "contrib/thirdparty/sip_to_pjsip: add additional flag mappings"
parents
6fc222a1
b1d9fc87
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+30
-0
30 additions, 0 deletions
contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
with
30 additions
and
0 deletions
contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+
30
−
0
View file @
65366a43
...
@@ -116,6 +116,27 @@ def set_dtmfmode(key, val, section, pjsip, nmapped):
...
@@ -116,6 +116,27 @@ def set_dtmfmode(key, val, section, pjsip, nmapped):
set_value
(
key
,
'
none
'
,
section
,
pjsip
,
nmapped
)
set_value
(
key
,
'
none
'
,
section
,
pjsip
,
nmapped
)
def
setup_udptl
(
section
,
pjsip
,
nmapped
):
"""
Sets values from udptl into the appropriate pjsip.conf options.
"""
try
:
val
=
sip
.
get
(
section
,
'
t38pt_udptl
'
)[
0
]
except
LookupError
:
try
:
val
=
sip
.
get
(
'
general
'
,
'
t38pt_udptl
'
)[
0
]
except
LookupError
:
return
ec
=
'
none
'
if
'
yes
'
in
val
:
set_value
(
'
t38_udptl
'
,
'
yes
'
,
section
,
pjsip
,
nmapped
)
if
'
no
'
in
val
:
set_value
(
'
t38_udptl
'
,
'
no
'
,
section
,
pjsip
,
nmapped
)
if
'
redundancy
'
in
val
:
ec
=
'
redundancy
'
if
'
fec
'
in
val
:
ec
=
'
fec
'
set_value
(
'
t38_udptl_ec
'
,
ec
,
section
,
pjsip
,
nmapped
)
def
from_nat
(
key
,
val
,
section
,
pjsip
,
nmapped
):
def
from_nat
(
key
,
val
,
section
,
pjsip
,
nmapped
):
"""
Sets values from nat into the appropriate pjsip.conf options.
"""
"""
Sets values from nat into the appropriate pjsip.conf options.
"""
# nat from sip.conf can be comma separated list of values:
# nat from sip.conf can be comma separated list of values:
...
@@ -387,6 +408,7 @@ peer_map = [
...
@@ -387,6 +408,7 @@ peer_map = [
[
'
allow
'
,
merge_value
],
[
'
allow
'
,
merge_value
],
[
'
nat
'
,
from_nat
],
# rtp_symmetric, force_rport,
[
'
nat
'
,
from_nat
],
# rtp_symmetric, force_rport,
# rewrite_contact
# rewrite_contact
[
'
rtptimeout
'
,
set_value
(
'
rtp_timeout
'
)],
[
'
icesupport
'
,
set_value
(
'
ice_support
'
)],
[
'
icesupport
'
,
set_value
(
'
ice_support
'
)],
[
'
autoframing
'
,
set_value
(
'
use_ptime
'
)],
[
'
autoframing
'
,
set_value
(
'
use_ptime
'
)],
[
'
outboundproxy
'
,
set_value
(
'
outbound_proxy
'
)],
[
'
outboundproxy
'
,
set_value
(
'
outbound_proxy
'
)],
...
@@ -1068,6 +1090,7 @@ def map_peer(sip, section, pjsip, nmapped):
...
@@ -1068,6 +1090,7 @@ def map_peer(sip, section, pjsip, nmapped):
except
LookupError
:
except
LookupError
:
pass
# key not found in sip.conf
pass
# key not found in sip.conf
setup_udptl
(
section
,
pjsip
,
nmapped
)
def
find_non_mapped
(
sections
,
nmapped
):
def
find_non_mapped
(
sections
,
nmapped
):
"""
"""
...
@@ -1101,6 +1124,13 @@ def map_system(sip, pjsip, nmapped):
...
@@ -1101,6 +1124,13 @@ def map_system(sip, pjsip, nmapped):
except
LookupError
:
except
LookupError
:
pass
pass
try
:
sipdebug
=
sip
.
get
(
'
general
'
,
'
sipdebug
'
)[
0
]
set_value
(
'
debug
'
,
sipdebug
,
'
global
'
,
pjsip
,
nmapped
,
'
global
'
)
except
LookupError
:
pass
try
:
try
:
useroption_parsing
=
sip
.
get
(
'
general
'
,
'
legacy_useroption_parsing
'
)[
0
]
useroption_parsing
=
sip
.
get
(
'
general
'
,
'
legacy_useroption_parsing
'
)[
0
]
set_value
(
'
ignore_uri_user_options
'
,
useroption_parsing
,
'
global
'
,
pjsip
,
nmapped
,
'
global
'
)
set_value
(
'
ignore_uri_user_options
'
,
useroption_parsing
,
'
global
'
,
pjsip
,
nmapped
,
'
global
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment