[asterisk-bugs] [JIRA] (ASTERISK-26583) res_pjsip: When using transports in MariaDB table via ODBC; traffic from Asterisk is not seen on the network.

Ilgiz Badamshin (JIRA) noreply at issues.asterisk.org
Mon Jan 22 07:26:49 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241684#comment-241684 ] 

Ilgiz Badamshin commented on ASTERISK-26583:
--------------------------------------------

Hi. 
I have same problems with asterisk 14.7.2, 14.7.5 behind nat.
Bug with external_media_address, external_signaling_address, external_signaling_port.
If transport settings set in pjsip.conf all ok.
When settings moved in to database (pgsql), then responses from asterisk are losts. 
Example with failed registration. 
1. Asterisk received "Register" from softphone (twinkle)
2. Asterisk transmitting "Unauthorized" - visible in console with pjs sip debug, but not in tcpdump, wireshark and no handled by softphone. 
3. Softphone send "Register" again, because no responses to previos request.
4. Asterisk transmitting "Unauthorized" and it lost again.

Tryed to digging. 
File: res_pjsip_nat.c
Method: {code} static int find_transport_state_in_use(void *obj, void *arg, int flags)  {code} 
Return 0, so method nat_on_tx_message return with PJ_SUCCESS, but without sending response to net:
{code}
	if (!(transport_state = ao2_callback(transport_states, 0, find_transport_state_in_use, &details))) {
		return PJ_SUCCESS;
	}
{code}

Is it will be fixed or i should not use transport in realtime?
Thanks.


> res_pjsip: When using transports in MariaDB table via ODBC; traffic from Asterisk is not seen on the network.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26583
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26583
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Sorcery, Resources/res_pjsip
>    Affects Versions: 13.9.1, 13.12.0, 13.11.1, 13.12.2, 14.1.1
>         Environment: Centos 7.2.1511
> kernel 3.10.0-327.36.3.el7
>            Reporter: Jeff Clay
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: ast_2016.sh, extconfig_conf.txt, pjsip_cli_debug.txt, ps_endpoints.txt, tcpdump.txt
>
>
> When using pjsip transports in mariadb table via odbc traffic from asterisk is not seen on the network. For example, when a phone attempts to register, the registration request is seen in pjsip debug as well as a tcpdump; then when asterisk replies with the 401 auth challenge that is only seen in the pjsip debug and is not seen in a tcpdump and the endpoint never receives the challenge. 
> Using transports within pjsip.conf works properly with the exact same transport settings that were failing when used in database.
> Full configs, db tables, tcpdump and debug logs below.
> *config files*
> {code:title=sorcery.conf}
> [res_pjsip]
> endpoint=realtime,ps_endpoints
> auth=realtime,ps_auths
> transport=realtime,ps_transports
> aor=realtime,ps_aors
> domain_alias=realtime,ps_domain_aliases
> [res_pjsip_endpoint_identifier_ip]
> identify=realtime,ps_endpoint_id_ips
> system=realtime,ps_systems
> {code}
> [Edit by Rusty - Moved extconfig to attachments]
> *database tables*
> {code:title=ps_aors}
> INSERT INTO `ps_aors` (`id`, `contact`, `default_expiration`, `mailboxes`, `max_contacts`, `minimum_expiration`, `remove_existing`, `qualify_frequency`, `authenticate_qualify`, `maximum_expiration`, `outbound_proxy`, `support_path`, `qualify_timeout`, `voicemail_extension`)
> VALUES
> 	('1506', NULL, NULL, NULL, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
> {code}
> {code:title=ps_auths}
> INSERT INTO `ps_auths` (`id`, `auth_type`, `nonce_lifetime`, `md5_cred`, `password`, `realm`, `username`)
> VALUES
> 	('phone', 'userpass', NULL, NULL, 'pass', NULL, '1506');
> {code}
> [Edit by Rusty - Moved ps_endpoints data to attachments]
> {code:title=ps_transports}
> INSERT INTO `ps_transports` (`id`, `async_operations`, `bind`, `ca_list_file`, `cert_file`, `cipher`, `domain`, `external_media_address`, `external_signaling_address`, `external_signaling_port`, `method`, `local_net`, `password`, `priv_key_file`, `protocol`, `require_client_cert`, `verify_client`, `verify_server`, `tos`, `cos`, `allow_reload`)
> VALUES
> 	('nat_udp', NULL, '0.0.0.0', NULL, NULL, NULL, NULL, '104.197.69.7', '104.197.69.7', NULL, NULL, '10.128.0.0/20', NULL, NULL, 'udp', NULL, NULL, NULL, NULL, NULL, 'yes');
> {code}
> *DEBUG*
> You can see here that asterisk receives the register request and sends the auth challenge.
> [Edit by Rusty - moved to attachments]
> And you can see here that the auth challenge sent by Asterisk is never actually seen on the network.
> [Edit by Rusty - moved to attachments]



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list