Realtime Queue Member showing unavailable

I am using Asterisk 16.5.0 and realtime sippeers, queue, queue_member.

If a sipppeer is added in the database, this endpoint can be registered immediately but when we add this endpoint into the queue_member table then no queue call is forwarded to this endpoint.

In CLI, i can see using “queue show” command that this endpoint is showing “Unavailable”.

Unless i reload PJSIP using “pjsip reload”, it remain the same.

So every time a new endpoint is created dynamically, do i have to reload pjsip?

I’m using Asterisk 16.6.2.
if I just insert queue member into queue_member tables. asterisk automatically recongnized it.
I can see a queue member using “queue show” at CLI.

Asterisk automatically recognize it and i can register this endpoint immediatly.
And when we add this endpoint to queue member table, it is shown in the queue member list by “queue show” at CLI but it’s status is unavailable:

7009 (PJSIP/7009) (ringinuse disabled) (realtime) (Unavailable) has taken no calls yet

But “pjsip show endpoint” give that endpoint is registered.

Endpoint: 7009 Unavailable 0 of inf
InAuth: 7009/7009
Aor: 7009 1
Contact: 7009/sip:7009@;transport= f552bd177b NonQual nan
Transport: transport-udp udp 0 0

So even if there is call waiting in the queue, no call is forwarding to this endpoint.

In this state if i use “pjsip reload” then Queue member status change from Unavailable to Noy In Use and call farword to this endpoint.

7009 (PJSIP/7009) (ringinuse disabled) (realtime) (Not in use) has taken no calls yet

sorry for that I didn’t understand fully what you said.

at your reply, there ws a “Endpoint: 7009 unavailable”
in my case, there wa s “Not in use” after typing "pjsip list endpoints’ at CLI

asteriskcti*CLI> pjsip list endpoints
Endpoint: <Endpoint/CID…> <State…> <Channels.>

Endpoint: 0340 Unavailable 0 of inf
Endpoint: 9000 Not in use 0 of inf
Endpoint: 9001 Not in use 0 of inf

I thought that’s endpoint status issue. how about reload pjsip ?

After checking now, it seems to be endpoint status issue.

So dynamically created endpoint’s state remains Unavailable even after registration unless i use “pjsip reload”

In the end my problem remains the same, “every time a new endpoint is created dynamically, do i have to reload pjsip?”

in my case, I don’t need to ‘pjsip reload’.

could you show me a “INSERT” query string for endpint, queuemember.
and give me a result string from “pjsip list endpints”, “pjsip list contacts” at CLI.

Here is my endpoint create query:

insert into ps_auths (auth_type, md5_cred, nonce_lifetime, password, realm, username, id)
values (‘userpass’, null, null, ‘123456’, null, ‘7012’, ‘7012’)

insert into ps_aors (id,max_contacts,remove_existing,authenticate_qualify, contact, default_expiration, mailboxes, maximum_expiration, minimum_expiration, outbound_proxy, qualify_frequency, qualify_timeout, support_path, voicemail_extension)
values (‘7012’,1,‘yes’,null, null, null, null, null, null, null, null, null, null, null)

insert into ps_endpoints (id,transport,disallow,allow, allow_transfer, aors, auth, context, direct_media, dtmf_mode, force_rport, inband_progress )
values (‘7012’, ‘transport-udp’,‘all’,‘alaw,ulaw,gsm’, ‘yes’, ‘7012’, ‘7012’, ‘agent_dialplan’, ‘no’, ‘auto’, null, ‘no’)

After registering endpoint
pjsip list endpints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
Endpoint: 7012 Unavailable 0 of inf

pjsip list contacts

Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Contact: 7012/sip:7012@;transport=UDP; 8960de11db NonQual nan

Queue member add query:

insert into queue_member (interface, membername, paused, penalty, queue_name, id) values(“PJSIP/7012”, “7012”, null, null, “agent_queue”, 731)

I thought there is a issue in database(realtime), not asterisk.
so i did requested you a query string. and I check it with my query string.
BUT, almost is same!!

I add my query string for realtime.
INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media, force_rport, rewrite_contact, rtp_symmetric,
call_group, pickup_group, fax_detect, message_context, accountcode )
VALUES (‘9000’, ‘transport-udp’, ‘9000’, ‘9000’, ‘outbound’, ‘all’, ‘alaw,ulaw,opus’, ‘no’, ‘yes’, ‘yes’, ‘yes’,
‘1’, ‘1’, ‘yes’, ‘SMS’, ‘9000’);

Do you use “qualify_frequency” in aor? What is the value of “qualify_frequency”?

It seems using “qualify_frequency” greater than zero will solve the problem.

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