How can I detect who has picked up the call?

Hey, I’m new to this community, although I’ve been messing around with Asterisk and FreePBX for a while, I have a project in progress, but I would like to get some advice on the best way to go about it. The project consists of a network of cab drivers, which previously had a much worse system, and in the company where I am I have been forced to use Asterisk and FreePBX (I have discovered that I really like Asterisk).

My problem, which I do not know how to start correctly, is to my understanding, simple.

A customer calls the cab network, the customer and the first cab driver who takes the call from the customer can talk, the rest of the cab drivers (55 in total) cannot talk and only listen. But if the cab driver who has picked up the call is 1 hour away from the customer, he can pass the right to speak to another cab driver who is closer.

Any ideas?

(I’m a bit lost because I’m 17, I’m in a professional programming training, and I’ve coded mainly C# and Kotlin)

Thanks! Bruce

I mean the real answer here is to hire a dispatcher that can take all the calls and determine which cab driver is available to take the pickup.

1.) How will other people calling for a cab be handled if all 55 drivers are on a single call with someone looking for a cab?

2.) How will the driver in the call know how close they are to the caller looking for a cab? They going to punch in something in someway to determine their distance?

3.) If said cab driver is too far away from the person, how will they know the distance of the other 54 cab drivers to the caller? Then how are they transferring the call since they are all on the call together?

4.) Drivers that are on a job with the meter running. Will they be part of the calls for the new pickup? Even though they already have a fare, they could still be the closest and quickest to get there? Are drivers with active fares going to be included in this call?

5.) Is the expectation that the drivers are all doing this while driving?

As I said, there is a reason cab companies hire dispatchers and it sounds like that what this company needs.

2 Likes

I do not think this is a logical approach, but have you considered some app that records the taxi’s or drivers (via phone app) location. Have the customer provide the address, do a lookup and only call drivers within x units of measurement. Have the phone call the drivers in a queue format, where it tells them the location prior to connecting the customer. If they cannot take it, they don’t connect to the customer and the queue call tries the next closest cab driver. It would be better if there was a mechanism that recorded if they were on an active fare or not, then you could exclude those users.

It’s a great idea, I really appreciate the idea, but unfortunately. My company wants to stick to using FreePBX and Asterisk for everything, because they don’t want to have to design an application (when maybe you are right and there is already one that does this for us). These mechanisms look very good, I will try to convince the company.

I want to thank both you and @BlazeStudios, as I’m planning new things for the company I’m in, surely something will change.

To be honest, I think that having a dispatcher is necessary, but, according to what I have been told. They want this (so to speak) “call pickup” service to do everything between Asterisk and FreePBX.

Based on the ideas discussed in the meetings I’ve been to, I’ll respond with what I have written down for each question:

1): For each call to the service all taxi drivers will be called, each of them can choose whether to pick up the call or not (I wrote down calls, but then I was told to do conferences). Also, for each call, there will be two conferences: The conference in which everyone listens to the client and the conference in which the other taxi drivers speak.

2): Because as they are listening they can know the location, I will give an example, if the customer is 5km away, but there is another taxi driver who has listened just in the area where he is. So he negotiates with the other taxi drivers who are listening to keep the client.

3): This is the part I have the most doubts about, because I question very much whether what they say they do in the company works. But this is the proposed solution, the taxi driver who has taken the call (let’s say his name is X). X can switch to the conference where the rest of the taxi drivers are and ask: Who gets the customer? Whoever gets the customer (for argumentation, distance or any other nonsense). X goes back to the conference with the client and says: “A colleague of mine will pick you up because he is closer” and from there he gets this taxi driver who stays with the client and X leaves the conference.

4): I said this already, and you are absolutely right, as it has a lot to do with whether they have the counter running or not. But, my company has narrowed it down to two conditions:

Available and unavailable.

Available: You can have the meter running, you can be still and you can be without the meter.

Unavailable: You have a customer, you have no more hours in a day and/or you are going to pick up a customer.

This is raised by two codes:
*01 → Available.
*00 → Unavailable.

5): Sadly, as I would prefer to make life easier for them, but, yes, everything while driving. It is also true that my company is dedicated to making software, websites, and applications, and it is the taxi drivers who refuse to pay more for an app.

But I’m almost new in the company and I can’t do more than keep making this “app” with Asterisk and FreePBX :confused:

How do they expect a taxi driver to be on two calls at once? Are the drivers going to have two phones they have to answer?

So they want a taxi driver with a fare in the car playing with their phone, jumping between conference calls and negotiating with drivers over another fare? All while they are supposed to be paying attention and watching the road? Not just to avoid an accident but to not miss a turn or miss a stop because X and Zed were fighting over who gets the next fare.

The solution being proposed, to me, is not very great and will result in a bunch of issues.

What happens when a second call comes in while the drivers are dealing with an active call in two different conference bridges?

I understand. At certain points you just have to show them by doing. They can make adjustments after the fully understand the gaps. Look at Asterisk Listen, Barge and Whisper functionality.

One of my issues with this is the calling the drivers twice and putting them in two different conference bridges. They can’t listen/talk in both at the same time. Even then, putting the caller in a conf bridge with 30 drivers. Which driver is the leader/talker? You will need to mute 29 other drivers in the conference with the caller.

