[Home]

Summary:ASTERISK-23807: PJSip dynamic realtime registrations - ps_registrations shouldn't exist
Reporter:Ilya Trikoz (Awesome)Labels:
Date Opened:2014-05-30 00:39:05Date Closed:2014-11-15 11:46:39.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:12.3.0 Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-24514 res_pjsip_outbound_registration: stack overflow when using non-default sorcery wizard
Environment:Attachments:
Description:[Edit by Rusty Newton - from talking with developers, it sounds like ps_registrations for dynamic realtime isn't expected to work. It should be investigated why it exists in the first place]

ps_registrations seems like ignoring by chan_pjsip
no registration attempts.

extconfig:
[settings]
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_registrations => odbc,asterisk
ps_contacts => odbc,asterisk

sorcery:
[res_pjsip]
endpoint= realtime,ps_endpoints
auth= realtime,ps_auths
aor= realtime,ps_aors
domain_alias= realtime,ps_domain_aliases
identify= realtime,ps_endpoint_id_ips
registration= realtime,ps_registrations
contact= realtime,ps_contacts

;ps_registration
INSERT INTO `ps_registrations` (`id`, `auth_rejection_permanent`, `client_uri`, `contact_user`, `expiration`, `max_retries`, `outbound_auth`, `outbound_proxy`, `retry_interval`, `forbidden_retry_interval`, `server_uri`, `transport`, `support_path`)
VALUES
('557',NULL,'sip:557@192.168.1.4:5060','557',3600,NULL,NULL,NULL,30,600,'sip:557@192.168.1.1:5060','transport-udp',NULL);

;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`)
VALUES
('557','sip:192.168.1.1:5060',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

;ps_auths
INSERT INTO `ps_auths` (`id`, `auth_type`, `nonce_lifetime`, `md5_cred`, `password`, `realm`, `username`)
VALUES
('557','userpass',NULL,NULL,'557',NULL,'557');

;ps_endpoints
INSERT INTO `ps_endpoints` (`id`, `transport`, `aors`, `auth`, `outbound_auth`, `context`, `disallow`, `allow`, `direct_media`, `connected_line_method`, `direct_media_method`, `direct_media_glare_mitigation`, `disable_direct_media_on_nat`, `dtmf_mode`, `external_media_address`, `force_rport`, `ice_support`, `identify_by`, `mailboxes`, `moh_suggest`, `outbound_proxy`, `rewrite_contact`, `rtp_ipv6`, `rtp_symmetric`, `send_diversion`, `send_pai`, `send_rpid`, `timers_min_se`, `timers`, `timers_sess_expires`, `callerid`, `callerid_privacy`, `callerid_tag`, `100rel`, `aggregate_mwi`, `trust_id_inbound`, `trust_id_outbound`, `use_ptime`, `use_avpf`, `media_encryption`, `inband_progress`, `call_group`, `pickup_group`, `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`, `language`, `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`, `from_user`, `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
('557','transport-udp','557','','557','dialmap','all','alaw','no',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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
Comments:By: Rusty Newton (rnewton) 2014-06-03 17:43:54.610-0500

I talked with various Asterisk developers. It sounds like ps_registrations for dynamic realtime isn't expected to work. It should be investigated why it exists in the first place

By: Rusty Newton (rnewton) 2014-06-03 17:45:17.011-0500

In the meantime, you should be able to setup your registrations in pjsip.conf, or else use static realtime.

Registrations with dynamic realtime *will not* work.

By: Martin Moučka (dratek) 2014-07-06 10:26:58.361-0500

Hi, anything new with this issue?

By: Matt Jordan (mjordan) 2014-07-06 10:40:58.634-0500

# Any progress on an issue is noted on the issue. Asking "anything new" isn't really helpful.
# There isn't much that is going to happen with this issue. Dynamic realtime + {{ps_registrations}} doesn't make any sense. Asterisk has no way to know that you've updated the database table and now want a new outbound registration. Common sense would say that the only way Asterisk *could* know about such a thing is if it continually polled the database for changes (which would be bad) or if something external told Asterisk the database had been modified (which would be tantamount to a module reload, which defeats the purpose of "Dynamic" realtime).

If you want your outbound registrations in a database, use static realtime.

By: Ilya Trikoz (Awesome) 2014-07-07 07:56:16.718-0500

Well, table exists, would be nice if asterisk would be able pulling data from this table when * loading or reloading, much easier than using classic static. dynamic loading is not really important in that case, we can do reload via AMI, but ps_registration will be much much easier to maintain

EDIT: btw, if ps_registation present in sorcery & extconfig Registrations via static realtime isn't working so * using this table somehow!

By: Joshua C. Colp (jcolp) 2014-11-15 11:46:30.605-0600

This will be supported (but still require reloads) as a result of the work done in ASTERISK-24514.