[Home]

Summary:ASTERISK-24986: keepalive INFO packages ignored by asterisk
Reporter:Ilya Trikoz (Awesome)Labels:
Date Opened:2015-04-21 01:03:02Date Closed:2016-05-19 14:48:18
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.2.0 13.3.2 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-25351 SIP INFO not ACK'd by chan_pjsip on Asterisk 13.5.0
Environment:PJSIPAttachments:( 0) asterisk-13.7.2-pjsip_fix_info_reply.patch
Description: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@192.168.53.9:5060 SIP/2.0
Max-Forwards: 69
To: <sip:495XXXXX28@192.168.53.9>;tag=b3769af4-118b-4467-8c95-042247ff1776
From: <sip:8495XXXXX88@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@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}
Comments:By: Matt Jordan (mjordan) 2015-04-24 12:20:01.545-0500

Can you attach the relevant portions of your {{pjsip.conf}}?

By: Ilya Trikoz (Awesome) 2015-04-29 01:26:19.271-0500

added

By: Ilya Trikoz (Awesome) 2015-05-08 14:11:28.319-0500

https://www.ietf.org/rfc/rfc2976.txt

2.2 Responses to the INFO Request Method

If a server receives an INFO request it MUST send a final response.
A 200 OK response MUST be sent by a UAS for an INFO request with no message body if the INFO request was successfully received for an existing call.  Beyond that, no additional operations are required.

By: Ilya Trikoz (Awesome) 2015-07-21 02:37:53.597-0500

any news about issues? maybe some one could make a quick patch to send act "OK" on that INFO package?

By: Joshua C. Colp (jcolp) 2015-07-21 05:22:40.730-0500

Any updates will be posted to this issue. Since there have been no updates there are none currently.

By: Shaun Moberg (shauberg) 2016-02-15 14:23:25.503-0600

I am seeing the same behavior with Asterisk 13.7.2, is there a possible work around besides switching to chan_SIP?

By: Federico Santulli (fsantulli) 2016-03-15 18:40:59.284-0500

Any news about this issue? this is really annoying as our provider's sbc is shutting down our calls within few minutes. Could you provide a patch?

By: Joshua C. Colp (jcolp) 2016-03-15 19:09:19.489-0500

As I previously stated any updates will be posted to this issue. Noone has written a patch as of this time.

By: Federico Santulli (fsantulli) 2016-03-16 15:30:32.736-0500

Here is the fix :)

By: Federico Santulli (fsantulli) 2016-03-23 03:22:09.756-0500

Has anyone reviewed the patch i've submitted ?

By: Joshua C. Colp (jcolp) 2016-03-23 05:28:29.794-0500

All code review happens on Gerrit[1]. If you follow the process and get it up there then it will be reviewed, otherwise someone else has to take it through the process on you behalf.

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

By: snuffy (snuffy) 2016-04-09 20:52:46.650-0500

I struck the same issue as described by the original poster.

Using the patch attached, I confirmed it now sends ACK to the INFO packets as expected by my ITSP.

If the original poster does not want to do the gerrit posting etc, I can take it up.


By: Federico Santulli (fsantulli) 2016-04-10 07:41:12.482-0500

Hello snuffy, there is no problem for me if you put on gerrit the patch. Please proceed.