[asterisk-commits] sip to pjsip: Map (session-)timers correctly. (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 18 11:49:15 CDT 2016
Joshua Colp has submitted this change and it was merged.
Change subject: sip_to_pjsip: Map (session-)timers correctly.
......................................................................
sip_to_pjsip: Map (session-)timers correctly.
When using the migration script sip_to_pjsip.py, session-timers=accept and
session-timers=refuse were mapped to wrong values.
ASTERISK-22374
Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
---
M contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
index 8909216..444f4db 100755
--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
@@ -133,11 +133,14 @@
found in sip.conf.
"""
# pjsip.conf values can be yes/no, required, always
+ # 'required' is a new feature of chan_pjsip, which rejects
+ # all SIP clients not supporting Session Timers
+ # 'Accept' is the default value of chan_sip and maps to 'yes'
+ # chan_sip ignores the case, for example 'session-timers=Refuse'
+ val = val.lower()
if val == 'originate':
set_value('timers', 'always', section, pjsip, nmapped)
- elif val == 'accept':
- set_value('timers', 'required', section, pjsip, nmapped)
- elif val == 'never':
+ elif val == 'refuse':
set_value('timers', 'no', section, pjsip, nmapped)
else:
set_value('timers', 'yes', section, pjsip, nmapped)
--
To view, visit https://gerrit.asterisk.org/3610
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-commits
mailing list