Asterisk 13.13 with PJSIP on Realtime


#1

Hi,

When I using static my configuration is working perfectly but when I am changing it to realtime with mysql db somehow it is not showing >pjsip show endpoints

Below is my configuration:

sorcery file:
[res_pjsip]
endpoint=realtime,ps_endpoints
;endpoint=config,pjsip.conf,criteria=type=endpoint
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

extconfig file
[settings]
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk

For tables I have used alembic and tables created succesfully

When I am trying to register it is not registering and giving me the error

[Sep 13 06:13:06] NOTICE[61437]: res_pjsip/pjsip_distributor.c:508 log_failed_request: Request ‘REGISTER’ from ‘sip:101@192.168.2.116’ failed for ‘192.168.2.214:61945’ (callid: 4d133de913a845d7a86dfda1b7d9b007) - No matching endpoint found

What else I have missed the point ? Please suggest


#2

Have you checked the console output to see if there’s anything of note? Is ODBC also configured on the system? How does your setup compare to the wiki[1]?

[1] https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime


#3

ODBC showing

localhost*CLI> odbc show all

ODBC DSN Settings

Name: asterisk
DSN: asterisk
Last connection attempt: 2017-09-13 06:04:34
Number of active connections: 0 (out of 1)

==================

And yes I have only followed the wiki[1]
[1] https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime

=================

Console shows the above error on my first post while registering and when I run a command
localhost*CLI> pjsip show endpoints
No object specified.

Anything else I can check for?


#4

Your ODBC does not appear to be connecting. This is usually because it is not configured properly. I don’t have much experience in that area, but that’s where you should focus your efforts.


#5

Thank you so much as I was using centos 6.9 and my ODBC was 5.3 so I downgraded to 5.1 and now it shows

ODBC DSN Settings

Name: asterisk
DSN: asterisk
Last connection attempt: 1969-12-31 16:00:00
Number of active connections: 1 (out of 1)

Thanks once again


#6

But the sad part is still it is not registering and showing no objects
localhost*CLI> pjsip show endpoints
No object specified.


#7

But the sad part is still it is not registering and showing no objects
localhost*CLI> pjsip show endpoints
No object specified.

@jcolp can you please suggest anything else as I have checked everything but still no luck


#8

I don’t use ODBC so I’d suggest trying to narrow things down further. Compare again your configuration between the wiki (which is known to work) and yours. Turn on debug in logger.conf and use core set debug 9 to see if ODBC is being queried for things.


#9

Hi @jcolp
Thanks…after correcting ODBC issue what you suggested I ran module unload and load chan pjsip and it is working fine now and showing

localhost*CLI> pjsip show endpoints
Endpoint: 101 Unavailable 0 of inf
InAuth: 101/101
Aor: 101 1
Transport: transport-udp udp 0 0 0.0.0.0:5060

Once again thanks… :slight_smile: