How to call PJSIP Externally via queues.conf?

queues.conf

support
timeout=15
;member=>PJSIP/anoluck
;member=>Local/1337@default
;member=>Motif/google_endpoint/14075555555@voice.google.com
member=>PJSIP/14075555555@sipProvider

I’ve tested all of these members
PJSIP/anoluck calls locally (works)
Local/1337@default calls locally (works)
Google Motif calls externally (works)
PJSIP/14075555555@sipProvider does NOT call at all (Problem)

I want it to call externally through my sip provider via queues.conf

Is this possible? Is this by design?
I’m still new to Asterisk so I’m still learning…
Please help
Thanks!

The app_queue module uses device state to know when to call a device. As “sipProvider” can be used for different numbers at the same time it’s entirely possible that the device state is “in use” and thus it isn’t called. The only way to overcome that would be to use a Local channel. This is only a guess though, you’ll need to provide more information such as console output and the output of “queue show” to confirm it.

1 Like

Thanks for for the response!

Basically, I want to create a queue where my reps can add their cell phone numbers in a hunt group fashion.

I’m using Anveo which uses IP authentication for outgoing calls and incoming calls apparently, after I did more research, it appears asterisk doesn’t keep track of the Anveo status; correct me if I’m wrong.

The PJSIP endpoint will have a device state, and if it’s in use then it’ll be in use. You’ll need to provide the information I mentioned in order to go further.

Softphone Robert<1002> ====> SIP.us trunk
—>
Google Voice Answer ====> Sends to Queues
—>
Stays in Queues (Music Plays) ==X==> does not go to my Cell phone via Trunk Anveo

To verify I added (softphone):
member=> PJSIP/anoluck
and it rings

Let me know if you need to see pjsip.conf and/or extensions.conf

Thanks again for such fast replies, I just got off work so I was able to snap shot the console and file for you

The “anveodirect_endpoint” is considered invalid. I’d suggest providing the configuration for that minus credentials, you can also do a “pjsip show endpoint anveodirect_endpoint” and provide that. Finally I’d look at the console output at startup and see the order in which things are being loaded. You may have encountered a situation where app_queue is not being told that the endpoint is valid and available.

I did see it stated it was invalid in the console. Thanks
I’m also using SIP.us and when I tried using their trunk in queue, it also didn’t work.

I post the info screen shot below
pjsip.conf
pjsip show endpoint anveodirect_endpoint
pjsip show endpoint sipus_endpoint

Please let me know if I did anything incorrectly in my pjsip as this is my first time configuring Asterisk

Did you look at the console at startup to see if there was anything of note?

I don’t see warning but I do see many NOTICE!
You can take a look but what do you think the problem is?

Instead of taking pictures I’d highly suggest copy/pasting into a pastebin[1] and providing the link.

[1] https://pastebin.com/

1 Like

That seem like a better idea lol Thanks

The reason I did took screen shot is because it has highlights which I thought would be better to spot errors
but if pastebin is the preferred method, that’ll be easier for me :slight_smile:

https://pastebin.com/Ehjbqhzf

Ah, I think I see what is going on. The endpoint provided is invalid when it comes to retrieving device state. Using a member like:

member => PJSIP/100@test,,,PJSIP/test

Would work, of course replacing the number and the endpoint name. You’d still likely run into the problem I stated before though where if a call is in progress using that trunk then app_queue would not call it - this can be overcome by telling the queue to ring the member even while in use:

member => PJSIP/100@test,,,PJSIP/test,yes

4 Likes

OMG! You’re freaking awesome!!! It works!

Thanks to you I don’t have to route the queue to the dial plan in FILE extensions.conf and listen for events from AMI events :slight_smile:

If I could give you a hug right now I would!. I been pulling my hair out for this problem for days.

BTW How did you troubleshoot that? Did you find something in the console output that lead you to that solution? i’d like to be a better asterisk administer so if you could provide me advice on how you figure this out, that would be awesome!

I read the code to see if what it would do with a dial string when asked for device state. It assumes it will get an endpoint, not a dial string, so it returned invalid. After that I just looked at the sample queues.conf to see how you specify another device to use for device state and how to tell it to ring the member regardless.

1 Like

Cool! So basically asterisk didn’t know what to do with a dial string. I did see it said invalid but I looked in the sample queues.conf and the example and explanation was very vague. I wasn’t aware that “state_interface” in

syntax: member => interface,[,penalty][,membername][,state_interface][,ringinuse]

was the provider endpoint because the example they gave didn’t provide me any correlation between “Local” and “SIP” in the providing example…

member => Local/2000@default,0,Lorem Ipsum,SIP/2000,no

Thanks for clearing that up. I’m now so glad I join and hopefully one day I can be an asset to the community like you have been to me.

I notice Google / MOTIF when placed in Queue has a status of Unknown, it works fine but is this by design? Is there a way to make it normal like “Not in use”

member => Motif/google_anoluck_endpoint/14075550000@voice.google.com,0,Google,Motif/google_anoluck_endpoint

Btw I wasnt sure whether to open another topic or continue with this one.
lmk if I should open another