telephony

Sending USSD code programmatically dials Skype instead of normal phone call

百般思念 提交于 2019-12-08 05:53:38
问题 When running this String ussdCode = "*" + "100" + Uri.encode("#"); startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode))); I expect a normal phone call to be done, but instead of that Skype go to front and make the call for *100# USSD code. I logged out from Skype and it sill brings Skype to front!. How to force it to use the normal phone call instead of Skype? 回答1: Thats because you have Skype as the default application for calls. This is a device configuration

Asterisk AGI: How to get or set the value of a global variable?

旧时模样 提交于 2019-12-08 02:13:34
问题 I'm using Asterisk 1.8 with PHP for AGI scripting. EDIT: I'm struggling with setting and obtaining the values of global variables from within an AGI PHP script. I can set channel variables but not global variables. Using PHPAGI lib. Tried: Set({$varname}={$value},g) Set({$varname}=\"{$value}\",g) Set(GLOBAL({$varname})={$value}) That does not seem to work at all, when getting the value from within the dial plan, it is empty. Does anyone have a working example of setting and getting global

Android - Navigating through USSD menu using pre-determined inputs sent via requests

妖精的绣舞 提交于 2019-12-08 01:54:39
问题 I am planning to create an Android App that will automate sending a users response to a USSD Menu. At a click of a button, the app will send the initial code, followed by the rest of the menu inputs. For example, the initial number is *143#, followed by 1, 1, 1, and a user PIN. I'd like to be able to automate that sequence of inputs so that the user won't have to input it on their own. I know that in Android Oreo, they implemented a USSD Callback using the TelephonyManager, where the Android

End Call in Android

倾然丶 夕夏残阳落幕 提交于 2019-12-07 17:43:53
问题 I'm trying to end a new outgoing call after few seconds. Here is my code: public class phonecalls extends Activity { ComponentName cn; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); call(); } private void call() { try { Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:123456789")); startActivity(callIntent); cn = new

Fake caller ID on text messages using Twilio (or any other provider)

℡╲_俬逩灬. 提交于 2019-12-07 15:20:11
问题 Simple question: How can I send a text message using Twilio, or any other provider, with fake caller ID? I'm using Twilio REST API (C#). EDIT: I found this company which provides this future, but they are far too pricey: http://www.smsmessagesender.com/SmsApi Does anyone knows a better alternative? 回答1: For the most part, it's a carrier thing. In the US, generally speaking, any SMS traffic has to be from a number you 'own'. For APIs, that would be one or more virtual numbers you purchase.

How to get outgoing call connected state

倾然丶 夕夏残阳落幕 提交于 2019-12-07 13:15:41
问题 In my application development, I need to do vibration when outgoing call connected, but I can not get the call answered state. I have read some topic about this question, such as: Outgoing call status But actually, these questions not be answered correctly. Use BroadcastReceiver can only receive idle, offhook, ringing states, but no active state. The active state defined in Call.java in internal framework, I have no idea to get this state. I did use reflection method, almost same as https:/

Can tablets make calls? (Telephony)

倾然丶 夕夏残阳落幕 提交于 2019-12-07 08:07:32
问题 I have a permission in manifest: <uses-feature android:name="android.permission.READ_PHONE_STATE" android:required="false" /> The code that checks if the telephone is being used would probably start a security exception for devices like tablets, who can't receive calls. So, I made this method to check whether or not the device can use the TelephonyManager: private boolean doesUserHavePermission(){ PackageManager pm = getPackageManager(); final boolean deviceHasPhone = pm.hasSystemFeature

List all System Modems

别等时光非礼了梦想. 提交于 2019-12-07 07:05:27
问题 Is there a way in managed code to list the Modem/Telephony devices installed on the system? If .Net does not have a way, could you point me in a direction? 回答1: WMI will contain all the information you need in the Win32_POTSModem class. In C# or .Net, you can utilize the System.Management namespace to query WMI. Within .Net, you can use MgmtclassGen.EXE from the platform SDK to generate a class object representing the WMI class. The command line would be like this: C:\Program Files\Microsoft

Check to see if telephone number is active/real [closed]

此生再无相见时 提交于 2019-12-07 06:53:29
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have a new project on hand on which is quite complex as i am not aware of its domain. My requirement is this, We have list of telephone numbers and from this list i need to check which telephone number is active/real. How would you program a telephony or IVR system to automatically dial phone numbers on this list and automatically detect if it is a valid phone number or not? I would like to use C# to program

How to detect the SIM card change in android phone?

有些话、适合烂在心里 提交于 2019-12-07 06:47:30
问题 Its very much frustrating situation now in project. I am stuck up at one point. I want do a simple task as follows When someone change the SIM, detect this event and check if this new SIM is different from previous SIM and take action accordingly. I don't want to check the SIM_STATE periodically by timer or anything.. Do android notify the state change of SIM? If yes please let me know I can detect the SIM change? I have asked this question before also but no solid answer I got. It seems a