Detect event when the user picks up phone without dialing - asterisk

I am currently linking asterisk to a web application, I am able, via AMI telnet connection, to detect when the line is ringing, when the user is dialing, when he hangs up.
I really would like to know when he picks up the phone but do not compose/dial anything, just taking the phone in his hand.
In telnet on AMI, nothing happens until he really dials something.
Can you help me detecting this event please ?

Phone do nothing when you pickup it, unless it have "Hot-line" feature.
So asterisk even never know you do that.
You need find ATA or Phone with Hot-line and enable that. If so, phone will call hot-line number when you pickup it.

Related

Asterisk conference call works with Polycom phone, but how to make it work with microsip soft-phone

We have a vanilla Asterisk box with a bunch of Polycom 550 phones. On the phone there is a conf softbutton that when I'm on a call talking to someone, I hit the conf button, dial a third party, wait for them to answer, then hit conf button again and then all three of us are on the same call.
Now I want to have a soft phone on my pc at home without the polycom phone. I can dial and transfer and everything works, but I can't figure out how to do this type of conference call.
I have googled, but keep finding meetme or conference room instructions. I think *2 does the transfer, but what can I do to make old fashioned conference calls (without a conference room).
I don't have anything in my /etc/asterisk/features files regarding this to tell me the buttons to hit.
The Polycom phones seem to use only one line when I make a conference on on them.
I'd consider different softphone program if necessary.
We found in the MicroSip Settings a checkbox for "disable multiline" that is checked by default. Unchecking this let us do 3 way conference calling.

Is it possible to us RxAndroiBle, autoconnect in foreground?

I will try to post a question since I want to use RxAndroidBle. I want to connect to a device even though I am not running my application, I don`t mind if any service is running. Moreover if possible when I get close to the device with my phone, it automatically launches the application. What would be the drill for something like this?
You could register broadcast receiver with specific filter which will wakes up your app when BLE device is available

Asterisk silence until agent answers

Interesting issue I have never run into before with Asterisk.
Using Asterisk 1.8.x (please don't tell me to upgrade, it's not possible at this time).
When someone dial direct into the system to any of the numbers, we Answer, then push them to a queue and either play MOH on Ring sound.
This has always worked fine and still does. Most people forward calls to our numbers from their business line/phone system.
For this one customer and only one customer, there is complete silence for the caller once their phone system initiates the forward to our number. Our Asterisk box answers the call, we have even tried playing sounds using Playback etc but nothing, complete silence until one of the agents answers from the queue.
Really bizarre. canreinvite=no is set so, there shouldn't be any issues with Asterisk getting optimized out.
Any ideas a really appreciated. I know it's on their end but, it would be great to find a way to make Asterisk, make the customer's phone system behave correctly LOL.
You would have to take a wireshark trace at Asterisk box and check INVITE offer and 200OK response from asterisk. Then make sure that media RTP are sent to IP address in connection information line c= and port specified on m= media line. You also should check if rtp payload (codec) match the request and answer. Asterisk probably will respond with one codec from INVITE offer. When media are sent but caller does not hear anything before an agent answer the issue is probably on caller side. Hope helped a bit to tracę the issue.
I had the same problem once, but the other way around. I was the client dialing into someone else's system using my asterisk system. I tried everything in my hand, including pestering my (E1) telephony provider to no avail.
To this day I still don't know the reason for this behaviour, but I've managed to get around by Answering the call originated from my system BEFORE dialing the PSTN, thou this is far from ideal.
Something like this:
Answer()
...
Dial(YADAYADAYADA)
I know this isn't exactly the answer to your problem, but I hope it helps in any way.
Very likly you have issues with codecs. I.e customer use some codec you have no translation module, but agent's customer have

Check if a phone number is valid and active in asterisk

I would like to know if there is a way to check if a phone number is a real number and active, not a fake number or disconnected number. I would like to import only working numbers into our crm and block phone numbers that look real but do not have a dial tone.
something like ping for phone number with asterisk where I would in a way call the phone without making it ring so I can verify the phone is not disco or bad phone. Is this possible?
This is not possible. Even the phone companies cannot do it to numbers that are not theirs, so customers certainly can't.
This is possible. You can create a application which will pick/select the number and dial via AMI originate command. You have to capture AMI events and wait for originate command success response, after that status = Ringing. Once it ring send the hangup command on the channel via AMI. Now this number is valid and correct. This would be 85-95% accuracy. Hope you got some idea!! Let me know if you have any questions.
Within North America you need to do LNP / LRN query to check if the phone exists or not and also get the termination/outbound costs. Sometimes it's useful if you want to know from which state this number had been generated(even though it's not accurate due to numbers portability )
Here is one of the service provider
https://www.alcazarnetworks.com/data_services_lnp_lrn.php
FYI: I'm nor working for this company neither sponsoring them or recommending them. I just used them in the past.

Setting up Asterisk Behavior (A dialing-queue, and three phones picking up calls from that queue)

I managed to setup Asterisk, FreePBX, and a VoIP Software Phone. I can make and receive calls through my Asterisk server, but now I need to setup the following behavior:
I want to have 3 software phones listening to a queue. The queue is constantly dialing 4 to 6 phone numbers simultaneously, and whenever someone picks up, that conversation is branched to one of the soft phones. When a phone number fails (i.e. no one picks up) it is removed from the queue. Also, if all 3 soft-phones are busy handling calls, the phone calls in the queue are dropped, and the queue stops dialing until a software phone is available again. The queue will work its way down a list of phone numbers. I should be able to add to this list on-the-fly. That is, during the course of 10 phone calls, I should be able to add say 5 new phone numbers to the queue without having to restart the program or rebuild anything (I am okay with programming scripts. I know javascript, C#, php, and can handle linux commands). How might I go about doing this? Or at least, where is a good place to start?
Look here
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ACD_id285928.html
But better read entire book.

Resources