mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Merge "sip_to_pjsip: Map (session-)timers correctly."
This commit is contained in:
@@ -133,11 +133,14 @@ def set_timers(key, val, section, pjsip, nmapped):
|
|||||||
found in sip.conf.
|
found in sip.conf.
|
||||||
"""
|
"""
|
||||||
# pjsip.conf values can be yes/no, required, always
|
# 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':
|
if val == 'originate':
|
||||||
set_value('timers', 'always', section, pjsip, nmapped)
|
set_value('timers', 'always', section, pjsip, nmapped)
|
||||||
elif val == 'accept':
|
elif val == 'refuse':
|
||||||
set_value('timers', 'required', section, pjsip, nmapped)
|
|
||||||
elif val == 'never':
|
|
||||||
set_value('timers', 'no', section, pjsip, nmapped)
|
set_value('timers', 'no', section, pjsip, nmapped)
|
||||||
else:
|
else:
|
||||||
set_value('timers', 'yes', section, pjsip, nmapped)
|
set_value('timers', 'yes', section, pjsip, nmapped)
|
||||||
|
Reference in New Issue
Block a user