[asterisk-bugs] [JIRA] (ASTERISK-25281) PJSIP realtime over ODBC broken
HZMI8gkCvPpom0tM (JIRA)
noreply at issues.asterisk.org
Tue Jul 28 12:00:33 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227074#comment-227074 ]
HZMI8gkCvPpom0tM commented on ASTERISK-25281:
---------------------------------------------
Thanks for very helpful post.
Database oracle.
This is tables struct like you want
{code}
SQL> SELECT * FROM ps_endpoints WHERE id LIKE '%' ORDER BY id
+------------+--------------+------------+------------+----------+---------+------+-------------+----------------------+--------------------+------------------------------+----------------------------+----------+-----------------------+------------+------------+------------+----------+------------+--------------+---------------+----------------+---------+--------------+---------------+---------+----------+--------------+-------+--------------------+---------+-----------------+-------------+-------+--------------+-----------------+------------------+----------+---------+-----------------+----------------+-----------+-------------+-----------------+-------------------+---------------------+-----------+----------+-------------+----------------------+--------------+---------------+----------+---------+--------------------+------------------+-------------------+-----------+---------------+----------------+----------+------------+----------+----------+---------------+------------+----------+--------------+------------+-----------+---------------+-----------------+------------+-------------+-------------+-----------+------------+--------------+----------------+--------+----------+----------+----------------+----------+-----------------------------+------------+--------------+----------------+----------------------------+---------------+------------------+--------------+
| ID | TRANSPORT | AORS | 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_AUTH| 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| FORCE_AVP| MEDIA_USE_RECEIVED_TRANSPORT| ACCOUNTCODE| USER_EQ_PHONE| MOH_PASSTHROUGH| MEDIA_ENCRYPTION_OPTIMISTIC| RPID_IMMEDIATE| G726_NON_STANDARD| RTP_KEEPALIVE|
+------------+--------------+------------+------------+----------+---------+------+-------------+----------------------+--------------------+------------------------------+----------------------------+----------+-----------------------+------------+------------+------------+----------+------------+--------------+---------------+----------------+---------+--------------+---------------+---------+----------+--------------+-------+--------------------+---------+-----------------+-------------+-------+--------------+-----------------+------------------+----------+---------+-----------------+----------------+-----------+-------------+-----------------+-------------------+---------------------+-----------+----------+-------------+----------------------+--------------+---------------+----------+---------+--------------------+------------------+-------------------+-----------+---------------+----------------+----------+------------+----------+----------+---------------+------------+----------+--------------+------------+-----------+---------------+-----------------+------------+-------------+-------------+-----------+------------+--------------+----------------+--------+----------+----------+----------------+----------+-----------------------------+------------+--------------+----------------+----------------------------+---------------+------------------+--------------+
| 99900000001| transport-udp| 99900000001| 99900000001| customers| all | alaw | no | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+------------+--------------+------------+------------+----------+---------+------+-------------+----------------------+--------------------+------------------------------+----------------------------+----------+-----------------------+------------+------------+------------+----------+------------+--------------+---------------+----------------+---------+--------------+---------------+---------+----------+--------------+-------+--------------------+---------+-----------------+-------------+-------+--------------+-----------------+------------------+----------+---------+-----------------+----------------+-----------+-------------+-----------------+-------------------+---------------------+-----------+----------+-------------+----------------------+--------------+---------------+----------+---------+--------------------+------------------+-------------------+-----------+---------------+----------------+----------+------------+----------+----------+---------------+------------+----------+--------------+------------+-----------+---------------+-----------------+------------+-------------+-------------+-----------+------------+--------------+----------------+--------+----------+----------+----------------+----------+-----------------------------+------------+--------------+----------------+----------------------------+---------------+------------------+--------------+
SQLRowCount returns 0
1 rows fetched
SQL> exit
{code}
If i configure to use static config in pjsip.conf everything works fine. As i told it is not working only over ODBC.
> PJSIP realtime over ODBC broken
> -------------------------------
>
> Key: ASTERISK-25281
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25281
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_pjsip
> Affects Versions: 13.4.0
> Environment: any debian x64 with odbc configured.
> all configrations was done in accordance with document
> https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
> Reporter: HZMI8gkCvPpom0tM
> Assignee: HZMI8gkCvPpom0tM
>
> Look like that pjsip funtionality completely broken in case of obdc driver used.
> After configuration like discribed in https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
> after loading asterisk
> {code}
> vpbxdev*CLI> odbc show
> ODBC DSN Settings
> -----------------
> Name: VPBXORACLE
> DSN: sqlrelay
> Last connection attempt: 1970-01-01 01:00:00
> Pooled: No
> Connected: Yes
> {code}
> {code}
> *vpbxdev*CLI> pjsip show endpoints
> No objects found.*
> {code}
> [2015-07-28 10:52:51.740] DEBUG[11310]: res_config_odbc.c:113 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_endpoints WHERE id LIKE ? ORDER BY id
> [2015-07-28 10:52:51.740] DEBUG[11310]: res_config_odbc.c:129 custom_prepare: Parameter 1 ('id LIKE') = '%'
> [2015-07-28 10:52:51.754] DEBUG[11310]: res_odbc.c:1057 odbc_release_obj2: odbc_release_obj2(0x1cda0c8) called (obj->txf = (nil))
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'ID' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'TRANSPORT' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'AORS' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'AUTH' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'CONTEXT' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'DISALLOW' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'ALLOW' from retrieval
> [2015-07-28 10:52:51.755] DEBUG[11310]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'DIRECT_MEDIA' from retrieval
> If i do manually same query using isql (odbc) i get data . So all created ok inside tables.
> SQL> SELECT * FROM ps_endpoints WHERE id LIKE '%' ORDER BY id
> .....
> 9990..... transport-udp| 999.....| 999000.....| customers| all | alaw | no |
> ....
> SQLRowCount returns 0
> 1 rows fetched
> contents of file sorcery.conf
> {code}
> [res_pjsip]
> endpoint=realtime,ps_endpoints
> auth=realtime,ps_auths
> aor=realtime,ps_aors
> domain_alias=realtime,ps_domain_aliases
> contact=realtime,ps_contacts
> [res_pjsip_endpoint_identifier_ip]
> identify=realtime,ps_endpoint_id_ips
> {code}
> contents of extconfig.conf
> {code}
> [settings]
> ps_endpoints => odbc,VPBXORACLE
> ps_auths => odbc,VPBXORACLE
> ps_aors => odbc,VPBXORACLE
> ps_domain_aliases => odbc,VPBXORACLE
> ps_endpoint_id_ips => odbc,VPBXORACLE
> ps_contacts => odbc,VPBXORACLE
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list