Pjsip show endpoints read file config

shows us the endpoints configured in the file, not the database

You haven’t shown your configuration for how Sorcery is configured to pull from the database. This would be in the sorcery.conf file.


I activated this command, but it doesn’t work

Is the res_pjsip.so module loaded, along with the rest? Are you explicitly loading only select modules in modules.conf? What is shown at startup in the Asterisk log that may indicate issues?

load error res_pjsip.so

Based on the fact that you have invalid lines in modules.conf, I’m going to guess you are selectively loading modules and don’t have all the required ones loaded. For example res_sorcery_realtime for doing realtime. Start with autoload enabled, and then noload unused modules (or what you think is unused) and test.

[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger initialization) can be loaded
; using 'preload'.  'preload' forces a module and the modules it
; is known to depend upon to be loaded earlier than they normally get
; loaded.
;
; NOTE: There is no good reason left to use 'preload' anymore.  It was
; historically required to preload realtime driver modules so you could
; map Asterisk core configuration files to Realtime storage.
; This is no longer needed.
;
;preload = your_special_module.so
;
; If you want Asterisk to fail if a module does not load, then use
; the "require" keyword. Asterisk will exit with a status code of 2
; if a required module does not load.
;
;require = chan_pjsip.so
;
; If you want you can combine with preload
; preload-require = your_special_module.so
;
;load = res_musiconhold.so
;
; Load one of: console (portaudio).
; By default, load chan_console only (automatically).
;
;noload = chan_console.so
;
; Do not load res_hep and kin unless you are using HEP monitoring
; <http://sipcapture.org> in your network.
;
noload = res_hep.so
noload = res_hep_pjsip.so
noload = res_hep_rtcp.so
;
; Load one of the voicemail modules as they are mutually exclusive.
; By default, load app_voicemail only (automatically).
;
;noload = app_voicemail.so
noload = app_voicemail_imap.so
noload = app_voicemail_odbc.so
noload => res_adsi.so
noload => app_adsiprog.so
noload => app_getcpeid.so
noload => cdr_sqlite3_custom.so
noload => cel_sqlite3_custom.so

preload => res_odbc.so
preload => res_config_odbc.so
#load => res_config_pgsql.so
#load => cdr_pgsql.so
load => chan_pjsip.so
load => res_pjsip.so
load => res_pjsip_endpoint_identifier_ip.so
load => res_pjsip_registrar.so
[general]
load => res_config_odbc.so

This is my modules.conf file

I did not understand the problem

This error occurs when I activate this command

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors

What is the contents of extconfig.conf?

What should be added?

;
; Static and realtime external configuration
; engine configuration
;
; See https://docs.asterisk.org/Fundamentals/Asterisk-Configuration/Database-Support-Configuration/Realtime-Database-Configuration/
; for basic table formatting information.
;
[settings]
;
; Static configuration files:
;
; file.conf => driver,database[,table[,priority]]
;
; maps a particular configuration file to the given
; database driver, database and table (or uses the
; name of the file as the table if not specified)
;
; Uncomment to load queues.conf via the odbc engine.
;
;queues.conf => odbc,asterisk,ast_config
;extensions.conf => sqlite,asterisk,ast_config
;
; The following files CANNOT be loaded from Realtime storage:
;	asterisk.conf
;	extconfig.conf (this file)
;	logger.conf
;
; Additionally, the following files cannot be loaded from
; Realtime storage unless the storage driver is loaded
; early using 'preload' statements in modules.conf:
;	manager.conf
;	cdr.conf
;	rtp.conf
;
; Named ACLs specified in realtime also can not be used
; from manager.conf unless the storage driver is preloaded.
; Attempting to use a realtime stored named ACL before the
; driver is loaded will result in an invalid ACL which
; rejects all addresses.
;
; Realtime configuration engine
;
; maps a particular family of realtime
; configuration to a given database driver,
; database and table (or uses the name of
; the family if the table is not specified
;
;example => odbc,asterisk,alttable,1
;example => mysql,asterisk,alttable,2
;example2 => ldap,"dc=oxymium,dc=net",example2
;
; Additionally, priorities are now supported for use as failover methods
; for retrieving realtime data.  If one connection fails to retrieve any
; information, the next sequential priority will be tried next.  This
; especially works well with ODBC connections, since res_odbc now caches
; when connection failures occur and prevents immediately retrying those
; connections until after a specified timeout.  Note:  priorities must
; start at 1 and be sequential (i.e. if you have only priorities 1, 2,
; and 4, then 4 will be ignored, because there is no 3).
;
;
; Possible driver backends:
;
; "odbc" is shown in the examples below, but is not the only valid realtime
; engine.  Here are several of the possible options:
;    odbc ... res_config_odbc
;    sqlite3 ... res_config_sqlite3
;    pgsql ... res_config_pgsql
;    curl ... res_config_curl
;    ldap ... res_config_ldap
;    mysql ... res_config_mysql (available via add-ons in menuselect)
;
; Note: The res_config_pgsql backend configures the database used in their
; respective configuration files and ignore the database name configured in
; this file.
;
;iaxusers => odbc,asterisk
;iaxpeers => odbc,asterisk
;ps_endpoints => odbc,asterisk
;ps_auths => odbc,asterisk
;ps_aors => odbc,asterisk
;ps_domain_aliases => odbc,asterisk
;ps_endpoint_id_ips => odbc,asterisk
;ps_outbound_publishes => odbc,asterisk
;ps_inbound_publications = odbc,asterisk
;ps_asterisk_publications = odbc,asterisk
;stir_tn => odbc,asterisk
;voicemail => odbc,asterisk
;extensions => odbc,asterisk
;meetme => mysql,general
;queues => odbc,asterisk
;queue_members => odbc,asterisk
;queue_rules => odbc,asterisk
;acls => odbc,asterisk
;musiconhold => mysql,general
;musiconhold_entry => mysql,general
;queue_log => mysql,general
;
;
; While most dynamic realtime engines are automatically used when defined in
; this file, 'extensions', distinctively, is not.  To activate dynamic realtime
; extensions, you must turn them on in each respective context within
; extensions.conf with a switch statement.  The syntax is:
;      switch => Realtime/[[db_context@]tablename]/<opts>
; The only option available currently is the 'p' option, which disallows
; extension pattern queries to the database.  If you have no patterns defined
; in a particular context, this will save quite a bit of CPU time.  However,
; note that using dynamic realtime extensions is not recommended anymore as a
; best practice; instead, you should consider writing a static dialplan with
; proper data abstraction via a tool like func_odbc.

Fixed by adding these items

ps_endpoints => odbc,asterisk,ps_endpoints
ps_auths => odbc,asterisk,ps_auths
ps_aors => odbc,asterisk,ps_aors

; Other Configuration
extensions => odbc,asterisk,extensions_table
voicemail => odbc,asterisk,voicemail_table

; For CEL (Channel Event Logging)
cel => odbc,asterisk,cel_table

; For CDR (Call Detail Records)
cdr => odbc,asterisk,cdr_table

; Asterisk Realtime Architecture (ARA) Mappings
sippeers => odbc,asterisk,sip_peers
sipusers => odbc,asterisk,sip_users

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.