[asterisk-bugs] [JIRA] (ASTERISK-24986) keepalive INFO packages ignored by asterisk

Federico Santulli (JIRA) noreply at issues.asterisk.org
Wed Mar 16 15:31:56 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Federico Santulli updated ASTERISK-24986:
-----------------------------------------

    Attachment: asterisk-13.7.2-pjsip_fix_info_reply.patch

Here is the fix :)

> keepalive INFO packages ignored by asterisk
> -------------------------------------------
>
>                 Key: ASTERISK-24986
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24986
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 13.2.0, 13.3.2
>         Environment: PJSIP
>            Reporter: Ilya Trikoz
>         Attachments: asterisk-13.7.2-pjsip_fix_info_reply.patch
>
>
> Our voip provider uses INFO package as keepalive mechanism,
> asterisk just ignoring this Package, when asterisk ignore 10 packages in a row - provider sends BYE and call drops.
> here is the package
> {noformat}
> <--- Received SIP request (555 bytes) from UDP:192.168.53.1:5060 --->
> INFO sip:c2e74184-4d23-43a3-8fd9-26ba2c5ef6c9 at 192.168.53.9:5060 SIP/2.0
> Max-Forwards: 69
> To: <sip:495XXXXX28 at 192.168.53.9>;tag=b3769af4-118b-4467-8c95-042247ff1776
> From: <sip:8495XXXXX88 at 192.168.53.1>;tag=3638518512-132845
> Call-ID: cfe34652-14c2-4072-9dea-f0b0c30cb15e
> CSeq: 2 INFO
> Allow: CANCEL, ACK, INVITE, BYE, OPTIONS, REGISTER, NOTIFY, INFO, REFER, SUBSCRIBE, PRACK, UPDATE, MESSAGE, PUBLISH
> Via: SIP/2.0/UDP 192.168.53.1:5060;branch=z9hG4bK8da58cede20b91eb54dec15ad27f866c
> Contact: <sip:8495XXXXX88 at 192.168.53.1:5060>
> Content-Length: 0
> {noformat}
> {noformat}
> pjsip.conf
> [udp_B]
> type=transport
> protocol=udp
> bind=192.168.53.9
> [tls]
> type=transport
> ca_list_file=/pbx/keys/ca.crt
> cert_file=/pbx/keys/asterisk.crt
> priv_key_file=/pbx/keys/asterisk.key
> method=sslv23
> protocol=tls
> bind=192.168.1.4:5061
> local_net=192.168.1.0/24
> external_media_address=195.239.8.122
> external_signaling_address=195.239.8.122
> [udp]
> type=transport
> protocol=udp
> bind=192.168.1.4
> local_net=10.0.0.0/24
> local_net=10.0.1.0/24
> local_net=192.168.1.0/24
> external_media_address=195.239.8.122
> external_signaling_address=195.239.8.122
> {noformat}
> endpoints.sql
> {noformat}
> DROP TABLE IF EXISTS `pbx_endpoints`;
> CREATE TABLE `pbx_endpoints` (
>   `id` varchar(40) NOT NULL,
>   `transport` varchar(40) DEFAULT 'udp',
>   `aors` varchar(200) DEFAULT NULL,
>   `auth` varchar(40) DEFAULT NULL,
>   `outbound_auth` varchar(40) DEFAULT NULL,
>   `context` varchar(40) DEFAULT 'dialmap',
>   `disallow` varchar(200) DEFAULT 'all',
>   `allow` varchar(200) DEFAULT 'g722,ulaw,alaw',
>   `ice_support` enum('yes','no') DEFAULT NULL,
>   `call_group` varchar(40) DEFAULT NULL,
>   `pickup_group` varchar(40) DEFAULT NULL,
>   `rewrite_contact` enum('yes','no') DEFAULT NULL,
>   `direct_media` enum('yes','no') DEFAULT 'no',
>   `media_encryption` enum('no','sdes','dtls') DEFAULT NULL,
>   `dtmf_mode` enum('rfc4733','inband','info') DEFAULT NULL,
>   `language` varchar(40) DEFAULT NULL,
>   `from_user` varchar(40) DEFAULT NULL,
>   `callerid` varchar(40) DEFAULT NULL,
>   `force_rport` enum('yes','no') DEFAULT NULL,
>   `connected_line_method` enum('invite','reinvite','update') DEFAULT NULL,
>   `direct_media_method` enum('invite','reinvite','update') DEFAULT NULL,
>   `direct_media_glare_mitigation` enum('none','outgoing','incoming') DEFAULT NULL,
>   `disable_direct_media_on_nat` enum('yes','no') DEFAULT NULL,
>   `external_media_address` varchar(40) DEFAULT NULL,
>   `identify_by` enum('username') DEFAULT NULL,
>   `mailboxes` varchar(40) DEFAULT NULL,
>   `moh_suggest` varchar(40) DEFAULT NULL,
>   `outbound_proxy` varchar(40) DEFAULT NULL,
>   `rtp_ipv6` enum('yes','no') DEFAULT NULL,
>   `rtp_symmetric` enum('yes','no') DEFAULT NULL,
>   `send_diversion` enum('yes','no') DEFAULT NULL,
>   `send_pai` enum('yes','no') DEFAULT NULL,
>   `send_rpid` enum('yes','no') DEFAULT NULL,
>   `timers_min_se` int(11) DEFAULT NULL,
>   `timers` enum('forced','no','required','yes') DEFAULT NULL,
>   `timers_sess_expires` int(11) DEFAULT NULL,
>   `callerid_privacy` enum('allowed_not_screened','allowed_passed_screened','allowed_failed_screened','allowed','prohib_not_screened','prohib_passed_screened','prohib_failed_screened','prohib','unavailable') DEFAULT NULL,
>   `callerid_tag` varchar(40) DEFAULT NULL,
>   `100rel` enum('no','required','yes') DEFAULT NULL,
>   `aggregate_mwi` enum('yes','no') DEFAULT NULL,
>   `trust_id_inbound` enum('yes','no') DEFAULT NULL,
>   `trust_id_outbound` enum('yes','no') DEFAULT NULL,
>   `use_ptime` enum('yes','no') DEFAULT NULL,
>   `use_avpf` enum('yes','no') DEFAULT NULL,
>   `inband_progress` enum('yes','no') DEFAULT NULL,
>   `named_call_group` varchar(40) DEFAULT NULL,
>   `named_pickup_group` varchar(40) DEFAULT NULL,
>   `device_state_busy_at` int(11) DEFAULT NULL,
>   `fax_detect` enum('yes','no') DEFAULT NULL,
>   `t38_udptl` enum('yes','no') DEFAULT NULL,
>   `t38_udptl_ec` enum('none','fec','redundancy') DEFAULT NULL,
>   `t38_udptl_maxdatagram` int(11) DEFAULT NULL,
>   `t38_udptl_nat` enum('yes','no') DEFAULT NULL,
>   `t38_udptl_ipv6` enum('yes','no') DEFAULT NULL,
>   `tone_zone` varchar(40) DEFAULT NULL,
>   `one_touch_recording` enum('yes','no') DEFAULT NULL,
>   `record_on_feature` varchar(40) DEFAULT NULL,
>   `record_off_feature` varchar(40) DEFAULT NULL,
>   `rtp_engine` varchar(40) DEFAULT NULL,
>   `allow_transfer` enum('yes','no') DEFAULT NULL,
>   `allow_subscribe` enum('yes','no') DEFAULT NULL,
>   `sdp_owner` varchar(40) DEFAULT NULL,
>   `sdp_session` varchar(40) DEFAULT NULL,
>   `tos_audio` varchar(10) DEFAULT NULL,
>   `tos_video` varchar(10) DEFAULT NULL,
>   `sub_min_expiry` int(11) DEFAULT NULL,
>   `from_domain` varchar(40) DEFAULT NULL,
>   `mwi_from_user` varchar(40) DEFAULT NULL,
>   `dtls_verify` varchar(40) DEFAULT NULL,
>   `dtls_rekey` varchar(40) DEFAULT NULL,
>   `dtls_cert_file` varchar(200) DEFAULT NULL,
>   `dtls_private_key` varchar(200) DEFAULT NULL,
>   `dtls_cipher` varchar(200) DEFAULT NULL,
>   `dtls_ca_file` varchar(200) DEFAULT NULL,
>   `dtls_ca_path` varchar(200) DEFAULT NULL,
>   `dtls_setup` enum('active','passive','actpass') DEFAULT NULL,
>   `srtp_tag_32` enum('yes','no') DEFAULT NULL,
>   `media_address` varchar(40) DEFAULT NULL,
>   `redirect_method` enum('user','uri_core','uri_pjsip') DEFAULT NULL,
>   `set_var` text,
>   `cos_audio` int(11) DEFAULT NULL,
>   `cos_video` int(11) DEFAULT NULL,
>   `message_context` varchar(40) DEFAULT NULL,
>   UNIQUE KEY `id` (`id`),
>   KEY `ps_endpoints_id` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> LOCK TABLES `pbx_endpoints` WRITE;
> /*!40000 ALTER TABLE `pbx_endpoints` DISABLE KEYS */;
> INSERT INTO `pbx_endpoints` (`id`, `transport`, `aors`, `auth`, `outbound_auth`, `context`, `disallow`, `allow`, `ice_support`, `call_group`, `pickup_group`, `rewrite_contact`, `direct_media`, `media_encryption`, `dtmf_mode`, `language`, `from_user`, `callerid`, `force_rport`, `connected_line_method`, `direct_media_method`, `direct_media_glare_mitigation`, `disable_direct_media_on_nat`, `external_media_address`, `identify_by`, `mailboxes`, `moh_suggest`, `outbound_proxy`, `rtp_ipv6`, `rtp_symmetric`, `send_diversion`, `send_pai`, `send_rpid`, `timers_min_se`, `timers`, `timers_sess_expires`, `callerid_privacy`, `callerid_tag`, `100rel`, `aggregate_mwi`, `trust_id_inbound`, `trust_id_outbound`, `use_ptime`, `use_avpf`, `inband_progress`, `named_call_group`, `named_pickup_group`, `device_state_busy_at`, `fax_detect`, `t38_udptl`, `t38_udptl_ec`, `t38_udptl_maxdatagram`, `t38_udptl_nat`, `t38_udptl_ipv6`, `tone_zone`, `one_touch_recording`, `record_on_feature`, `record_off_feature`, `rtp_engine`, `allow_transfer`, `allow_subscribe`, `sdp_owner`, `sdp_session`, `tos_audio`, `tos_video`, `sub_min_expiry`, `from_domain`, `mwi_from_user`, `dtls_verify`, `dtls_rekey`, `dtls_cert_file`, `dtls_private_key`, `dtls_cipher`, `dtls_ca_file`, `dtls_ca_path`, `dtls_setup`, `srtp_tag_32`, `media_address`, `redirect_method`, `set_var`, `cos_audio`, `cos_video`, `message_context`)
> VALUES
>   ('10000','udp_B','10000',NULL,NULL,'dialmap','all','alaw,ulaw','no',NULL,NULL,NULL,NULL,NULL,NULL,'ru','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
> /*!40000 ALTER TABLE `pbx_endpoints` ENABLE KEYS */;
> UNLOCK TABLES;
> /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
> /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
> /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
> /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
> /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
> {noformat}
> aors.sql
> {noformat}
> DROP TABLE IF EXISTS `pbx_aors`;
> CREATE TABLE `pbx_aors` (
>   `id` varchar(40) NOT NULL,
>   `contact` varchar(40) DEFAULT NULL,
>   `default_expiration` int(11) DEFAULT NULL,
>   `mailboxes` varchar(80) DEFAULT NULL,
>   `max_contacts` int(11) DEFAULT NULL,
>   `minimum_expiration` int(11) DEFAULT NULL,
>   `remove_existing` enum('yes','no') DEFAULT NULL,
>   `qualify_frequency` int(11) DEFAULT NULL,
>   `authenticate_qualify` enum('yes','no') DEFAULT NULL,
>   `maximum_expiration` int(11) DEFAULT NULL,
>   `outbound_proxy` varchar(40) DEFAULT NULL,
>   `support_path` enum('yes','no') DEFAULT NULL,
>   UNIQUE KEY `id` (`id`),
>   KEY `ps_aors_id` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> LOCK TABLES `pbx_aors` WRITE;
> /*!40000 ALTER TABLE `pbx_aors` DISABLE KEYS */;
> INSERT INTO `pbx_aors` (`id`, `contact`, `default_expiration`, `mailboxes`, `max_contacts`, `minimum_expiration`, `remove_existing`, `qualify_frequency`, `authenticate_qualify`, `maximum_expiration`, `outbound_proxy`, `support_path`)
> VALUES
> 	('10000','sip:192.168.53.1:5060',NULL,NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
> 	('99','',NULL,'99',4,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
> /*!40000 ALTER TABLE `pbx_aors` ENABLE KEYS */;
> UNLOCK TABLES;
> /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
> /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
> /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
> /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
> /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
> ps_endpoint_id_ips.sql
> DROP TABLE IF EXISTS `ps_endpoint_id_ips`;
> CREATE TABLE `ps_endpoint_id_ips` (
>   `id` varchar(40) NOT NULL,
>   `endpoint` varchar(40) DEFAULT NULL,
>   `match` varchar(80) DEFAULT NULL,
>   UNIQUE KEY `id` (`id`),
>   KEY `ps_endpoint_id_ips_id` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> LOCK TABLES `ps_endpoint_id_ips` WRITE;
> /*!40000 ALTER TABLE `ps_endpoint_id_ips` DISABLE KEYS */;
> INSERT INTO `ps_endpoint_id_ips` (`id`, `endpoint`, `match`)
> VALUES
> 	('10000','10000','192.168.53.1');
> /*!40000 ALTER TABLE `ps_endpoint_id_ips` ENABLE KEYS */;
> UNLOCK TABLES;
> /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
> /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
> /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
> /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
> /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
> {noformat}



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



More information about the asterisk-bugs mailing list