[asterisk-bugs] [JIRA] (ASTERISK-26645) res_pjsip_endpoint_identifier_ip: Does not check for updates in realtime database

Ross Beer (JIRA) noreply at issues.asterisk.org
Tue Dec 6 09:36:10 CST 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234080#comment-234080 ] 

Ross Beer commented on ASTERISK-26645:
--------------------------------------

Joshua,

For clarification, the full backend cache will retrieve all objects as per the below:

{quote}
Just like with the previous section's configuration, we have configured an object to be retrieved from realtime and cached in memory. Notice, though, that we have added full_backend_cache=yes to the end of the line. This is what causes Asterisk to pre-cache the objects. Normally, PJSIP "identify" objects would be a bad fit for caching since we tend to retrieve them all at once rather than one-at-a-time. By pre-caching all objects though, Asterisk can now retrieve all of them directly from the cache. Also notice that the other caching options are still relevant here. Rather than having the options apply to individual objects, they now apply to all of the retrieved objects. So if Asterisk retrieved 10 identifys during pre-cache, when the stale lifetime rolls around, all 10 will be marked stale and Asterisk will once again retrieve all of the objects from the backend.
{quote}

Does this mean that if there are now 15 objects, will the process retrieve all 15 or only the 10 it already knows? Will there be a full cache each time?

> res_pjsip_endpoint_identifier_ip: Does not check for updates in realtime database
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26645
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26645
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_endpoint_identifier_ip
>    Affects Versions: 13.12.2
>         Environment: Fedora 23
>            Reporter: Ross Beer
>
> When storing endpoint identifier entries in a realtime backend, entries are not checked for updates.
> I would have expected the table to either be queried periodically or when a SIP device tries to send messages to Asterisk.
> If changes are made to the database, the only way for these to be pulled into the asterisk config is to manually run a show command to load it.
> The sorcery config is as follows:
> {noformat}
> [res_pjsip_endpoint_identifier_ip]
> identify=config,pjsip.conf,criteria=type=identify
> identify/cache=memory_cache,expire_on_reload=yes,full_backend_cache=yes
> identify=realtime,ps_endpoint_id_ips
> {noformat}
> The command used to fetch the data from the database is:
> {noformat}
> pjsip show identify <ENDPOINT>
> {noformat}
> Once the command has been run, devices are successfully authenticated via IP.
> As this table could be hammered by attempted hackers, I would suggest a periodic check be put in place or negative caching.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list