[Home]

Summary:ASTERISK-29453: alembic: incoming_call_offer_pref and outgoing_call_offer_pref missing in "ps_endpoints" table
Reporter:Daniel Thümen (dthuemen)Labels:ARI fax realtime webrtc
Date Opened:2021-05-26 08:07:59Date Closed:2022-09-09 11:34:39
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Contrib/General Core/Sorcery Resources/res_pjsip
Versions:18.3.0 18.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:OS: Debian 10 PostgreSQL version: 11.12Attachments:( 0) asterisk.sql
Description:Hi,
I configured Asterisk 18.4 with a realtime in pgsql.

The schema was created via alembic with the config file asterisk-18.4.0/contrib/ast-db-manage/config.ini.sample
I just changed the sqlalchemy.url.

Then I tried to add an user via ari (I've used the example ari configs from [https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI])

Ari parameter:
* configClass: res_pjsip
* objectType: endpoint
* id: 9100
* fields: {noformat}{"fields": [
{"attribute": "from_user", "value": "9100" },
{"attribute": "allow", "value": "!all,g722,ulaw,alaw"},
{"attribute": "ice_support", "value": "yes"},
{"attribute": "force_rport", "value": "yes"},
{"attribute": "rewrite_contact", "value": "yes"},
{"attribute": "rtp_symmetric", "value": "yes"},
{"attribute": "context", "value": "default" },
{"attribute": "auth", "value": "9100" },
{"attribute": "aors", "value": "9100"} ] }
{noformat}

Asterisk creates from this ari request the following SQL Query:
{code:sql}
INSERT INTO ps_endpoints (id, rpid_immediate, webrtc, ignore_183_without_sdp, device_state_busy_at, t38_udptl_maxdatagram, codec_prefs_incoming_answer, dtls_rekey, named_pickup_group, direct_media_method, send_rpid, pickup_group, sdp_session, dtls_verify, message_context, mailboxes, record_on_feature, dtls_private_key, dtls_fingerprint, outgoing_call_offer_pref, from_domain, timers_sess_expires, named_call_group, dtls_cipher, media_encryption_optimistic, suppress_q850_reason_headers, aors, identify_by, callerid_privacy, mwi_subscribe_replaces_unsolicited, cos_audio, follow_early_media_fork, context, rtp_symmetric, transport, moh_suggest, t38_udptl, fax_detect, tos_video, srtp_tag_32, refer_blind_progress, max_audio_streams, bundle, use_avpf, call_group, send_connected_line, fax_detect_timeout, sdp_owner, force_rport, callerid_tag, rtp_timeout_hold, use_ptime, media_address, voicemail_extension, rtp_timeout, stir_shaken, set_var, contact_acl, preferred_codec_only, force_avp, record_off_feature, from_user, send_diversion, send_history_info, t38_udptl_ipv6, tone_zone, language, allow_subscribe, rtp_ipv6, callerid, moh_passthrough, cos_video, dtls_auto_generate_cert, asymmetric_rtp_codec, ice_support, aggregate_mwi, one_touch_recording, mwi_from_user, accountcode, codec_prefs_outgoing_answer, allow, rewrite_contact, user_eq_phone, rtp_engine, subscribe_context, notify_early_inuse_ringing, incoming_mwi_mailbox, incoming_call_offer_pref, allow_unauthenticated_options, auth, direct_media_glare_mitigation, trust_id_inbound,
bind_rtp_to_media_address, disable_direct_media_on_nat, media_encryption, media_use_received_transport, allow_overlap, dtmf_mode, outbound_auth, tos_audio, dtls_cert_file, dtls_ca_path, dtls_setup, connected_line_method, g726_non_standard, 100rel, timers, direct_media, acl, timers_min_se, trust_id_outbound, sub_min_expiry, rtcp_mux, max_video_streams, accept_multiple_sdp_answers, codec_prefs_incoming_offer, codec_prefs_outgoing_offer, trust_connected_line, send_pai, rtp_keepalive, t38_udptl_ec, t38_udptl_nat, allow_transfer, dtls_ca_file, outbound_proxy, inband_progress) VALUES ('9100', 'false', 'no', 'false', '0', '0', 'prefer:pending, operation:intersect, keep:all, transcode:allow', '0', '', 'invite', 'false', '', 'Asterisk', 'No', '', '', 'automixmon', '', 'SHA-256', 'remote_merge', '', '1800', '',
'', 'false', 'false', '9100', 'username,ip', 'allowed_not_screened', 'no', '0', 'true', 'default', 'true', '', 'default', 'false', 'false', '0', 'false', 'true', '1', 'false', 'false', '', 'yes', '0', '-', 'true', '', '0', 'false', '', '', '0', 'false', '', '', 'false',
'false', 'automixmon', '9100', 'true', 'false', 'false', '', '', 'true', 'false', '<unknown>', 'false', '0', 'No', 'false', 'true', 'true', 'false', '', '', 'prefer:pending, operation:intersect, keep:all, transcode:allow', '(g722|ulaw|alaw)', 'true', 'false', 'asterisk', '', 'false', '', 'local', 'false', '9100', 'none', 'false', 'false', 'false', 'no', 'false', 'true', 'rfc4733', '', '0', '', '', 'active', 'invite', 'false', 'yes', 'yes', 'true', '', '90', 'false', '0', 'false', '1', 'false', 'prefer:pending, operation:intersect, keep:all, transcode:allow', 'prefer:pending, operation:union, keep:all, transcode:allow', 'yes', 'false', '0', 'none', 'false', 'true', '', '', 'false')
{code}

And prints the this error Message:
{noformat}
[May 25 14:18:52] ERROR[659] res_config_pgsql.c: PostgreSQL RealTime: Query Failed because: ERROR:  syntax error at or near "100"
LINE 1: ..._setup, connected_line_method, g726_non_standard, 100rel, ti...
{noformat}

So I've tested this query locally with quotation marks around 100rel and I figured out, that there are two missing fields inside the ps_endpoints table:
* incoming_call_offer_pref
* outgoing_call_offer_pref
Comments:By: Asterisk Team (asteriskteam) 2021-05-26 08:07:59.832-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Asterisk Team (asteriskteam) 2021-05-26 08:08:01.049-0500

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: Daniel Thümen (dthuemen) 2021-05-26 08:10:47.243-0500

I've added the exported SQL schema from alembic

By: Ron Lockard (rlockard) 2022-05-23 16:21:06.353-0500

This issue exists in 18.12.1 also, with the addition of "stir_shaken_profile" column is also missing after creating the two original missing columns.

By: Friendly Automation (friendly-automation) 2022-09-09 11:34:40.964-0500

Change 18980 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/18980|https://gerrit.asterisk.org/c/asterisk/+/18980]

By: Friendly Automation (friendly-automation) 2022-09-09 11:34:48.960-0500

Change 18959 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/18959|https://gerrit.asterisk.org/c/asterisk/+/18959]

By: Friendly Automation (friendly-automation) 2022-09-09 11:34:52.664-0500

Change 18979 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/18979|https://gerrit.asterisk.org/c/asterisk/+/18979]

By: Friendly Automation (friendly-automation) 2022-09-09 11:35:04.320-0500

Change 19002 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/19002|https://gerrit.asterisk.org/c/asterisk/+/19002]

By: Friendly Automation (friendly-automation) 2022-09-09 11:35:08.049-0500

Change 19001 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/19001|https://gerrit.asterisk.org/c/asterisk/+/19001]

By: Friendly Automation (friendly-automation) 2022-09-09 11:35:11.685-0500

Change 18957 merged by Friendly Automation:
alembic: add missing ps_endpoints columns

[https://gerrit.asterisk.org/c/asterisk/+/18957|https://gerrit.asterisk.org/c/asterisk/+/18957]