Yes, this point does not take into account the fact that two phones are needed. I have tried to put the same phone in two conferences and as such it is not possible.

To be honest, I don’t think that the company that runs this issue would like to have to put up the money for another 50 or so mobiles. Today I will talk about it in a meeting that I have called thanks to the doubts and answers that I have had from you and @comtech. So I hope they give me a minimally acceptable answer so that I don’t have to make an application that, for now, I can see that it’s not going to work.

I know it may sound strange, but it is clear to me that these people can keep an eye on who the client wants to keep. Simply because now they have an even worse system, the system they have now technologically speaking is a PBX that says: “We are waiting for an answer with the right taxi” which is connected to a loudspeaker. This loudspeaker sounds directly to what it sounds like when you call. From there, all the taxi drivers in a WhatsApp group are arguing to get the customer. Then there is a person who is waiting for the group to pass the call on to the phone number of the one who gets the client.

So surely a good call-handling system would make their job easier, although I’m sure there would be a better way.

I understand your point, the truth is that I don’t love it either, but I also know that I’m going to have to adapt things a bit to make them “better”.

The customer would be put on hold, that’s the only thing I can think of when it comes to finding available taxi drivers.

I’m going to start looking at those features, thank you very much and see if I can get, even if it is a little half with someone else the project (finally I will no longer be alone in front of the monitor looking to do this).:heart:

Honestly, I don’t think we’ve even thought about it, I really appreciate what you’ve just said. What we had said is that there is a conference where all the taxi drivers (all those who have accepted the call) are present, and they can all talk to discuss who gets the client. And on the other hand, there is another conference where there is the client and the first taxi driver who has taken the call, but the rest can only listen.

Although there is no consideration for the fact that this can happen more than once per moment, so yes, you will probably have to talk to the company and the other person who will also be with this “app”.

You are right. You could make it an app or a person, but there is really no good way around this without having a middleman, engaging specific drivers.

sounds like you should be looking for real-time gps tracking, look at things like Verizoncojnnect.com or Capterra.com

These are kinda like what Uber and Lyft use

1 Like

Hey! Yesterday at the end of the day I had a meeting with them, they were telling me that in the end, this application will be done at the end of this year. But, that now they want to do a minimum test, even if it is not the most optimal. What they need according to their words (which for me, is still a not so useful way) is this:

Two conferences, one in which all taxi drivers talk and one in which the client calls and only one taxi driver can talk, but the rest listen. And when the customer calls the phone number, the taxi drivers are automatically put into the two conferences.

In one of them, there is obviously no Pin, because it is the one where all the taxi drivers are, and the customer will not have access. But in the one where the client is, a Pin is needed so that there is an administrator taxi driver (the one who can speak) and a normal taxi driver (the one who can’t speak) (admin-user and user). I have two problems on how to deal with this.

How do I automatically call, pick up the taxi drivers and put them in the conference, and how do I make the client not ask for the pin and be able to talk?

Thanks for the information! We would probably end up at some of these services, but, thank you for opening my eyes. I’m going to see if my partner wants to try it, because, if it were up to me, I would have made an application.

Let’s see if my company likes this (because, lately, they don’t like any of my proposals :smiling_face_with_tear:).

The problem here is that all parties involved have the same issue, they lack knowledge and understanding on how PBX systems (Asterisk in particular) function and how FreePBX interacts with Asterisk. If so, no one would be thinking about using FreePBX unless they took into consideration there was going to be customization and modifications done to it. FreePBX won’t be able to do some of the needed things by default.

For this to work it will mean that all the drivers will need an extension on the PBX and use softphones, that can support auto answering, on their mobile phones. You can’t do this with normal calls to the mobile phones.

You still haven’t provided any insight on how additional calls will be handled or should be handled. Because there will be times that more than one person is calling in for a taxi.

Having drivers in two conference bridges concurrently is a waste. The driver can only be active in one conference at a time meaning they are putting the second conference on hold. If all the drivers are in the Fare/Drivers conference listening to the fare and admin talk, you have a conference bridge sitting with 30 channels in it pushing dead air. If all the drivers are only in the Driver conference and only the Fare/Admin are in the other…what’s the point? They can’t hear anything happening in the other conference.

What happens if the admin needs to have another driver take over the call? Who is unmuting said driver? What happens to the admin driver? As I’ve said before, this is going to have drivers jumping between calls and having no clue what is happening on one of the calls at any given time.

The solution they are asking for can be done but I’m already seeing at least a dozen issues, pitfalls and complications with this. It also makes me wonder why they are trying to re-invent the wheel and doing it with a rhombus.

I mean, we can tell you how to do pieces like auto answer and add to conference bridge, bypass PINs when needed, etc. but making those pieces work together that’s something we can’t do because at that point, we’d be designing the solution for you. This is going to require, as I said, customization and modifications to how FreePBX handles all the things you want to do.

You could have a call file for each taxi driver. The callfile sends the taxi driver to an ivr that they push 1 to join a conference.

Call Files - Asterisk: The Future of Telephony [Book] (oreilly.com)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.