Re: [asterisk-users] Asterisk realtime - Error with index length in alembic script

2017-07-13 Thread Floimair Florian
Yeah, I will do that.

I have some more things I need to clarify, so I will just gather all the 
information and sum it up beforehand.



With best regards

Florian Floimair


Von: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] Im Auftrag von Marcelo Terres
Gesendet: Mittwoch, 12. Juli 2017 22:55
An: Asterisk Users Mailing List - Non-Commercial Discussion 

Betreff: Re: [asterisk-users] Asterisk realtime - Error with index length in 
alembic script

Please open a Ticket (https://issues.asterisk.org), to let them know that they 
need to update the documentation in Wiki and also handle this situation when 
using Alembic in Debian 9 (could happens in other Distros too).

Marcelo H. Terres mailto:mhter...@gmail.com>>
IM: 
mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres

On 12 July 2017 at 13:11, Floimair Florian 
mailto:f.floim...@commend.com>> wrote:
Nevermind guys!

I just found out the solution myself:

MariaDB in Debian uses utf8mb4 as default character set (see here: 
https://mariadb.com/kb/en/mariadb/differences-in-mariadb-in-debian-and-ubuntu/).

I needed to uncomment the lines with utf8mb4 in /etc/mysql/maria.db.conf in the 
following files:

50-client.cnf (1 line)
50-mysql-clients.cnf (1 line)
50-server.cnf (2 lines)



With best regards

Florian Floimair


-Ursprüngliche Nachricht-
Von: 
asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.com]
 Im Auftrag von Floimair Florian
Gesendet: Mittwoch, 12. Juli 2017 13:50
An: Asterisk Users Mailing List - Non-Commercial Discussion 
mailto:asterisk-users@lists.digium.com>>
Betreff: [asterisk-users] Asterisk realtime - Error with index length in 
alembic script

Hi!

I just tried setting up Asterisk realtime database following the wiki article 
https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime on a 
Debian 9 machine (which switched from MyQSL to MariaDB).

One has to install mariadb-plugin-connect, python-mysqldb and alembic packages 
(alembic does not work when installed via pip).
Additionally - since MariaDB by default does not have a root user password set 
and running mysql -u root requires sudo as well - you need to execute the 
following:
sudo mysql_secure_installation
sudo mysql_upgrade -p --force

So far so good. I run into problems when running alembic when I get to the 
following change:
https://linkprotect.cudasvc.com/url?a=https://e96a0b8071c_increase_pjsip_column_size.py&c=E,1,dGJHzJtuX7eYDELI39tEC4ecYafZjsCUjWDL5p09DOWe28cNAbd_GFmJLD2jBZfffS-vYPvUH1CUUjR7gX1rtdvm5NFCTV_tDVCtQerGg6RZ&typo=1
mariadb fails this operation with error "Specified key was too long; max key 
length is 767 bytes" when it tries to increase some fields to varchar(255).

Any idea how to solve this? Do I maybe have to switch to a different encoding 
for this to work?

Thanks in advance



With best regards

Florian Floimair

COMMEND INTERNATIONAL GMBH
A-5020 Salzburg, Saalachstraße 51
https://linkprotect.cudasvc.com/url?a=http://www.commend.com&c=E,1,AMmXtJHsI4hmbBwyuM3M1xbRoGx-jiTaCiP7NxokUuMnadAIjb8xkI9P1ki_t2xzN78KaSN07DIpAamHT5VUTD5fbWuRqBVMk8ZAvCXz4t9wk89RgGU28EY,&typo=1

Security and Communication by Commend

FN 178618z | LG Salzburg

-Ursprüngliche Nachricht-
Von: 
https://linkprotect.cudasvc.com/url?a=https://asterisk-users-boun...@lists.digium.com&c=E,1,7s7_D_Myc9BrXsqexg-b_jeGW99IlnqrhZCMhGKzBBE0m7-4lzl4Pqf0FBhPDU7YvysBh3XyuK7jqolYZryc5Pv214OOwiAf7rFVSlR6XZKzTS_0oyqQLA,,&typo=1
 
https://linkprotect.cudasvc.com/url?a=https://[mailto:asterisk-users-boun...@lists.digium.com&c=E,1,b02t9WMuMstwiWAHz0XrrZjHTVSQwnEy5yxXJi5pqNE6eqJ_ZzijQ4_PsoLa3tnaco3BYXQ5Ck2OHfmk_Dm4EHbE77z220o2c-VzuvBbEcq7PCY,&typo=1]
 Im Auftrag von Thomas
Gesendet: Montag, 10. Juli 2017 14:07
An: 
https://linkprotect.cudasvc.com/url?a=https://asterisk-users@lists.digium.com&c=E,1,LICqKTGOt1JJCqd7cLtDeAYTRlaeW-0IaAjeofhcEGlqHiUa9FX1v_0Z61fjn6Cglc1LwJESdZ5CsnB1ZeUMPn7gV2z5agkz3kh8onHV0Oxnmn9c4DjH6CBU&typo=1
Betreff: [asterisk-users] ConfBridge increase talking volume as standard

Hello,

is

[asterisk-users] Asterisk realtime in combination with ARI - error while trying to prepare SQL statement for writing into database

2017-07-13 Thread Floimair Florian
Hey guys!

I successfully got Asterisk realtime (14.6.0) with MariaDB (MySQL fork) running 
on Debian 9.

I will document the steps to do so shortly (the main difference is default 
encoding and the odbc connector & its configuration).

What I’m trying to do now is to use ARI to create PJSIP endpoints as outlined 
in this wiki article:
https://wiki.asterisk.org/wiki/display/AST/ARI+Push+Configuration

So far so good. Excecuting the examples using curl PUT aor and auth was working 
fine, when I ran the line for the endpoint object I got an error in the 
Asterisk CLI and log stating:

res_config_odbc.c: SQL Prepare failed! [INSERT INTO ps_endpoints (id, 
rpid_immediate, device_state_busy_at, t38_udptl_maxdatagram, 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, from_domain, timers_sess_expires, named_call_group, 
dtls_cipher, media_encryption_optimistic, aors, identify_by, callerid_privacy, 
mwi_subscribe_replaces_unsolicited, cos_audio, context, rtp_symmetric, 
transport, moh_suggest, t38_udptl, fax_detect, tos_video, srtp_tag_32, 
use_avpf, call_group, fax_detect_timeout, sdp_owner, force_rport, callerid_tag, 
rtp_timeout_hold, use_ptime, media_address, voicemail_extension, rtp_timeout, 
set_var, contact_acl, force_avp, record_off_feature, from_user, send_diversion, 
t38_udptl_ipv6, tone_zone, language, allow_subscribe, rtp_ipv6, callerid, 
moh_passthrough, cos_video, asymmetric_rtp_codec, ice_support, aggregate_mwi, 
one_touch_recording, mwi_from_user, accountcode, allow, rewrite_contact, 
user_eq_phone, rtp_engine, subscribe_context, 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, send_pai, rtp_keepalive, t38_udptl_ec, t38_udptl_nat, allow_transfer, 
dtls_ca_file, outbound_proxy, inband_progress) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)]

