Push asterisk data to X-lite Softphones - asterisk

I have an asterisk server up and running on a ubuntu machine for my personal project. I can receive calls in mac and make calls with my X-lite softphone on my agent's MacOS. The call center has an IVR with only two options- support, and sales.
Now I want an IVR where we will ask if the customer has an invoice id, if he doesn't have an invoice id, we will connect him to the sales queue. If he has an invoice id, we tell him to press the invoice id followed by #, then we will connect the user to the support queue.
So, I want to send the invoice number to the agent somehow, we want to know if asterisk can push it to the X-lite where it shows the phone number (Incoming call).
Now it shows something like this:
Incoming Call:
01234567891
Suppose the user of this number has pressed 56666 as invoice number, followed by a #.
We want the notification to be like:
Incoming Call:
01234567891 56666
We have come to know that for such cases using AMI to push the data is the best practice. But we can't figure if it is internally possible to change the push notification format on the X-lite softphone without the AMI.
If it's not possible, the next steps would be to build a web UI, where shopper phone no and invoice ID will be shown. It will be taking the data from the localhost AMI NodeJS client. But it will be a hassle for the agents to switch the context between softphone and web browser.

1) ask customer invoice id - use IVR in dialplan, described in any book.
2) write customer invoice_id for agent - use
Set(CALLERID(name)=${invoice_id})

Related

Asterisk issabel auto park

I'm trying to connect my issabel Asterisk with my custom CRM. I want my agents to be able to monitor the incoming calls using AMI events and use AMI commands to redirect any call from the list to there phone devices. I'm able to get all the information from AMI.
Now I use custom extension on inbound routes to dial 700 extension and inbound calls goes to parking lots. My only problem is that Asterisk says to caller the parking lot id.
Any other way to auto park this calls without parking lot announcement?
You can create simple patch for main/parking.c which will issue UserEvent with needed info. Should not be very complex 2-3hr of work for C/C++ expert.
Other option is use Stasis app or dialplan with hold for make parking-like behavour. Or just send user to empty conference and record it's ID.

Encrypt Telegram chat history

I am currently trying to build a telegram bot for connecting emails with a telegram group.
The users should be able to write several messages and (whenever they wish) send the command /sendEmail to send all previously sent messages per email. (Example chat as in the picture below)
As Telegram provides no way to get the chat history, I need to store every single message the moment it is written. But as I don't want any developer to be able to read them, I'd like to encrypt them in a way they can only be decrypted upon sending the email.
Possible data one could use as encryption key:
Encryption code sent by the bot/user (only sent rarely, not every message for the convenience of the user. Like in the picture)
Does anyone know of a way to encrypt all messages until the user sends sendEmail?

Use Skype for Business UCWA 2.0 API to dial internal SFB number and then dial outbound number

I am trying to use the SFB UWCA API to start a conversation to create a click-to-call experience on an internal web app. The workflow look like the following:
Click on phone number on web app and make callback to server to execute API code on the server.
Make request to UCWA API to using the startPhoneAudio resource with the following attributes: phoneNumber = tel:+1205xxxxxxx, to = tel:+1205xxxxxxx along with a few other attributes.
UCWA then starts dials the number supplied in the phoneNumber property. After the user picks up the phone the outbound call is started.
Here is where I am having an issue. I have been playing around with some sample projects linked below to test some flows. Using the callviaphone codeplex project I have am able to use the startPhoneAudio to start a call.
Basically when using the UCWA resource startPhoneAudio, it will not work when the phoneNumber property is set to an internal SFB number assigned to an enterprise voice user. If you put in any external number for the phoneNumber property (i.e.: cell phone) startPhoneAudio will work. It will call you and when you pick it will dial the number supplied in the "to" property of the startPhoneAudio resource. Here is the crazy part, the number used for the "t" property can actually be a one of your internal numbers associated with you SFB topology.
With the referenced callviawork project, when our use your internal SFB number in the phoneNumber property it will start the conversation, but when you pickup your desk phone assigned to your SFB account the call disconnects.
I am trying to figure out why the call just disconnects. It only disconnects when you use the internal phone numbers assigned to SFB users. I know that the startPhoneAudio was made to support the call-via-work option inside of SFB. This allows you to utilize your existing legacy PBX. However, I don't understand why the call disconnects once the user picks up there phone.
http://callviaphone.codeplex.com/
Here is an old question that was never answered, but hopefully we can figure out what is going on this time.
Initiating a phone call using UCWA
I think it does not work for the same reason why you cannot call yourself with Skype for Business.
It does not matter whether you try to call your own SIP URI or your landline number associated with your SIP URI. This is exactly what happens in your scenario - you as a user are calling your own PSTN phone number in the first call leg before you start the second leg to the second number. Skype for Business does a reverse number lookup of your Skype for Business PSTN number and tries to call your SIP URI which is not a valid case for a successful call.

asterisk send event to a web app when the phone ring

I have a hardphone that register to asterisk 11.8. When someone call this phone, information about user input ivr and user phone number is inside asterisk, is it possible to expose these information to the outside app. For example, I have a webapp, that when the user type in the account number via ivr, the web app, can pull this information back to display the user information. I am a bit new to asterisk and was previously use Freeswitch.
I start reading something about Asterisk AMI, that there are manager event that sending from asterisk to AMI client. So can it be like this. When the phone rang, there will be an event that send to me web app, this event contain information about the phone number of the caller, and what he/she type in for IVR? Can AMI do something like that? I check asterisk AMI event documentation https://wiki.asterisk.org/wiki/display/AST/AMI+Event+Documentation, but I dont see any event like "calling"
Please guide me, you can just provide me high level general information and I can start looking further. THank you
Yes. Asterisk does store that kind of information - the incoming number, the duration of the call etc. It is present in the form of a csv file that can be accessed at:
/var/log/asterisk/cdr-*
You can write code to access these logs and get needed information about them.
EDIT to answer comment:
While I am not sure if this information is stored after a call is disconnected, you can write a dialplan to get what you are doing. As soon as a call is received on the extension, the dialplan should:
- Get the incoming call number and send that to a webapp. I think this should be very easy.

How to implement bulk mailing using windows service on a schedule basis?

I've a requirement in which i need to send 10000+ mails on a quarterly basis. For this purpose i used a windows service that triggers every day and executes the mailing functionality only after the third month. I've to fetch last three months records from database and need to send one mail for each record.
The problem i faced was the mail server i used do not allow bulk mailing.
How can i do this effectively by providing a delay between each sent (20 mails per minute)?
There are many way to archieve this. We once had a similar requirement and solved it via a home grown service, which would fetch items from a special database table (mail queue) and sent each mail individially. The queue is filled over time by regular business logic. The necessary locking can also be done via db: a SCHEDULE column stores the expected scheduled time of sending the mail. That way the service collects only those mails wich are 'ready' for sending. After successfull send, another column (SENT_TIMESTAMP) is used to mark the success.
We implemented the whole service in ASP and triggered it via regular Windows Task Planner jobs. In your case, the service would start every minute and the queue would provide the next 20 mails. An even easier way could be to utilize SQL Server Jobs. SQL Server is capable of delivering mails to a local SMTP server as well.
If not done yet, please note that SO question as well: What is the best way to send large batches of emails in ASP.NET?

Resources