[asterisk-users] PJSIP realtime: lots of problems

Joshua Colp jcolp at digium.com
Thu Oct 8 12:35:32 CDT 2015


On 15-10-08 02:32 PM, Michael Ulitskiy wrote:
> Hello,
>
> I wonder if anybody is using PJSIP realtime in production environment?

They are.

<snip>

>
> 1. The biggest problem: if I have small number of endpoints (roughly up
> to a 100) then
>
> asterisk loads ok and pjsip seems to be working ok (with other problems
> described below).
>
> If I have larger number of endpoints (several hundred) then
> intermittently (but often) asterisk
>
> just hangs during loading. Attempting to start asterisk with console
> (-c) it never reaches the user
>
> prompt. pjsip isn't functional (doesn't reply to any sip messages). the
> only way out is to kill asterisk.
>
> It looks like I'm hitting some limit here. Am I doing something wrong?
> Is there any config
>
> option I'm missing?

Nope, you'd have to attach gdb to Asterisk and determine where it is 
hanging. It may still be loading stuff.

>
> 2. When it loads ok then it performs initial load of all endpoints
> individually. Looking at postgres
>
> log it does the following:
>
> SELECT * FROM pjsip_endpoints_v WHERE id LIKE '%' ORDER BY id
>
> SELECT * FROM pjsip_endpoints_v WHERE id = 'ep1'
>
> SELECT * FROM pjsip_endpoints_v WHERE id = 'ep2'
>
> ...
>
> SELECT * FROM pjsip_endpoints_v WHERE id = 'epN'
>
> Needless to say it's extremely inefficient with larger number of endpoints.
>
> After this initial load it seems to work correctly - loading endpoints
> on demand and caching them if I configure caching.
>
> Is there a way to disable this initial load? I want it to load endpoints
> on demand only.
>
> 3. When pjsip receives sip message and tries to match it to endpoint by
> 'From' username it initially
>
> performs lookup for 'username at domain' and if it fails it falls back to
> lookup by username only.
>
> Looking at the postgres log it looks like the following:
>
> SELECT * FROM pjsip_endpoints_v WHERE id = 'ep1 at domain'
>
> SELECT * FROM pjsip_endpoints_v WHERE id = 'ep1'
>
> In my environment the domain part may be different (depending on which
> proxy the user is terminated) and
>
> I want to perform lookup on userpart only. Is there a way to tell pjsip
> to ignore the domain? Otherwise it doubles
>
> the number of queries per request and that's again extremely inefficient.

The answer to both of your questions is no, there is currently no way to 
disable either.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list