how to get queue information from asterisk - sip

I am running asterisk on a elastix 2.2 distro. I have a Queue with EXT 9000 where 3 softphone (c#) extensions belong to this round robin queue.
I know that I could trigger a AGI or AMI event from the dialplan and let in some way a webservice know about the length of the queue and then forward this information to the softphones.
Is there any way that the softphones could get this information directly from asterisk. Either something AsteriskBuiltIn or ElastixBuiltIn.
a last resort (baaaaaad) idea was to open a line, call an encoded number like (555*1) and receive back a dtmf. it is a Bad Way but it would work.
Open for any suggestions

Queue drop events into ami.
Also queue log all actions into /var/log/asterisk/queue_log, which is posible put to mysql(see this)
There are no way say how your softphone can catch that event. But for sure you can get that info from mysql and rewrite your softphones to show that info.
Also elastix call center edition have web panel for call center. As option you can check fop2 project for panel.

Related

Will OpenVBX and Twilio handle multiple calls and if one line is busy, go to the next line, etc

Can anyone tell me if my call flow below will work with OpenVBX & Twilio and if so, how to set this up there? I'm using Twilio with a trial number to test it out, but no luck so far. I have downloaded a plugin "OpenVBX-Plugin-Queue-master" that looks like it may work, but I can't get it to. I'm not a telephony expert. I am a programmer. =)
Here is what I need. I need to be able to receive multiple calls at the same time and move the caller to the next available attendants.
They need to hear the main greeting, press 1
Then go to the support group ideally (that is not working for me
right now either)- let's say attendant #1.
If attendant #1 is on the phone, put them on hold briefly listening
to another greeting, then send them to attendant #2
If attendant #2 is busy...repeat the process until I run out of
attendants and then they go to VM.
Here is my install version:
Current Version: 1.2.20
Schema Version: 79
Latest Schema Available: 79
Site Revision: 1026
Any help would be most appreciated!
Support for OpenVBX is not active at this time.
I'd suggest you take a look at the guide for Queues.
https://www.twilio.com/docs/api/twiml/guides/queues
Beginning with queuing your caller (an example in Ruby):
require 'sinatra'
require 'twilio-ruby'
# Handles the POST request from Twilio and generates the TwiML that puts caller in a queue.
post '/caller/?' do
response = Twilio::TwiML::Response.new do |r|
# Use <Enqueue> verb to place caller in a <Queue>
r.Enqueue "Queue Demo"
end
response.text
end
You can handle more sophisticated workflows like iterating through agents via TaskRouter.
And this Call Screening tutorial demonstrates how to handle agent voicemail with production ready code.
Please let me know if this helps at all.

Eclipse Scout Neon Message box triggered on server side

I am wondering if there is a way to trigger message box on server side.
My case is that I have some logic on server side of the scout application. In the middle of the process some decision need to be made. It this case I would like to trigger message box with YES, NO, CANCEL options.
The way my logic works it really hard to split it into two functions and call one first, ask question and call another with on answer. So this is out of the way for me.
If it is not possible to triggered message box on scout service, is there a way to "mimic" it. So call service method, in the middle pause it, go to client side, present messsage box, return to same service method and continue it.
Why do I need this:
I have dependencies graph (between fields) implemented on scout server side.
After one field has been changed, the whole dependencies graph will be resolved.
One node of the graph has some logic that need user interaction. Problem is that I don't know if this method will be called (dependent on a graph), and if after this method other nods will be called.
You have asked a very similar question few months ago:
Scout Eclipse present optional message on server side
MessageBox is a client concept (package is: org.eclipse.scout.rt.client.ui.messagebox).
You need to transfert the data you need from the server to the client and intercept this information client-side to display the message box you want.
As Jmini already said, MessageBox is a client concept. What you can do is sending back a status (from server to client), checking it on client side and show an appropriate message (box). But then you interrupt your service method and cannot go on where it stopped (alternatively you can throw a VetoException, but this interrupts your service method aswell, so same problem). In my opinion, it is also not a good design to 'request' a user interaction from server side, because in this case, the server side has to wait for the user to respond.
I suggest, if possible, to split your logic into different parts. At first, you execute the first part until you reach the point where you need the user interaction. Then you could save the current state of execution, return to client and show the message. After the user has responded, you should start the 'second' execution, depending on the user's input. This second execution should be started by calling another (new) service, which at first should load or restore the state of the execution saved before requesting the user input.

Latest Sofia-Sip responds automatically with 200 to incoming INFO

i am using the sofia-sip library (an open source, cross-platform SIP stack) and what i see is that it responds automatically to incoming SIP INFO even tho' the INFO messages belong to a SIP dialog that has already been destroyed... has anyone experienced the same issue?
Previous version of the library did not seem to show this behaviour.
I'm not sure about any change in behaviour in Sofia-SIP between releases.
If you want to control SIP method handling in your application, rather than letting Sofia-SIP automatically respond to it, then at initialisation you should call nua_set_params() and pass it NUTAG_APPL_METHOD("<METHOD-NAME>"), e.g. NUTAG_APPL_METHOD("INFO").
If you have further questions, you may want to ask on the Sofia-SIP mailing list.

Intro to Event Queues for Web App

I'm trying to implement a basic but flexible "event queue" so that my web app can go run subs asynchronously. The way I have working for me now is the app writes a record to an "event queue" table in my database with info on what to do and when to fire. Then I have a daemon script that queries that table periodically and if something needs to be done, it fires it off.
I'd like to start moving towards watchers using something like AnyEvent or EV so I'm not hitting my database so often, but try as I might, I can't find good info on "best practices" for setting something like this up. AnyEvent's documentation is pretty good, but it seems to assume you know how your events should be passed around...which I don't.
What should my watcher be watching? A file? If so, what should be in that file? I don't need to send a whole bunch of data around, I just basically need something that says, "go off and run this sub right now"
I would greatly appreciate someone pointing me in the right direction.
EDIT:
It's been requested that I be more specific: The events I'm trying to fire are various. Sometimes it's an email that needs sending, sometimes it's some DB work, sometimes I just need an action to be delayed for a few hours or days. In all cases, I have some sort of backend script to handle the action, I just need a way for my frontend (web app) to tell my backend, "hey I need you to go do this in x minutes" or "I need you to do this now"
You might look at Mojolicious which is built to be non-blocking and respond asynchronously. It even uses EV internally if you have it installed. To get started read the doc for Mojolicious::Lite and then the Guides (in order) from here: http://mojolicio.us/perldoc
So what is it that you are actually trying to do? Until you describe what it is you actually need, I can't help you any further that that.
There are some CPAN modules in order to run asynchronous tasks via message queues. Examples:
Queue::DBI
POE::Component::MessageQueue
Any::MQ

Silly WebSphere MQ questions

I have two very basic questions on WebSphere MQ - given that I had been kind of administrating it for past few months I tend to think that these are silly questions
Is there a way to "deactivate" a
queue ? (for example through a
runmqsc command or through the
explorer interface) - I think not. I
think what I can do is just delete
it.
What will happen if I create a
remote queue definition if the real
remote queue is not in place? Will
it cause any issues on the queue
manager? - I think not. I think all
I will have are error messages in
the logs.
Please let me know your thoughts.
Thanks!
1 Is there a way to "deactivate" a
queue?
Yes. You can change the queue attributes like so:
ALTER Q(QUEUE_NAME) PUT(DISABLED) GET(DISABLED)
Any connected applications will receive a return code on the next API call telling them that the queue is no longer available for PUT/GET. If these are well-behaved programs they will then report the error and either end or go into a retry loop.
2 What will happen if I create a
remote queue definition if the real
remote queue is not in place?
The QRemote definition will resolve to a transmit queue. If the message can successfully be placed there your application will receive a return code of zero. (Any unsuccessful PUT will be due to hitting MAXDEPTH or other local problem not connected to the fact that the remote definition does not exist.)
The problem will be visible when the channel tries to deliver the message. If the remote QMgr has a Dead Letter Queue, the message will go there. If not, it will be backed out onto the local XMitQ and the channel will stop.