[asterisk-bugs] [JIRA] (ASTERISK-27032) disable retrieve ca_list_file fields when transport!=tls for realtime
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Wed Jun 7 10:37:57 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-27032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237329#comment-237329 ]
Richard Mudgett edited comment on ASTERISK-27032 at 6/7/17 10:36 AM:
---------------------------------------------------------------------
hi:
extconfig.conf:
{noformat}
pjsip.conf => sqlite3,pjsipconf,ast_config
pjsip_notify.conf => sqlite3,pjsipnotifyconf,ast_config
pjproject.conf => sqlite3,pjprojectconf,ast_config
ps_systems => sqlite3,ps_systems,ps_systems
ps_globals => sqlite3,ps_globals,ps_globals
ps_transports => sqlite3,ps_transports,ps_transports
ps_endpoints => sqlite3,ps_endpoints,ps_endpoints
ps_auths => sqlite3,ps_auths,ps_auths
ps_aors => sqlite3,ps_aors,ps_aors
ps_domain_aliases => sqlite3,ps_domain_aliases,ps_domain_aliases
ps_contacts => sqlite3,ps_contacts,ps_contacts
ps_endpoint_id_ips => sqlite3,ps_endpoint_id_ips,ps_endpoint_id_ips
ps_registrations => sqlite3,ps_registrations,ps_registrations
ps_subscription_persistence => sqlite3,ps_subscription_persistence,ps_subscription_persistence
sorcery.conf => sqlite3,sorceryconf,ast_config
{noformat}
res_config_sqlit3.conf:
{noformat}
;ps_transports => sqlite3,ps_transports,ps_transports
[ps_transports]
dbfile => /etc/ps_transports.realtime
;debug=yes
requirements=warn
batch=0s
[sorceryconf]
dbfile => /etc/opmanage/sorcery_conf.realtime
;debug=yes
requirements=warn
batch=0
{noformat}
pjsip transport configration in sqlite3:
{noformat}
sqlite> .tables
ps_transports
sqlite> .schema ps_transports
CREATE TABLE ps_transports (id TEXT CHECK( LENGTH(id) <= 40 ) UNIQUE NOT NULL,async_operations INTEGER,bind TEXT CHECK( LENGTH(bind) <= 40 ),ca_list_file TEXT CHECK( LENGTH(ca_list_file) <= 200 ),cert_file TEXT CHECK( LENGTH(cert_file) <= 200 ),cipher TEXT CHECK( LENGTH(cipher) <= 200 ),domain TEXT CHECK( LENGTH(domain) <= 40 ),external_media_address TEXT CHECK( LENGTH(external_media_address) <= 40 ),external_signaling_address TEXT CHECK( LENGTH(external_signaling_address) <= 40 ),external_signaling_port INTEGER,method TEXT CHECK( LENGTH(method) <= 10 ),local_net TEXT CHECK( LENGTH(local_net) <= 40 ),password TEXT CHECK( LENGTH(password) <= 40 ),priv_key_file TEXT CHECK( LENGTH(priv_key_file) <= 200 ),protocol TEXT CHECK( LENGTH(protocol) <= 10 ),require_client_cert TEXT CHECK( LENGTH(require_client_cert) <= 10 ),verify_client TEXT CHECK( LENGTH(verify_client) <= 10 ),verify_server TEXT CHECK( LENGTH(verify_server) <= 10 ) NULL,tos TEXT CHECK( LENGTH(tos) <= 10 ) NULL,cos INTEGER,allow_reload TEXT CHECK( LENGTH(allow_reload) <= 10 ),symmetric_transport TEXT CHECK( LENGTH(symmetric_transport) <= 10 ));
CREATE INDEX ps_transports_id ON ps_transports (id);
sqlite> select * from ps_transports;
transport-udp|1|0.0.0.0|||||||0|default||||udp|no|no|no|cs3|3|no|no
transport-tcp|1|0.0.0.0|||||||0|default||||tcp|no|no|no|cs3|3|no|no
sqlite>
{noformat}
sorcery.conf in sqlite3
{noformat}
sqlite> .tables
ast_config
sqlite> .schema ast_config
CREATE TABLE ast_config ( id INTEGER PRIMARY KEY AUTOINCREMENT , cat_metric INTEGER, var_metric INTEGER, commented INTEGER, filename VARCHAR(80), category VARCHAR(80), var_name VARCHAR(80), var_val VARCHAR(320));
sqlite>
sqlite>
sqlite> select * from ast_config;
1|0|1|0|sorcery.conf|res_pjsip|endpoint|realtime,ps_endpoints
2|0|2|0|sorcery.conf|res_pjsip|auth|realtime,ps_auths
3|0|3|0|sorcery.conf|res_pjsip|aor|realtime,ps_aors
4|0|4|0|sorcery.conf|res_pjsip|domain_alias|realtime,ps_domain_aliases
5|0|5|0|sorcery.conf|res_pjsip|contact|realtime,ps_contacts
6|0|6|0|sorcery.conf|res_pjsip|transport|realtime,ps_transports
7|0|7|0|sorcery.conf|res_pjsip|system|realtime,ps_systems
8|0|8|0|sorcery.conf|res_pjsip|global|realtime,ps_globals
9|1|1|0|sorcery.conf|res_pjsip_endpoint_identifier_ip|identify|realtime,ps_endpoint_id_ips
10|2|1|0|sorcery.conf|res_pjsip_outbound_registration|registration|realtime,ps_registrations
sqlite>
{noformat}
asterisk load log:
{noformat}
*CLI> pjsip show transports
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 65535] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3689 ast_parse_arg: extract int from [100] in [1, 2147483647] gives [100](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] ERROR[5463]: res_pjsip/config_transport.c:666 transport_tls_file_handler: Transport: transport-udp: ca_list_file is either missing or not readable
[Jun 7 10:59:02] ERROR[5463]: config_options.c:738 aco_process_var: Error parsing ca_list_file=test1 at line 0 of
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 65535] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3689 ast_parse_arg: extract int from [100] in [1, 2147483647] gives [100](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] ERROR[5463]: res_pjsip/config_transport.c:666 transport_tls_file_handler: Transport: transport-tcp: ca_list_file is either missing or not readable
[Jun 7 10:59:02] ERROR[5463]: config_options.c:738 aco_process_var: Error parsing ca_list_file= at line 0 of
No objects found.
{noformat}
was (Author: seanchann):
hi:
extconfig.conf:
pjsip.conf => sqlite3,pjsipconf,ast_config
pjsip_notify.conf => sqlite3,pjsipnotifyconf,ast_config
pjproject.conf => sqlite3,pjprojectconf,ast_config
ps_systems => sqlite3,ps_systems,ps_systems
ps_globals => sqlite3,ps_globals,ps_globals
ps_transports => sqlite3,ps_transports,ps_transports
ps_endpoints => sqlite3,ps_endpoints,ps_endpoints
ps_auths => sqlite3,ps_auths,ps_auths
ps_aors => sqlite3,ps_aors,ps_aors
ps_domain_aliases => sqlite3,ps_domain_aliases,ps_domain_aliases
ps_contacts => sqlite3,ps_contacts,ps_contacts
ps_endpoint_id_ips => sqlite3,ps_endpoint_id_ips,ps_endpoint_id_ips
ps_registrations => sqlite3,ps_registrations,ps_registrations
ps_subscription_persistence => sqlite3,ps_subscription_persistence,ps_subscription_persistence
sorcery.conf => sqlite3,sorceryconf,ast_config
res_config_sqlit3.conf:
;ps_transports => sqlite3,ps_transports,ps_transports
[ps_transports]
dbfile => /etc/ps_transports.realtime
;debug=yes
requirements=warn
batch=0s
[sorceryconf]
dbfile => /etc/opmanage/sorcery_conf.realtime
;debug=yes
requirements=warn
batch=0
pjsip transport configration in sqlite3:
sqlite> .tables
ps_transports
sqlite> .schema ps_transports
CREATE TABLE ps_transports (id TEXT CHECK( LENGTH(id) <= 40 ) UNIQUE NOT NULL,async_operations INTEGER,bind TEXT CHECK( LENGTH(bind) <= 40 ),ca_list_file TEXT CHECK( LENGTH(ca_list_file) <= 200 ),cert_file TEXT CHECK( LENGTH(cert_file) <= 200 ),cipher TEXT CHECK( LENGTH(cipher) <= 200 ),domain TEXT CHECK( LENGTH(domain) <= 40 ),external_media_address TEXT CHECK( LENGTH(external_media_address) <= 40 ),external_signaling_address TEXT CHECK( LENGTH(external_signaling_address) <= 40 ),external_signaling_port INTEGER,method TEXT CHECK( LENGTH(method) <= 10 ),local_net TEXT CHECK( LENGTH(local_net) <= 40 ),password TEXT CHECK( LENGTH(password) <= 40 ),priv_key_file TEXT CHECK( LENGTH(priv_key_file) <= 200 ),protocol TEXT CHECK( LENGTH(protocol) <= 10 ),require_client_cert TEXT CHECK( LENGTH(require_client_cert) <= 10 ),verify_client TEXT CHECK( LENGTH(verify_client) <= 10 ),verify_server TEXT CHECK( LENGTH(verify_server) <= 10 ) NULL,tos TEXT CHECK( LENGTH(tos) <= 10 ) NULL,cos INTEGER,allow_reload TEXT CHECK( LENGTH(allow_reload) <= 10 ),symmetric_transport TEXT CHECK( LENGTH(symmetric_transport) <= 10 ));
CREATE INDEX ps_transports_id ON ps_transports (id);
sqlite> select * from ps_transports;
transport-udp|1|0.0.0.0|||||||0|default||||udp|no|no|no|cs3|3|no|no
transport-tcp|1|0.0.0.0|||||||0|default||||tcp|no|no|no|cs3|3|no|no
sqlite>
sorcery.conf in sqlite3
sqlite> .tables
ast_config
sqlite> .schema ast_config
CREATE TABLE ast_config ( id INTEGER PRIMARY KEY AUTOINCREMENT , cat_metric INTEGER, var_metric INTEGER, commented INTEGER, filename VARCHAR(80), category VARCHAR(80), var_name VARCHAR(80), var_val VARCHAR(320));
sqlite>
sqlite>
sqlite> select * from ast_config;
1|0|1|0|sorcery.conf|res_pjsip|endpoint|realtime,ps_endpoints
2|0|2|0|sorcery.conf|res_pjsip|auth|realtime,ps_auths
3|0|3|0|sorcery.conf|res_pjsip|aor|realtime,ps_aors
4|0|4|0|sorcery.conf|res_pjsip|domain_alias|realtime,ps_domain_aliases
5|0|5|0|sorcery.conf|res_pjsip|contact|realtime,ps_contacts
6|0|6|0|sorcery.conf|res_pjsip|transport|realtime,ps_transports
7|0|7|0|sorcery.conf|res_pjsip|system|realtime,ps_systems
8|0|8|0|sorcery.conf|res_pjsip|global|realtime,ps_globals
9|1|1|0|sorcery.conf|res_pjsip_endpoint_identifier_ip|identify|realtime,ps_endpoint_id_ips
10|2|1|0|sorcery.conf|res_pjsip_outbound_registration|registration|realtime,ps_registrations
sqlite>
asterisk load log:
*CLI> pjsip show transports
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 65535] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3689 ast_parse_arg: extract int from [100] in [1, 2147483647] gives [100](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] ERROR[5463]: res_pjsip/config_transport.c:666 transport_tls_file_handler: Transport: transport-udp: ca_list_file is either missing or not readable
[Jun 7 10:59:02] ERROR[5463]: config_options.c:738 aco_process_var: Error parsing ca_list_file=test1 at line 0 of
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 65535] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3689 ast_parse_arg: extract int from [100] in [1, 2147483647] gives [100](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[Jun 7 10:59:02] DEBUG[5463]: config.c:3742 ast_parse_arg: extract uint from [1] in [0, 4294967295] gives [1](0)
[Jun 7 10:59:02] ERROR[5463]: res_pjsip/config_transport.c:666 transport_tls_file_handler: Transport: transport-tcp: ca_list_file is either missing or not readable
[Jun 7 10:59:02] ERROR[5463]: config_options.c:738 aco_process_var: Error parsing ca_list_file= at line 0 of
No objects found.
> disable retrieve ca_list_file fields when transport!=tls for realtime
> ---------------------------------------------------------------------
>
> Key: ASTERISK-27032
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27032
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 13.15.1
> Environment: openwrt
> Reporter: seanchann.zhou
> Assignee: Unassigned
> Severity: Minor
>
> Hi:
> in file config_transport.c line 661:
> If there is no configuration value, loading the entire module will exit. But if the current protocol value is not tls, Then it is not necessary to have these values
> I bind sorcery with realtime for ps_transports.
> if check current protocol value, only process tls type.
> Look at the following code snippet
> ```
> if(transport->type != AST_TRANSPORT_TLS){
> return 0;
> }
> ```
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list