diff --git a/configs/pjsip.conf.sample b/configs/pjsip.conf.sample index 55a7ef670c..cd6deae5be 100644 --- a/configs/pjsip.conf.sample +++ b/configs/pjsip.conf.sample @@ -389,7 +389,7 @@ ; NAT obstructs the media session (default: ; "no") ;disallow= ; Media Codec s to disallow (default: "") -;dtmfmode=rfc4733 ; DTMF mode (default: "rfc4733") +;dtmf_mode=rfc4733 ; DTMF mode (default: "rfc4733") ;external_media_address= ; IP used for External Media handling (default: ; "") ;force_rport=yes ; Force use of return port (default: "yes") @@ -397,7 +397,7 @@ ;identify_by=username ; Way s for Endpoint to be identified (default: ; "username") ;mailboxes= ; Mailbox es to be associated with (default: "") -;mohsuggest=default ; Default Music On Hold class (default: "default") +;moh_suggest=default ; Default Music On Hold class (default: "default") ;outbound_auth= ; Authentication object used for outbound requests (default: ; "") ;outbound_proxy= ; Proxy through which to send requests (default: "") @@ -429,66 +429,66 @@ ; "no") ;inband_progress=no ; Determines whether chan_pjsip will indicate ringing ; using inband progress (default: "no") -;callgroup= ; The numeric pickup groups for a channel (default: "") -;pickupgroup= ; The numeric pickup groups that a channel can pickup (default: - ; "") -;namedcallgroup= ; The named pickup groups for a channel (default: "") -;namedpickupgroup= ; The named pickup groups that a channel can pickup - ; (default: "") -;devicestate_busy_at=0 ; The number of in use channels which will cause busy +;call_group= ; The numeric pickup groups for a channel (default: "") +;pickup_group= ; The numeric pickup groups that a channel can pickup (default: + ; "") +;named_call_group= ; The named pickup groups for a channel (default: "") +;named_pickup_group= ; The named pickup groups that a channel can pickup + ; (default: "") +;device_state_busy_at=0 ; The number of in use channels which will cause busy ; to be returned as device state (default: "0") -;t38udptl=no ; Whether T 38 UDPTL support is enabled or not (default: "no") -;t38udptl_ec=none ; T 38 UDPTL error correction method (default: "none") -;t38udptl_maxdatagram=0 ; T 38 UDPTL maximum datagram size (default: "0") -;faxdetect=no ; Whether CNG tone detection is enabled (default: "no") -;t38udptl_nat=no ; Whether NAT support is enabled on UDPTL sessions +;t38_udptl=no ; Whether T 38 UDPTL support is enabled or not (default: "no") +;t38_udptl_ec=none ; T 38 UDPTL error correction method (default: "none") +;t38_udptl_maxdatagram=0 ; T 38 UDPTL maximum datagram size (default: "0") +;fax_detect=no ; Whether CNG tone detection is enabled (default: "no") +;t38_udptl_nat=no ; Whether NAT support is enabled on UDPTL sessions ; (default: "no") -;t38udptl_ipv6=no ; Whether IPv6 is used for UDPTL Sessions (default: +;t38_udptl_ipv6=no ; Whether IPv6 is used for UDPTL Sessions (default: ; "no") -;tonezone= ; Set which country s indications to use for channels created +;tone_zone= ; Set which country s indications to use for channels created ; for this endpoint (default: "") ;language= ; Set the default language to use for channels created for this ; endpoint (default: "") ;one_touch_recording=no ; Determines whether one touch recording is allowed for ; this endpoint (default: "no") -;recordonfeature=automixmon ; The feature to enact when one touch recording - ; is turned on (default: "automixmon") -;recordofffeature=automixmon ; The feature to enact when one touch recording - ; is turned off (default: "automixmon") -;rtpengine=asterisk ; Name of the RTP engine to use for channels created - ; for this endpoint (default: "asterisk") -;allowtransfer=yes ; Determines whether SIP REFER transfers are allowed - ; for this endpoint (default: "yes") -;sdpowner=- ; String placed as the username portion of an SDP origin o line - ; (default: "-") -;sdpsession=Asterisk ; String used for the SDP session s line (default: - ; "Asterisk") +;record_on_feature=automixmon ; The feature to enact when one touch recording + ; is turned on (default: "automixmon") +;record_off_feature=automixmon ; The feature to enact when one touch recording + ; is turned off (default: "automixmon") +;rtp_engine=asterisk ; Name of the RTP engine to use for channels created + ; for this endpoint (default: "asterisk") +;allow_transfer=yes ; Determines whether SIP REFER transfers are allowed + ; for this endpoint (default: "yes") +;sdp_owner=- ; String placed as the username portion of an SDP origin o line + ; (default: "-") +;sdp_session=Asterisk ; String used for the SDP session s line (default: + ; "Asterisk") ;tos_audio=0 ; DSCP TOS bits for audio streams (default: "0") ;tos_video=0 ; DSCP TOS bits for video streams (default: "0") ;cos_audio=0 ; Priority for audio streams (default: "0") ;cos_video=0 ; Priority for video streams (default: "0") -;allowsubscribe=yes ; Determines if endpoint is allowed to initiate - ; subscriptions with Asterisk (default: "yes") -;subminexpiry=0 ; The minimum allowed expiry time for subscriptions initiated - ; by the endpoint (default: "0") -;fromuser= ; Username to use in From header for requests to this endpoint - ; (default: "") -;mwifromuser= ; Username to use in From header for unsolicited MWI NOTIFYs to - ; this endpoint (default: "") +;allow_subscribe=yes ; Determines if endpoint is allowed to initiate + ; subscriptions with Asterisk (default: "yes") +;sub_min_expiry=0 ; The minimum allowed expiry time for subscriptions initiated + ; by the endpoint (default: "0") +;from_user= ; Username to use in From header for requests to this endpoint + ; (default: "") +;mwi_from_user= ; Username to use in From header for unsolicited MWI NOTIFYs to + ; this endpoint (default: "") ;fromdomain= ; Domain to user in From header for requests to this endpoint ; (default: "") -;dtlsverify= ; Verify that the provided peer certificate is valid (default: - ; "") -;dtlsrekey= ; Interval at which to renegotiate the TLS session and rekey - ; the SRTP session (default: "") -;dtlscertfile= ; Path to certificate file to present to peer (default: "") -;dtlsprivatekey= ; Path to private key for certificate file (default: +;dtls_verify= ; Verify that the provided peer certificate is valid (default: + ; "") +;dtls_rekey= ; Interval at which to renegotiate the TLS session and rekey + ; the SRTP session (default: "") +;dtls_cert_file= ; Path to certificate file to present to peer (default: "") +;dtls_private_key= ; Path to private key for certificate file (default: ; "") -;dtlscipher= ; Cipher to use for DTLS negotiation (default: "") -;dtlscafile= ; Path to certificate authority certificate (default: "") -;dtlscapath= ; Path to a directory containing certificate authority - ; certificates (default: "") -;dtlssetup= ; Whether we are willing to accept connections connect to the +;dtls_cipher= ; Cipher to use for DTLS negotiation (default: "") +;dtls_ca_file= ; Path to certificate authority certificate (default: "") +;dtls_ca_path= ; Path to a directory containing certificate authority + ; certificates (default: "") +;dtls_setup= ; Whether we are willing to accept connections connect to the ; other party or both (default: "") ;srtp_tag_32=no ; Determines whether 32 byte tags should be used instead of 80 ; byte tags (default: "no") @@ -533,9 +533,9 @@ ;external_signaling_port=0 ; External port for SIP signalling (default: ; "0") ;method= ; Method of SSL transport TLS ONLY (default: "") -;localnet= ; Network to consider local used for NAT purposes (default: "") +;local_net= ; Network to consider local used for NAT purposes (default: "") ;password= ; Password required for transport (default: "") -;privkey_file= ; Private key file TLS ONLY (default: "") +;priv_key_file= ; Private key file TLS ONLY (default: "") ;protocol=udp ; Protocol to use for SIP traffic (default: "udp") ;require_client_cert= ; Require client certificate TLS ONLY (default: "") ;type= ; Must be of type transport (default: "") @@ -579,9 +579,9 @@ ;==========================SYSTEM SECTION OPTIONS========================= ;[system] ; SYNOPSIS: Options that apply to the SIP stack as well as other system-wide settings -;timert1=500 ; Set transaction timer T1 value milliseconds (default: "500") -;timerb=32000 ; Set transaction timer B value milliseconds (default: "32000") -;compactheaders=no ; Use the short forms of common SIP header names +;timer_t1=500 ; Set transaction timer T1 value milliseconds (default: "500") +;timer_b=32000 ; Set transaction timer B value milliseconds (default: "32000") +;compact_headers=no ; Use the short forms of common SIP header names ; (default: "no") ;threadpool_initial_size=0 ; Initial number of threads in the res_pjsip ; threadpool (default: "0") @@ -597,12 +597,12 @@ ;==========================GLOBAL SECTION OPTIONS========================= ;[global] ; SYNOPSIS: Options that apply globally to all SIP communications -;maxforwards=70 ; Value used in Max Forwards header for SIP requests (default: - ; "70") +;max_forwards=70 ; Value used in Max Forwards header for SIP requests (default: + ; "70") ;type= ; Must be of type global (default: "") -;useragent= ; Value used in User Agent header for SIP requests and Server - ; header for SIP responses (default: Populated by Asterisk - ; Version) +;user_agent= ; Value used in User Agent header for SIP requests and Server + ; header for SIP responses (default: Populated by Asterisk + ; Version) @@ -612,9 +612,9 @@ ;[acl] ; SYNOPSIS: Access Control List ;acl= ; Name of IP ACL (default: "") -;contactacl= ; Name of Contact ACL (default: "") -;contactdeny= ; List of Contact Header addresses to Deny (default: "") -;contactpermit= ; List of Contact Header addresses to Permit (default: "") +;contact_acl= ; Name of Contact ACL (default: "") +;contact_deny= ; List of Contact Header addresses to Deny (default: "") +;contact_permit= ; List of Contact Header addresses to Permit (default: "") ;deny= ; List of IP domains to deny access from (default: "") ;permit= ; List of IP domains to allow access from (default: "") ;type= ; Must be of type security (default: "") diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py index 96a9a02ad7..8fdef31a3f 100755 --- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py +++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py @@ -102,6 +102,7 @@ def set_dtmfmode(key, val, section, pjsip, nmapped): Sets the dtmfmode value. If value matches allowable option in pjsip then map it, otherwise set it to none. """ + key = 'dtmf_mode' # available pjsip.conf values: rfc4733, inband, info, none if val == 'inband' or val == 'info': set_value(key, val, section, pjsip, nmapped) @@ -191,6 +192,13 @@ def from_recordfeature(key, val, section, pjsip, nmapped): set_value('one_touch_recording', 'yes', section, pjsip, nmapped) set_value(key, val, section, pjsip, nmapped) +def set_record_on_feature(key, val, section, pjsip, nmapped): + """Sets the record_on_feature in pjsip.conf""" + from_recordfeature('record_on_feature', val, section, pjsip, nmapped) + +def set_record_off_feature(key, val, section, pjsip, nmapped): + """Sets the record_off_feature in pjsip.conf""" + from_recordfeature('record_off_feature', val, section, pjsip, nmapped) def from_progressinband(key, val, section, pjsip, nmapped): """Sets the inband_progress value in pjsip.conf""" @@ -371,7 +379,7 @@ peer_map = [ ['icesupport', set_value('ice_support')], ['autoframing', set_value('use_ptime')], ['outboundproxy', set_value('outbound_proxy')], - ['mohsuggest', set_value], + ['mohsuggest', set_value('moh_suggest')], ['session-timers', set_timers], # timers ['session-minse', set_value('timers_min_se')], ['session-expires', set_value('timers_sess_expires')], @@ -390,42 +398,42 @@ peer_map = [ ['send_diversion', set_value], ['encrpytion', set_media_encryption], ['avpf', set_value('use_avpf')], - ['recordonfeature', from_recordfeature], # automixon - ['recordofffeature', from_recordfeature], # automixon + ['recordonfeature', set_record_on_feature], # automixon + ['recordofffeature', set_record_off_feature], # automixon ['progressinband', from_progressinband], # in_band_progress - ['callgroup', set_value], - ['pickupgroup', set_value], - ['namedcallgroup', set_value], - ['namedpickupgroup', set_value], - ['allowtransfer', set_value], - ['fromuser', set_value], - ['fromdomain', set_value], - ['mwifrom', set_value('mwifromuser')], + ['callgroup', set_value('call_group')], + ['pickupgroup', set_value('pickup_group')], + ['namedcallgroup', set_value('named_call_group')], + ['namedpickupgroup', set_value('named_pickup_group')], + ['allowtransfer', set_value('allow_transfer')], + ['fromuser', set_value('from_user')], + ['fromdomain', set_value('from_domain')], + ['mwifrom', set_value('mwi_from_user')], ['tos_audio', set_value], ['tos_video', set_value], ['cos_audio', set_value], ['cos_video', set_value], - ['sdpowner', set_value], - ['sdpsession', set_value], - ['tonezone', set_value], + ['sdpowner', set_value('sdp_owner')], + ['sdpsession', set_value('sdp_session')], + ['tonezone', set_value('tone_zone')], ['language', set_value], - ['allowsubscribe', set_value], - ['subminexpiry', set_value], - ['rtp_engine', set_value('rtpengine')], + ['allowsubscribe', set_value('allow_subscribe')], + ['subminexpiry', set_value('sub_min_expiry')], + ['rtp_engine', set_value], ['mailbox', from_mailbox], - ['busylevel', set_value('devicestate_busy_at')], + ['busylevel', set_value('device_state_busy_at')], ['secret', setup_auth], ['md5secret', setup_auth], ['type', setup_ident], ['dtlsenable', from_dtlsenable], - ['dtlsverify', set_value], - ['dtlsrekey', set_value], - ['dtlscertfile', set_value], - ['dtlsprivatekey', set_value], - ['dtlscipher', set_value], - ['dtlscafile', set_value], - ['dtlscapath', set_value], - ['dtlssetup', set_value], + ['dtlsverify', set_value('dtls_verify')], + ['dtlsrekey', set_value('dtls_rekey')], + ['dtlscertfile', set_value('dtls_cert_file')], + ['dtlsprivatekey', set_value('dtls_private_key')], + ['dtlscipher', set_value('dtls_cipher')], + ['dtlscafile', set_value('dtls_ca_file')], + ['dtlscapath', set_value('dtls_ca_path')], + ['dtlssetup', set_value('dtls_setup')], ['encryption_taglen', from_encryption_taglen], ############################ maps to an aor ################################### @@ -446,9 +454,9 @@ peer_map = [ ['permit', merge_value(type='acl', section_to='acl')], ['deny', merge_value(type='acl', section_to='acl')], ['acl', merge_value(type='acl', section_to='acl')], - ['contactpermit', merge_value(type='acl', section_to='acl')], - ['contactdeny', merge_value(type='acl', section_to='acl')], - ['contactacl', merge_value(type='acl', section_to='acl')], + ['contactpermit', merge_value('contact_permit', type='acl', section_to='acl')], + ['contactdeny', merge_value('contact_deny', type='acl', section_to='acl')], + ['contactacl', merge_value('contact_acl', type='acl', section_to='acl')], ########################### maps to transport ################################# # type = transport @@ -499,7 +507,7 @@ def add_localnet(section, pjsip, nmapped): the same thing on to every transport. """ try: - merge_value('localnet', sip.get('general', 'localnet')[0], 'general', + merge_value('local_net', sip.get('general', 'localnet')[0], 'general', pjsip, nmapped, 'transport', section) except LookupError: # No localnet options configured. No biggie! @@ -519,7 +527,7 @@ def set_transport_common(section, pjsip, nmapped): """ try: - merge_value('localnet', sip.get('general', 'localnet')[0], 'general', + merge_value('local_net', sip.get('general', 'localnet')[0], 'general', pjsip, nmapped, 'transport', section) except LookupError: # No localnet options configured. Move on. @@ -687,7 +695,7 @@ def set_tls_bindaddr(val, pjsip, nmapped): def set_tls_private_key(val, pjsip, nmapped): """Sets privkey_file based on sip.conf tlsprivatekey or sslprivatekey""" - set_value('privkey_file', val, 'transport-tls', pjsip, nmapped, + set_value('priv_key_file', val, 'transport-tls', pjsip, nmapped, 'transport') diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 3f6fd8c692..cda22a3f55 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -189,7 +189,7 @@ Media Codec(s) to disallow - + DTMF mode This setting allows to choose the DTMF mode for endpoint communication. @@ -247,7 +247,7 @@ Mailbox(es) to be associated with - + Default Music On Hold class @@ -388,49 +388,49 @@ to indicate ringing and will NOT send it as audio. - + The numeric pickup groups for a channel. Can be set to a comma separated list of numbers or ranges between the values of 0-63 (maximum of 64 groups). - + The numeric pickup groups that a channel can pickup. Can be set to a comma separated list of numbers or ranges between the values of 0-63 (maximum of 64 groups). - + The named pickup groups for a channel. Can be set to a comma separated list of case sensitive strings limited by supported line length. - + The named pickup groups that a channel can pickup. Can be set to a comma separated list of case sensitive strings limited by supported line length. - + The number of in-use channels which will cause busy to be returned as device state When the number of in-use channels for the endpoint matches the devicestate_busy_at setting the PJSIP channel driver will return busy as the device state instead of in use. - + Whether T.38 UDPTL support is enabled or not If set to yes T.38 UDPTL support will be enabled, and T.38 negotiation requests will be accepted and relayed. - + T.38 UDPTL error correction method @@ -446,34 +446,34 @@ - + T.38 UDPTL maximum datagram size This option can be set to override the maximum datagram of a remote endpoint for broken endpoints. - + Whether CNG tone detection is enabled This option can be set to send the session to the fax extension when a CNG tone is detected. - + Whether NAT support is enabled on UDPTL sessions When enabled the UDPTL stack will send UDPTL packets to the source address of received packets. - + Whether IPv6 is used for UDPTL Sessions When enabled the UDPTL stack will use IPv6. - + Set which country's indications to use for channels created for this endpoint. @@ -486,7 +486,7 @@ recordofffeature - + The feature to enact when one-touch recording is turned on. When an INFO request for one-touch recording arrives with a Record header set to "on", this @@ -499,7 +499,7 @@ recordofffeature - + The feature to enact when one-touch recording is turned off. When an INFO request for one-touch recording arrives with a Record header set to "off", this @@ -512,16 +512,16 @@ recordonfeature - + Name of the RTP engine to use for channels created for this endpoint - + Determines whether SIP REFER transfers are allowed for this endpoint - + String placed as the username portion of an SDP origin (o=) line. - + String used for the SDP session (s=) line. @@ -548,29 +548,29 @@ See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about QoS settings - + Determines if endpoint is allowed to initiate subscriptions with Asterisk. - + The minimum allowed expiry time for subscriptions initiated by the endpoint. - + Username to use in From header for requests to this endpoint. - + Username to use in From header for unsolicited MWI NOTIFYs to this endpoint. - + Domain to user in From header for requests to this endpoint. - + Verify that the provided peer certificate is valid This option only applies if media_encryption is set to dtls. - + Interval at which to renegotiate the TLS session and rekey the SRTP session This option only applies if media_encryption is @@ -579,21 +579,21 @@ If this is not set or the value provided is 0 rekeying will be disabled. - + Path to certificate file to present to peer This option only applies if media_encryption is set to dtls. - + Path to private key for certificate file This option only applies if media_encryption is set to dtls. - + Cipher to use for DTLS negotiation This option only applies if media_encryption is @@ -603,21 +603,21 @@ http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS - + Path to certificate authority certificate This option only applies if media_encryption is set to dtls. - + Path to a directory containing certificate authority certificates This option only applies if media_encryption is set to dtls. - + Whether we are willing to accept connections, connect to the other party, or both. @@ -767,7 +767,7 @@ - + Network to consider local (used for NAT purposes). This must be in CIDR or dotted decimal format with the IP and mask separated with a slash ('/'). @@ -775,7 +775,7 @@ Password required for transport - + Private key file (TLS ONLY) @@ -952,7 +952,7 @@ before the SIP stack is initialized. The only way to reset these values is to either restart Asterisk, or unload res_pjsip.so and then load it again. - + Set transaction timer T1 value (milliseconds). Timer T1 is the base for determining how long to wait before retransmitting @@ -960,7 +960,7 @@ For more information on this timer, see RFC 3261, Section 17.1.1.1. - + Set transaction timer B value (milliseconds). Timer B determines the maximum amount of time to wait after sending an INVITE @@ -969,7 +969,7 @@ this timer, see RFC 3261, Section 17.1.1.1. - + Use the short forms of common SIP header names. @@ -995,13 +995,13 @@ The settings in this section are global. Unlike options in the system section, these options can be refreshed by performing a reload. - + Value used in Max-Forwards header for SIP requests. Must be of type 'global'. - + Value used in User-Agent header for SIP requests and Server header for SIP responses. diff --git a/res/res_pjsip/config_global.c b/res/res_pjsip/config_global.c index 2b2c021ee2..d883e5d472 100644 --- a/res/res_pjsip/config_global.c +++ b/res/res_pjsip/config_global.c @@ -81,9 +81,9 @@ int ast_sip_initialize_sorcery_global(struct ast_sorcery *sorcery) } ast_sorcery_object_field_register(sorcery, "global", "type", "", OPT_NOOP_T, 0, 0); - ast_sorcery_object_field_register(sorcery, "global", "maxforwards", __stringify(DEFAULT_MAX_FORWARDS), + ast_sorcery_object_field_register(sorcery, "global", "max_forwards", __stringify(DEFAULT_MAX_FORWARDS), OPT_UINT_T, 0, FLDSET(struct global_config, max_forwards)); - ast_sorcery_object_field_register(sorcery, "global", "useragent", default_useragent, + ast_sorcery_object_field_register(sorcery, "global", "user_agent", default_useragent, OPT_STRINGFIELD_T, 0, STRFLDSET(struct global_config, useragent)); return 0; diff --git a/res/res_pjsip/config_system.c b/res/res_pjsip/config_system.c index 01067991ed..5303ddfaee 100644 --- a/res/res_pjsip/config_system.c +++ b/res/res_pjsip/config_system.c @@ -128,11 +128,11 @@ int ast_sip_initialize_system(void) } ast_sorcery_object_field_register(system_sorcery, "system", "type", "", OPT_NOOP_T, 0, 0); - ast_sorcery_object_field_register(system_sorcery, "system", "timert1", __stringify(DEFAULT_TIMER_T1), + ast_sorcery_object_field_register(system_sorcery, "system", "timer_t1", __stringify(DEFAULT_TIMER_T1), OPT_UINT_T, 0, FLDSET(struct system_config, timert1)); - ast_sorcery_object_field_register(system_sorcery, "system", "timerb", __stringify(DEFAULT_TIMER_B), + ast_sorcery_object_field_register(system_sorcery, "system", "timer_b", __stringify(DEFAULT_TIMER_B), OPT_UINT_T, 0, FLDSET(struct system_config, timerb)); - ast_sorcery_object_field_register(system_sorcery, "system", "compactheaders", "no", + ast_sorcery_object_field_register(system_sorcery, "system", "compact_headers", "no", OPT_BOOL_T, 1, FLDSET(struct system_config, compactheaders)); ast_sorcery_object_field_register(system_sorcery, "system", "threadpool_initial_size", "0", OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.initial_size)); diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c index fa5603e542..4ace1821b0 100644 --- a/res/res_pjsip/config_transport.c +++ b/res/res_pjsip/config_transport.c @@ -319,7 +319,7 @@ int ast_sip_initialize_sorcery_transport(struct ast_sorcery *sorcery) ast_sorcery_object_field_register(sorcery, "transport", "async_operations", "1", OPT_UINT_T, 0, FLDSET(struct ast_sip_transport, async_operations)); ast_sorcery_object_field_register(sorcery, "transport", "ca_list_file", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, ca_list_file)); ast_sorcery_object_field_register(sorcery, "transport", "cert_file", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, cert_file)); - ast_sorcery_object_field_register(sorcery, "transport", "privkey_file", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, privkey_file)); + ast_sorcery_object_field_register(sorcery, "transport", "priv_key_file", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, privkey_file)); ast_sorcery_object_field_register(sorcery, "transport", "password", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, password)); ast_sorcery_object_field_register(sorcery, "transport", "external_signaling_address", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_transport, external_signaling_address)); ast_sorcery_object_field_register(sorcery, "transport", "external_signaling_port", "0", OPT_UINT_T, PARSE_IN_RANGE, FLDSET(struct ast_sip_transport, external_signaling_port), 0, 65535); @@ -330,7 +330,7 @@ int ast_sip_initialize_sorcery_transport(struct ast_sorcery *sorcery) ast_sorcery_object_field_register_custom(sorcery, "transport", "require_client_cert", "", transport_tls_bool_handler, NULL, 0, 0); ast_sorcery_object_field_register_custom(sorcery, "transport", "method", "", transport_tls_method_handler, NULL, 0, 0); ast_sorcery_object_field_register_custom(sorcery, "transport", "cipher", "", transport_tls_cipher_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sorcery, "transport", "localnet", "", transport_localnet_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sorcery, "transport", "local_net", "", transport_localnet_handler, NULL, 0, 0); ast_sorcery_object_field_register(sorcery, "transport", "tos", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_transport, tos)); ast_sorcery_object_field_register(sorcery, "transport", "cos", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_transport, cos)); diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 0f98a65ae0..d382fefaf9 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -661,7 +661,7 @@ int ast_res_pjsip_initialize_configuration(void) ast_sorcery_object_field_register(sip_sorcery, "endpoint", "context", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, context)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "disallow", "", OPT_CODEC_T, 0, FLDSET(struct ast_sip_endpoint, media.prefs, media.codecs)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allow", "", OPT_CODEC_T, 1, FLDSET(struct ast_sip_endpoint, media.prefs, media.codecs)); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtmfmode", "rfc4733", dtmf_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtmf_mode", "rfc4733", dtmf_handler, NULL, 0, 0); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtp_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtp.ipv6)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtp_symmetric", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtp.symmetric)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "ice_support", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtp.ice_support)); @@ -670,7 +670,7 @@ int ast_res_pjsip_initialize_configuration(void) ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rewrite_contact", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, nat.rewrite_contact)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "transport", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, transport)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "outbound_proxy", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, outbound_proxy)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mohsuggest", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, mohsuggest)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "moh_suggest", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, mohsuggest)); ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "100rel", "yes", prack_handler, NULL, 0, 0); ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "timers", "yes", timers_handler, NULL, 0, 0); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "timers_min_se", "90", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, extensions.timer.min_se)); @@ -699,42 +699,42 @@ int ast_res_pjsip_initialize_configuration(void) ast_sorcery_object_field_register(sip_sorcery, "endpoint", "use_avpf", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtp.use_avpf)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "one_touch_recording", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, info.recording.enabled)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "inband_progress", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, inband_progress)); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "callgroup", "", group_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "pickupgroup", "", group_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedcallgroup", "", named_groups_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedpickupgroup", "", named_groups_handler, NULL, 0, 0); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "devicestate_busy_at", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, devicestate_busy_at)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.enabled)); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "t38udptl_ec", "none", t38udptl_ec_handler, NULL, 0, 0); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_maxdatagram", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.t38.maxdatagram)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "faxdetect", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, faxdetect)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_nat", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.nat)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.ipv6)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tonezone", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, zone)); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "call_group", "", group_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "pickup_group", "", group_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "named_call_group", "", named_groups_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "named_pickup_group", "", named_groups_handler, NULL, 0, 0); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "device_state_busy_at", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, devicestate_busy_at)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.enabled)); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "t38_udptl_ec", "none", t38udptl_ec_handler, NULL, 0, 0); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_maxdatagram", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.t38.maxdatagram)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fax_detect", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, faxdetect)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_nat", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.nat)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.ipv6)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tone_zone", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, zone)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "language", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, language)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "recordonfeature", "automixmon", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, info.recording.onfeature)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "recordofffeature", "automixmon", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, info.recording.offfeature)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allowtransfer", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, allowtransfer)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "sdpowner", "-", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.sdpowner)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "sdpsession", "Asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.sdpsession)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "record_on_feature", "automixmon", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, info.recording.onfeature)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "record_off_feature", "automixmon", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, info.recording.offfeature)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allow_transfer", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, allowtransfer)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "sdp_owner", "-", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.sdpowner)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "sdp_session", "Asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.sdpsession)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tos_audio", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.tos_audio)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tos_video", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.tos_video)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "cos_audio", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.cos_audio)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "cos_video", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.cos_video)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allowsubscribe", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, subscription.allow)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subminexpiry", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromuser)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromdomain", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromdomain)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mwifromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, subscription.mwi.fromuser)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtpengine", "asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.rtp.engine)); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlsverify", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlsrekey", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlscertfile", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlsprivatekey", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlscipher", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlscafile", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlscapath", "", dtls_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtlssetup", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allow_subscribe", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, subscription.allow)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "sub_min_expiry", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "from_user", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromuser)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "from_domain", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromdomain)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mwi_from_user", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, subscription.mwi.fromuser)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtp_engine", "asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.rtp.engine)); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_verify", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_rekey", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_cert_file", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_private_key", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_cipher", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_ca_file", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_ca_path", "", dtls_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtls_setup", "", dtls_handler, NULL, 0, 0); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "srtp_tag_32", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.rtp.srtp_tag_32)); if (ast_sip_initialize_sorcery_transport(sip_sorcery)) { diff --git a/res/res_pjsip_acl.c b/res/res_pjsip_acl.c index 7046cde5de..8d632ec1f2 100644 --- a/res/res_pjsip_acl.c +++ b/res/res_pjsip_acl.c @@ -63,14 +63,14 @@ defined as a list of comma-delimited section names. - + List of Contact ACL section names in acl.conf This matches sections configured in acl.conf. The value is defined as a list of comma-delimited section names. - + List of Contact header addresses to deny The value is a comma-delimited list of IP addresses. IP addresses may @@ -79,7 +79,7 @@ mask with a slash ('/') - + List of Contact header addresses to permit The value is a comma-delimited list of IP addresses. IP addresses may @@ -281,9 +281,9 @@ static int load_module(void) ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "permit", "", acl_handler, NULL, 0, 0); ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "deny", "", acl_handler, NULL, 0, 0); ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "acl", "", acl_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contactpermit", "", acl_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contactdeny", "", acl_handler, NULL, 0, 0); - ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contactacl", "", acl_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contact_permit", "", acl_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contact_deny", "", acl_handler, NULL, 0, 0); + ast_sorcery_object_field_register_custom(ast_sip_get_sorcery(), SIP_SORCERY_ACL_TYPE, "contact_acl", "", acl_handler, NULL, 0, 0); ast_sip_register_service(&acl_module); return AST_MODULE_LOAD_SUCCESS;