<span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 12px"><div>Joshua</div>
<div> </div>
<div>We are using MariaDB as the database storage. </div>
<div>We have recreated the database tables with alembic. </div>
<div> </div>
<div>Test 1:</div>
<ul>
<li>We enable tables for aors, auths and endpoints only. </li>
<li>With cache turned off the end point registers successfully</li>
<li>We have no way to get any feed back as pjsip show/list returns no objects found.</li>
<li>pjsip send notify cmd endpoint -- does not work as it says there is no endpoint.</li>
<li>endpoint can send a call as it appears to be registered, we have no way to confirm this form the console but calls come in. </li>
</ul>
<div> </div>
<div>Test 2: </div>
<ul>
<li>We enable cache on the endpoints, auth and aors in the sorcery.conf
<ul>
<li>endpoint/cache = memory_cache,object_lifetime_stale=600,object_lifetime_maximum=1800,expire_on_reload=yes,full_backend_cache=yes</li>
<li>auth/cache=memory_cache,expire_on_reload=yes</li>
<li>aor/cache = memory_cache,object_lifetime_stale=1500,object_lifetime_maximum=1800,expire_on_reload=yes,full_backend_cache=yes</li>
</ul>
</li>
<li> We now get an error:
<ul>
<li>[2017-09-15 11:02:04] WARNING[3375]: res_pjsip_registrar.c:744 registrar_on_rx_request: AOR '6162480909-300' has no configured max_contacts. Endpoint '6162480909-300' unable to register</li>
<li>The aors entry has the max_contacts set to 1 but the error still occurs. </li>
</ul>
</li>
<li> pjsip show/list shows the endpoint shows endpoints, aors, auths but registration fails</li>
</ul>
<div> </div>
<div>
<div>Test 3: </div>
<ul>
<li>We enable cache on the endpoints, auth and aors in the sorcery.conf
<ul>
<li>endpoint/cache = memory_cache,object_lifetime_stale=600,object_lifetime_maximum=1800,expire_on_reload=yes</li>
<li>auth/cache=memory_cache,expire_on_reload=yes</li>
<li>aor/cache = memory_cache,object_lifetime_stale=1500,object_lifetime_maximum=1800,expire_on_reload=yes</li>
</ul>
</li>
<li>Endpoint registers</li>
<li>pjsip show/list endpoints works the first time and fails there after. </li>
<li>
<div>
<blockquote>
<div>UBNTU-ROSSI-GUEST*CLI> pjsip show endpoints</div>
<div> Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.><br />
I/OAuth: <AuthId/UserName...........................................................><br />
Aor: <Aor............................................> <MaxContact><br />
Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..><br />
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................><br />
Identify: <Identify/Endpoint.........................................................><br />
Match: <criteria.........................><br />
Channel: <ChannelId......................................> <State.....> <Time.....><br />
Exten: <DialedExten...........> CLCID: <ConnectedLineCID.......><br />
==========================================================================================</div>
<div> Endpoint: 6162480909-300 Not in use 0 of inf<br />
InAuth: 6162480909-300/6162480909-300<br />
Aor: 6162480909-300 1<br />
Contact: 6162480909-300/sip:6162480909-300@192.168. 0475d46ff2 Unknown nan<br />
Transport: udp-nat udp 0 0 0.0.0.0:5060</div>
<div><br />
Objects found: 1</div>
<div>UBNTU-ROSSI-GUEST*CLI> pjsip show endpoints<br />
No objects found.</div>
</blockquote>
</div>
</li>
<li>pjsip show/list shows the endpoint fails ever time after the first.</li>
</ul>
</div>
<div>Test 4: </div>
<ul>
<li>Test 1: with the addition of the contacts entry as realtime in sorcery.conf</li>
<li>We get error on registration attempt:
<ul>
<li>[2017-09-15 11:16:07] WARNING[3591]: res_config_odbc.c:120 custom_prepare: SQL Prepare failed! [INSERT INTO ps_contacts (id, via_addr, qualify_timeout, call_id, reg_server, path, endpoint, via_port, authenticate_qualify, uri, qualify_frequency, user_agent, expiration_time, outbound_proxy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]</li>
<li>[2017-09-15 11:16:07] ERROR[3591]: res_pjsip_registrar.c:432 register_aor_core: Unable to bind contact 'sip:6162480909-300@192.168.201.105:59758' to AOR '6162480909-300'</li>
</ul>
</li>
<li>Registration has failed at this point. </li>
</ul>
<div> </div>
<div>I can offer the following:</div>
<div> A dump of the database schema that alembic is creating.</div>
<div> extconfig.config</div>
<div> sorcery.conf</div>
<div> </div>
<div>Thanks</div>
<div>Bryant</div>
<div> </div>
<hr align="center" size="2" width="100%" />
<div><span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><b>From</b>: "Joshua Colp" <jcolp@digium.com><br />
<b>Sent</b>: Friday, September 15, 2017 9:56 AM<br />
<b>To</b>: asterisk-users@lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-users] Realtime pjsip issues</span>
<div> </div>
On Fri, Sep 15, 2017, at 10:37 AM, Bryant Zimmerman wrote:<br />
> Joshua<br />
><br />
> That is the interesting part of it. We took our configs and database<br />
> tables from our working 13.12.2 deployments and tried to use them with<br />
> our<br />
> new 13.17.1 deployments and we are having issues where the tables are not<br />
> working. On the new server asterisk keeps saying it can't find the AORS<br />
> entries when we purge the sorcery memory cache it starts finding the aors<br />
> but then it says it cant find the auths.<br />
><br />
> The wired thing is when it says it can't find the aors and auths entries<br />
> it does not show it is looking for the values in the aors and auth fields<br />
> from the endpoints tables. It keeps putting the value from the endpoints<br />
> id<br />
> field as the entries it can't find.<br />
><br />
> One point of note the tables we used and created for pjsip back when we<br />
> setup the 13.12.2 version are not what is currently being created when we<br />
> run alembic now.. Also the contact table from alembic creation process<br />
> does<br />
> not work we get insert errors inside of asterisk when contact entry<br />
> attempts are being crated. It shows a number of fields that are not there<br />
> in the created tables.<br />
><br />
> This is the foundation of my issues. I really have to resolve them in<br />
> some<br />
> manner so I can mover forward with getting these new systems into<br />
> production.<br />
> Any assistance is appreciated.<br />
<br />
You're really throwing a lot of things in here. Please try to simplify<br />
this first and remove the caching. After that what exactly does it say<br />
it can't find when trying to add a contact? What database is in use? Did<br />
you create the tables fresh from alembic? Upgrade existing? If you<br />
enable debug (debug to console in logger.conf and core set debug 5) does<br />
it show it doing database queries?<br />
<br />
As it is right now things haven't been narrowed down enough for me to<br />
give any concrete answer or help.<br />
<br />
--<br />
Joshua Colp<br />
Digium, Inc. | Senior Software Developer<br />
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br />
Check us out at: www.digium.com & www.asterisk.org<br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
<br />
Check out the new Asterisk community forum at: https://community.asterisk.org/<br />
<br />
New to Asterisk? Start here:<br />
https://wiki.asterisk.org/wiki/display/AST/Getting+Started<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
</div></span>