<div dir="ltr">pjsip realtime, especially related to contacts, has been worked on a bunch over the last few releases. Honestly I don't remember what went into which release but do try 13.9.1 and let us know.<div><br></div><div>You can also try using the following statements in sorcery.conf and see if it changes anything. Don't use them in production because full_backend_cache and allow_unqualified_fetch have performance implications.</div><div><br></div><div><div><font face="monospace, monospace" size="1">aor/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=3600,full_backend_cache=yes</font></div><div><font face="monospace, monospace" size="1">aor=realtime,ps_aors,allow_unqualified_fetch=warn</font></div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 13, 2016 at 9:42 AM, Francisco Valentin Vinagrero <span dir="ltr"><<a href="mailto:francisco.valentin.vinagrero@cern.ch" target="_blank">francisco.valentin.vinagrero@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">So basically you’re doubling all the lines with a failover to the pjsip.conf file. What do you have in that file?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">For me it didn’t work. Whenever I add or update a contact in the ps_aors table, I get that the contacts are created but not qualified.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Cheers, Francisco.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="color:windowtext">From:</span></b><span lang="EN-US" style="color:windowtext"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>]
<b>On Behalf Of </b>Annus Fictus<br>
<b>Sent:</b> 13 June 2016 14:34</span></p><div><div class="h5"><br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>><br>
<b>Subject:</b> Re: [asterisk-users] PJSIP does not qualify contacts after starting Asterisk<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p>Hello,<span style="font-size:12.0pt"><u></u><u></u></span></p>
<p>in which moment Asterisk leave to qualify the realtime endpoint? When you restart Asterisk?<u></u><u></u></p>
<p>On my asterisk 13.9.1, qualify on realtime endpoints works correctly. My sorcery.conf:<u></u><u></u></p>
<p>[res_pjsip]<br>
endpoint=realtime,ps_endpoints<br>
endpoint=config,pjsip.conf,criteria=type=endpoint<br>
auth=realtime,ps_auths<br>
auth=config,pjsip.conf,criteria=type=auth<br>
aor=realtime,ps_aors<br>
aor=config,pjsip.conf,criteria=type=aor<br>
domain_alias=realtime,ps_domain_aliases<br>
domain_alias=config,pjsip.conf,criteria=type=domain_alias<br>
contact=realtime,ps_contacts<br>
contact=config,pjsip.conf,criteria=type=contact<br>
<br>
[res_pjsip_endpoint_identifier_ip]<br>
identify=realtime,ps_endpoint_id_ips<br>
identify=config,pjsip.conf,criteria=type=identify<u></u><u></u></p>
<p><span lang="ES">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="ES"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="ES">El 13/06/2016 a las 14:16, Francisco Valentin Vinagrero escribió:<u></u><u></u></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1f497d">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Yes, we’re implementing the dialplan in realtime too.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Here the contents of sorcery.conf:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">[res_pjsip]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">endpoint=realtime,ps_endpoints</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">aor=realtime,ps_aors</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">contact=realtime,ps_contacts</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">[res_pjsip_endpoint_identifier_ip]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">identify=realtime,ps_endpoint_id_ips</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas;color:#1f497d">Cheers, Francisco.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="color:windowtext">From:</span></b><span lang="EN-US" style="color:windowtext">
</span><a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank"><span lang="EN-US">asterisk-users-bounces@lists.digium.com</span></a><span lang="EN-US" style="color:windowtext"> [</span><a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank"><span lang="EN-US">mailto:asterisk-users-bounces@lists.digium.com</span></a><span lang="EN-US" style="color:windowtext">]
<b>On Behalf Of </b>Annus Fictus<br>
<b>Sent:</b> 13 June 2016 14:11<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion </span><a href="mailto:asterisk-users@lists.digium.com" target="_blank"><span lang="EN-US"><asterisk-users@lists.digium.com></span></a><span lang="EN-US" style="color:windowtext"><br>
<b>Subject:</b> Re: [asterisk-users] PJSIP does not qualify contacts after starting Asterisk</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p>Hello Francisco,<u></u><u></u></p>
<p>you have to use:<u></u><u></u></p>
<p><span style="font-family:Consolas">extensions => odbc,asterisk</span><u></u><u></u></p>
<p><span style="font-family:Consolas">only if you want use dialplan in Realtime</span><u></u><u></u></p>
<p>can you share your sorcery.conf file?<u></u><u></u></p>
<p><span lang="ES">Regards<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="ES">El 13/06/2016 a las 10:21, Francisco Valentin Vinagrero escribió:<u></u><u></u></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">(sending this again from the correct address)</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I’m running Asterisk 13.8.0 (I need to check if that happens with 13.9.1 too when I have the time to build it) with PJSIP realtime config.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I’ve defined several aors in the table ps_aors, like this (real url replaced by myurl):<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">*CLI> pjsip show aor pbx-node-1
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Aor: <Aor..............................................> <MaxContact>
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> =========================================================================================
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Aor: pbx-node-1 0
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: pbx-node-1/</span><a><span style="font-family:Consolas">sip:myurl:5060</span></a><span style="font-family:Consolas"> 771bf6a7d4 Created
0.000 </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> ParameterName : ParameterValue
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> ===================================================
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> authenticate_qualify : false
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> contact :
</span><a><span style="font-family:Consolas">sip:myurl:5060</span></a><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><span lang="FR" style="font-family:Consolas">default_expiration : 3600
</span><span lang="FR"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="FR" style="font-family:Consolas"> mailboxes :
</span><span lang="FR"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="FR" style="font-family:Consolas"> max_contacts : 0
</span><span lang="FR"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="FR" style="font-family:Consolas"> </span><span style="font-family:Consolas">maximum_expiration : 7200
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> minimum_expiration : 60 </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> outbound_proxy :
</span><a><span style="font-family:Consolas">sip:myurl:5060</span></a><span style="font-family:Consolas">
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> qualify_frequency : 30
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> qualify_timeout : 3.000000 </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> remove_existing : false
</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> support_path : false
</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">So I think that those aors should be qualified automatically when I run Asterisk, but if I do “<i>pjsip show contacts”</i>, I get that it was just Created but not qualified:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">*CLI> pjsip show contacts</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..></span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">=========================================================================================</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: pbx-node-1/</span><a><span style="font-family:Consolas">sip:myurl:5060</span></a><span style="font-family:Consolas"> 771bf6a7d4 Created
0.000</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">And not a single OPTIONS message if I take a trace…<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">If I want Asterisk to start sending OPTIONS, I need to do pjsip reload and after that, they are qualified and their status changes dynamically:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">*CLI> pjsip show contacts</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..></span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">=========================================================================================</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas"> Contact: pbx-node-1/</span><a><span style="font-family:Consolas">sip:myurl.ch:5060</span></a><span style="font-family:Consolas"> 771bf6a7d4
Avail 8.833</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">The extconfig.conf file looks like this:<u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">[settings]</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_endpoints => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_auths => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_aors => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_domain_aliases => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_endpoint_id_ips => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">ps_contacts => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-family:Consolas">extensions => odbc,asterisk</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal">Any idea why I need to reload PJSIP if I want the aors to be qualified?<u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal">Cheers, Francisco.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><br>
<br>
<br>
</span><u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
<br>
<u></u><u></u></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p>
</div></div></div>
</div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" rel="noreferrer" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.asterisk.org</a><br><div><br></div></div></div>
</div>