0

I have a python backend based web app. I have to identify in our database the incoming caller. Is it possible to get the incoming mobile call number (of an android based phone) in a web based application? Actually what I'm looking for is to automatically display the customer record from the database based on the incoming phone number The pseudo SQL query would look like: select * from customer where phone_number = ?

How can I "link" the incoming call to the web app? (as it would be a voip app)

Gabor
  • 1,409
  • 1
  • 14
  • 24
  • What libraries and frameworks are you using to write the web app? Is it running on a website or is it an actual phone app? If by "web based application" you mean that the user actually has to be using a web browser, then the answer would clearly be no because that would be a massive security risk. Any android app can easily get the number of an incoming call. So are you asking how to do it in whatever library you're writing the app in? – Random Davis Dec 09 '20 at 19:15
  • It is a web site (That's why I was writing "web based app"). The framework is in my case irrelevant as I can use the python code in every framework. But let's say it's flask (or django or bottle or fastapi or...) – Gabor Dec 09 '20 at 19:20
  • Got it. So you're asking if _any random website_ can access _anyone's_ incoming phone callers' numbers? And you don't see how that's a silly question and a massive, massive, massive privacy and security risk? – Random Davis Dec 09 '20 at 19:22
  • Not quite. I have the phone what I can directly link (via USB or bluetouth) to the server. I have to identify the incoming phone number to that specific phone to make my query in the database. Actually the web itself is not playing yet any role. It would basically act as a barcode scanner. Just to provide the phone number instead of using the keyboard – Gabor Dec 09 '20 at 19:26
  • Or said in an other way: I want to fill an input filed based on the incoming phone number, even if there is no server query (yet) at all. There is no privacy or security risk, just an alternative input device. I guess – Gabor Dec 09 '20 at 19:34
  • 1
    Well once you figure out what you're asking, as well as the relevant info, you should update your question with that info and to more closely reflect what you want. – Random Davis Dec 09 '20 at 19:59
  • I think the question remains the same. I have a python based web app. I have incoming calls. Based on that calls I want to get the incoming phone number. I can (physically) link the phone to a workstation or server. I want to find a way to get out the phone number from the incoming call either on the workstation or the server. Once it's done, I can handle everything else – Gabor Dec 09 '20 at 20:14
  • @Gabor - have you looked at the AGI on asterisks? You can get it to fire something off when it gets a call for a given extension. Try [this](https://stackoverflow.com/questions/36063942/calling-a-php-script-using-freepbx-and-asterisk/36068123#36068123) where I answered for someone else to get an idea. – user3788685 Dec 18 '20 at 18:25
  • @user3788685: Unfortunately we don't have Asterisk just a regular cell phone. With Asterisk (or othe IPr phone server) and a Windows fat app I could solve the problem. But here I have a web app. :-( – Gabor Dec 19 '20 at 19:35

0 Answers0