phone-call

How to make asterisk server automatically response to SIP call?

∥☆過路亽.° 提交于 2019-11-29 17:36:08
My objective: I want to use softphone(3CX phone) register with asterisk server, and make call to the server and asterisk act as a server to automatically response something, like play a song. How i did: I installed asteriskNow using virtualbox, and registered the softphone by setting exntension for my SIP device (extension 333). And i write a dialplan in etc/asterisk/extensions.conf . The dialplan is : [incoming] exten =>s,1,Answer() exten =>s,n,Playback(dir-intro-oper) exten =>s,n,Hangup() I want any incoming call to server, the server will automatically answer, and play a pre-defined voice

Android : why PhoneCallListener still alive after activity finish?

余生长醉 提交于 2019-11-29 15:00:31
im using a phone call listener in my activity but after finishing my activity , afer user make a call, my phone call listener not dead and brig up activity again !! please help me. phoneListener = new PhoneCallListener(); telephonyManager = (TelephonyManager) TransferActivity.this.getSystemService(Context.TELEPHONY_SERVICE); telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE); PhoneCallListener class : private class PhoneCallListener extends PhoneStateListener { boolean isPhoneCalling = false; @Override public void onCallStateChanged(int state, String incomingNumber) {

No activity found to handle intent action.dial

依然范特西╮ 提交于 2019-11-29 09:09:49
I'm trying to make my app call a number from an EditText, but I get: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.DIAL dat=Ring Tel nr. 123456789 } I've searched a while for an answer, but most of the answes are permissions and add activity to the Manifest. I've done both, if I'm not doing it wrong. And I'm running it on my phone, not the emulator. I've tried both with and without the intent-filters. Here are the codes: Manifest: <uses-permission android:maxSdkVersion="19" android:name="android.permission.CALL_PHONE"/> <activity

How to get user incoming call phone number in iOS device

点点圈 提交于 2019-11-29 08:45:48
I used CoreTelephony framework introduced in iOS SDK 4.0 to know about Incoming call & its dropped state. CTTelephonyNetworkInfo *tni = [[CTTelephonyNetworkInfo alloc] init]; callCenter = [[CTCallCenter alloc] init]; crtCarrierName = tni.subscriberCellularProvider.carrierName; [callCenter setCallEventHandler:^(CTCall *call) { if ([[call callState] isEqual:CTCallStateConnected]) { //this call has just connected } else if ([[call callState] isEqual:CTCallStateDisconnected]) { //this call has just ended (dropped/hung up/etc) } }]; Can i use this event handler to track call state when my app is in

Listener for Call end in Android

岁酱吖の 提交于 2019-11-29 08:21:17
问题 I am developing an application in which i want to keep a track of that when an outgoing call ends.For example,If a mobile phone user dials a call and then i want to run a programming code when the call is ended.I want this only for outgoing calls. 回答1: You can do it with telephony api in android .see this link its have an example for it. http://mobisys.in/blog/2011/09/is-your-call-ended-on-android-phone/ 回答2: Finally done my project on android call log details and I used PhoneSateListener and

Can we fire an event when ever there is Incoming and Outgoing call in iphone?

懵懂的女人 提交于 2019-11-29 07:37:31
Can I fire an event when ever there is Incoming and Outgoing call ends on iphone? Axample of an event is calling a webservice . Yes you can, but not necessarily immediately. There is a framework, called the CoreTelephony framework, which has a CTCallCenter class. One of the properties on this class is the callEventHandler property . This is a block that gets fired when then state of a phone call changes. For example: CTCallCenter *callCenter = ...; // get a CallCenter somehow; most likely as a global object or something similar? [callCenter setCallEventHandler:^(CTCall *call) { if ([[call

Android: Making a phone call from home screen widget

孤街浪徒 提交于 2019-11-29 04:55:58
I have a widget and I want it to make a phonecall to a particular number when the user clicks on the widget. How do i do this? Please help. I was able to get it working with this code: @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(LOG_TAG, "onUpdate(): "); for (int appWidgetId : appWidgetIds) { Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:"+number)); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, callIntent, 0); // Get the layout for the App Widget and attach an on

I want to read call logs in the android [duplicate]

只谈情不闲聊 提交于 2019-11-29 04:06:06
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How can I retrieve recently used contacts in android? I want to read recently used contacts. Anyone know how to do this? 回答1: 1. Create observer: class CustomContentObserver extends ContentObserver { public CustomContentObserver(Handler handler) { super(handler); } @Override public boolean deliverSelfNotifications() { return false; } public void logCallLog() { long dialed; String columns[]=new String[] { CallLog

Trigger an audio file when call is answered

梦想与她 提交于 2019-11-29 02:12:46
Is there a way to launch an audio file when answering a call to be played NOT into the call (so the other side could hear), but only in the call speaker (so only our side could hear). Sounds strange, I know but it is part of a much larger app. First of all, you'll need to set up a BroadcastReceiver (let's call it "CallReceiver"), and permission to know about the phone state (intuitively, the permission to add is android.permission.READ_PHONE_STATE ). Register your CallReceiver action like this. <receiver android:name=".CallReceiver" android:enabled="true"> <intent-filter> <action android:name=

Media Recorder To record calls is sometime unable to Record other side voice

北战南征 提交于 2019-11-29 01:38:55
In my application there is a feature to record voice calls and it works perfectly well. But when tested on (Samsung s7, s8 ) it doesn’t work well. The application is able to record only callers voice not the voice from the other end. Below is my code to check please suggest a solution MediaRecd = new MediaRecorder(); MediaRecd.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL ); MediaRecd.setAudioChannels(ConstantVariables.audioChannels);//monoRecording MediaRecd.setAudioEncodingBitRate(64); MediaRecd.setAudioSamplingRate(44100); MediaRecd.setOutputFormat(output_formats[pos]);//.mp3