Carefully comparing the attributes from the JSON output of the curl statement 
(which was successfully completed) and the columns in the database I found the 
culprit:

The database is missing the following attribute: „dtls_fingerprint“
I prepared my database using the alembic scripts from the 14.6.0 source. After 
manually adding the column to the database and restarting Asterisk the 
statement was successfully executed and everything works fine now.

In addition to the missing attribute there are few columns in the database 
table that do not match to a JSON attribute in the pjsip endpoint object.
These are:

-  contact_deny

-  contact_permit

-  contact_user

-  deny

-  disallow

-  external_media_address

-  permit

-  redirect_method


So far to my findings.

Should I file a bug-report for this?


With best regards

Florian Floimair


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk realtime in combination with ARI - error while trying to prepare SQL statement for writing into database

2017-07-13 Thread Joshua Colp
On Thu, Jul 13, 2017, at 10:01 AM, Floimair Florian wrote:
> Hey guys!
> 
> I successfully got Asterisk realtime (14.6.0) with MariaDB (MySQL fork)
> running on Debian 9.
> 
> I will document the steps to do so shortly (the main difference is
> default encoding and the odbc connector & its configuration).
> 
> What I’m trying to do now is to use ARI to create PJSIP endpoints as
> outlined in this wiki article:
> https://wiki.asterisk.org/wiki/display/AST/ARI+Push+Configuration
> 
> So far so good. Excecuting the examples using curl PUT aor and auth was
> working fine, when I ran the line for the endpoint object I got an error
> in the Asterisk CLI and log stating:



> 
> Carefully comparing the attributes from the JSON output of the curl
> statement (which was successfully completed) and the columns in the
> database I found the culprit:
> 
> The database is missing the following attribute: „dtls_fingerprint“
> I prepared my database using the alembic scripts from the 14.6.0 source.
> After manually adding the column to the database and restarting Asterisk
> the statement was successfully executed and everything works fine now.
> 
> In addition to the missing attribute there are few columns in the
> database table that do not match to a JSON attribute in the pjsip
> endpoint object.
> These are:
> 
> -  contact_deny
> 
> -  contact_permit
> 
> -  contact_user
> 
> -  deny
> 
> -  disallow
> 
> -  external_media_address
> 
> -  permit
> 
> -  redirect_method
> 
> 
> So far to my findings.
> 
> Should I file a bug-report for this?

Yes, an issue should be reported for this.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users