On Thu, Jun 18, 2015 at 1:52 PM, Ryan, Travis <RyanT at oscarwinski.com>
wrote:> I?m doing an upgrade from Asterisk 11 to 13. I?m following the guide at
> https://wiki.asterisk.org/wiki/display/ast/setting+up+PJSIP+REaltime to
> setup realtime, as I use realtime on Asterisk 11 too.
>
>
>
> I?m getting the following error when trying to connect the peer to the
> server.
>
>
>
> Help? J
>
>
>
> Thanks,
>
>
>
> Travis
>
>
>
> [Jun 15 16:20:03] NOTICE[5116] res_odbc.c: res_odbc: Connected to laf [laf]
>
> [Jun 15 16:20:03] DEBUG[5116] res_odbc.c: odbc_release_obj2(0x7f3f1c4815d8)
> called (obj->txf = (nil))
>
> [Jun 15 16:20:03] ERROR[5116] res_pjsip_registrar.c: Unable to bind contact
> 'sip:812 at 10.1.80.112:5062' to AOR '812'
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Skip: 0; SQL: SELECT *
FROM
> ps_contacts WHERE id LIKE ? ORDER BY id
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 1 ('id
LIKE') > '812;@%'
>
> [Jun 15 16:20:03] DEBUG[5116] res_odbc.c: odbc_release_obj2(0x7f3f1c4815d8)
> called (obj->txf = (nil))
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Skip: 0; SQL: SELECT *
FROM
> ps_contacts WHERE id LIKE ? ORDER BY id
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 1 ('id
LIKE') > '812;@%'
>
> [Jun 15 16:20:03] DEBUG[5116] res_odbc.c: odbc_release_obj2(0x7f3f1c4815d8)
> called (obj->txf = (nil))
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Skip: 0; SQL: INSERT INTO
> ps_contacts (id, outbound_proxy, expiration_time, path, qualify_frequency,
> user_agent, uri) VALUES (?, ?, ?, ?, ?, ?, ?)
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 1 ('id')
> '812;@sip:812 at 10.1.80.112:5062'
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 2
> ('outbound_proxy') = ''
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 3
> ('expiration_time') = '1434399723'
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 4
('path') = ''
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 5
> ('qualify_frequency') = '0'
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 6
('user_agent')
> = 'Media5-fone/4.1.3.3034 iOS/8.3'
>
> [Jun 15 16:20:03] DEBUG[5116] res_config_odbc.c: Parameter 7
('uri') > 'sip:812 at 10.1.80.112:5062'
>
> [Jun 15 16:20:03] WARNING[5116] res_odbc.c: SQL Execute returned an error
> -1: 42S22: [MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1]Unknown
> column 'outbound_proxy' in 'field list' (103)
>
> [Jun 15 16:20:03] WARNING[5116] res_odbc.c: SQL Execute error -1! Verifying
> connection to laf [laf]...
>
It looks like you are missing the outbound_proxy column on the
ps_contacts table. If you're missing that column, you are probably
missing some other columns as well.
Note that the schema for the realtime tables for PJSIP has been
updated many times, as new features have been added. The alembic
scripts bundled with Asterisk can manage your DB schemas for you, or
can be used to generate the schema used by your specific version of
Asterisk.
--
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org