When sending a fax using spandsp/asterisk/app_fax, it would really be nice to see more granular status events being fired.
Right now, it just looks like AMI events are fired when the call is started and when the call finishes. I'm looking to get more detailed info like "DIALING", "SENDING PAGE 1", etc.
Is there a way (either using the AMI or another method) to get this information?
I know it definitely exists somewhere, as I can see DEBUG statements with this information in the logs. I can't (and don't want to) parse the log files, as the DEBUG statements don't really say which call they relate to.
Thanks!
no
but nojee fax project did special patch for app_fax.c to give more verbosity.
probably u can create patch for app_fax.c to show needed info.
Related
I'm writing a Meteor app which allows clients to execute terminal commands on the server at the click of a button.
I know how to do this with a single command:
//server
Meteor.methods({ exec : cmd => { ... } })
//client
Meteor.call('exec', cmd, (err, result) => {
console.log(result)
})
But now I'm trying to implement a more complex protocol and don't quite know what the best way is. I want the client to kick off a series of commands, have the server run them and tell me, step by step, whether they succeeded or failed.
Obviously I could implement this with the above code by writing client-side code that runs exec with the first command, checks the result from the server, runs exec with the next command and so on.
The crux is that in my case the series of commands is always the same, so it would make much more sense to only do one Meteor.call on the client -- the server would know what commands to run. However I would also like to have the results of the individual commands available on the client as they come in -- and this is what I can't do, because Meteor.call only returns once, of course.
What I'm looking for is a sort of stream or iterator through which I can send a number of messages to the client until everything is done. I've seen some outdated packages called meteor-streams and similar that might be able to do something like that, but I'm thinking there must be a smart way in Meteor itself to solve this. Ideas?
A common solution is a Notifications collection. Create the collection with a schema: for: ${userid}, msg: ${msg string}, type: ${err success etc}. Create a Notifications publication, which publishes docs with the users userid.
You can then subscribe to the Notifications collection in some main template page on the client. Use observeChanges to look for changes to the collection and either console.log them, use JavaScript to display them on the page or simply install a package like sAlerts to handle them.
Inside the observe changes callback, a seenNotification method should be called which removes the notification from the db, so it is not shown again.
I'll post code snippets a bit later.
Have a look at this: https://github.com/RocketChat/meteor-streamer
I think it will solve your problem easily.
I logged in using agc (agent) panel in vicidial and just to test manual dial, I just executed following MySql query fron cmd.
UPDATE vicidial_live_agents set external_dial='12122351880!!YES!NO!YES!!1478530720!!!!!!' where user='1001';
After this , i got a a call on my softphone (already configured).
I am unable to understand one thing, How can an explicit entry to the vicidial_live_agents table of mysql, make a call ?
You shouldn't be messing with the database for calls.
If you configured everything correctly, you should recieve a call as soon as you log-in which will send you to a conference, you should hear a voice confirming it (you are the only one in this conference), all future calls will be connected to that conference, you should keep that call at all times and not control anything in the softphone.
If you need to make a manual calls you can either set the "Manual Dial Override" option in the campaign to "ALLOW ALL", which will enable a link in the agent screen labeled "Manual Dial" or you can use the agent_api with the external_dial function.
What you have found is the raw method that the Agent API uses to implement a manual dial call. For more information on how the Agent API works, and for all of the options you can use with the "external_dial" function, take a look at the Agent API documentation:
http://vicidial.org/docs/AGENT_API.txt
How to get the user who initiated the process in IBM BPM 8.5. I want to reassign my task to the user who actually initiated the process. How it can be achieved in IBM BPM?
There are several ways to get that who initiated a Task , But who initiated a process Instance is somewhat different.
You can perform one out of the following :
Add a private variable and assign it tw.system.user_loginName at the POST of start. you can access that variable for user who initiated the process.(It will be null or undefined for the scenario if task is initiated by some REST API or UCA.)
Place a Tracking group after Start event . Add a input variable to it as username , assign it a value same as tw.system.user_loginName. So whenever Process is started entry will be inserted to DB Table.You can retrieve this value from that view in PerformanceDB.
Also there might be some table ,logging the process Instances details , where you can find the user_id directly.
I suggest you to look in getStarter() method of ProcessInstanceData API.
Official Documentation on API
This link on IBM Developerworks should help you too: Process Starter
Unfortunately there's not an Out Of The Box way to do this - nothing is recorded in the Process Instance that indicates "who" started a process. I presume this is because there are many ways to launch a process instance - from the Portal, via a Message Event, from an API call, etc.
Perhaps the best way to handle this is to add a required Input parameter to your BPD, and supply "who" started the process when you launch it. Unfortunately you can't supply any inputs from the OOTB Portal "New", but you can easilty build your own "launcher".
If you want to route the first task in process to the user that started the process the easiest approach is to simply put the start point in the lane, and on the activity select routing to "Last User In Lane". This will take care of the use case for you without requiring that you do the book keeping to track the user.
Its been a while since I've implemented this, so I can't remember if it will work elegantly if you have system steps before the first task, but this can easily be handled by moving the system steps into the human service to be executed as part of that call, rather than as a separate step in the BPD.
Define variable as string type and using script task to define the login user that use this task and assign it to your defined variable to keep to you in all of the process as initiator of the task.
You can use this line of code to achieve the same:
tw.system.user_loginName
I have a database where one entry is structured like so:
number_to_call date file_to_play
Using asterisk, I need to do the following:
1. Check the database daily.
2. If date matches that of today's, then initiate call on number.
3. Once phone has been picked up, play file_to_play.
Some general pointers on how I even begin to do this would be great.
Most of the applications that I have written so far have worked on incoming calls. I have the following questions:
1. How do I write a "daemon" that will check the database? Asterisk should have both user and group privileges for it to execute properly. How do I do this?
2. Can I initiate an outgoing call from outside of the asterisk dialplan?
The calls are being made to a PSTN/mobile number.
You can Write any script Which can check DB on daily basis and once it maches the date range you can initiate a call using .call files.
Please study asterisk auto-dial out from voip-info.org - I think you can understand better then.
You can run your script for same user as asterisk runs there is also one more method to initiate call from linux which we can call Originate CLI command which can also refer to http://voip-info.org/.
In general it is not a great idea to write your own dialer, unless your volume is very very low. Where I work, we started rolling our own but at the end went with a commercial solution that handled most of the logic. There are a number of commercial and free solutions out there, so don't reinvent the wheel.
See my answer to https://stackoverflow.com/questions/11666755/outbound-dialer-using-asterisk/14589901#14589901 for why it is not a good idea to roll your own.
Can anyone recommend a fairly clean method for determining the process scheduler an app-engine is running on at run-time (NT or UNIX). I need to set a file path that is obviously dependent upon the server the process is being executed on. I understand the GetEnv command can be used, but I don't want to set an environment variable for this particular instance (it does not reside under the PS_FILES) path. I've searched peoplebooks for any kind of built in function or system variable, but was not successful (obviously).
Any suggestions would be appreciated.
Thanks
Okay, I may have asked this question a little too early. I apologize.
It looks like I'll just be able to query the process request table to pull back the server name:
SQLExec("SELECT SERVERNAMERUN FROM PSPRCSRQST WHERE PRCSINSTANCE = :1", &thisProcess, &server);
Evaluate &server
When.......
End-Evaluate;
Exactly :-)
There are a host of Process Request records that can give you the information you need. Glad that you found it.
John