Dial SIP number using native/system dialler - android

I have an app which creates a SIP profile using SipProfile.Builder and I'm able to place a SIP call using that profile by calling makeAudioCall().
I was wondering if it's possible to get the native dialler to use my SIP profile to place a call using an Intent? I tried invoking the native dialler via an intent:
Intent dial = new Intent(Intent.ACTION_CALL);
Uri call = Uri.parse("sip:123455#sip.domain.com");
dial.setData(call);
dial.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(dial);
but it does not place the call from the SIP profile my app created.
What I want is to avoid re-inventing the wheel in creating my own custom dialler UI and reuse the native dialler for this.
Is this possible?

Related

Double Intent for call skype/phone

Hi I want with the press of the button to either call a phone number or make a Skype call.
To make the call I use:
Intent phone= new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "+30 6********7"));
startActivity(phone);
Which pops a Window and let me choose from phone app or Skype. When I choose Skype it tries to make a call with Skype founds and not VoIP Skype call.
I found out that for Skype I need to use :
Intent skype = new Intent("android.intent.action.VIEW");
skype.setData(Uri.parse("skype:" + "user_name"));
startActivity(skype);
Is there a way to chain those two intents and whenever I choose phone app to run phone Intent and whenever I choose Skype to run Skype Intent ?
I know I can make a custom dialog to choose Intent to run and exclude Skype app from Intent phone
But I was wondering if there is a more elegant way built in android or even if I can make the VoIp call from the number it self (finding the user from phone).
Thank you in advance

Hiding the incoming phone number using an custom dialer feature

I have a plan to make a dialing feature to hide the caller's ID. I have an application with the caller's phone number embedded in the "Dial" button.
In the application the both parties (caller and receiver) can see their own numbers.
I use the following code for the default call:
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse(“tel:”+mNumberEditText.getText().toString()));
startActivity(callIntent);
My problem is to hide both parties' numbers. How do I do this?

Any Android Intent to make SIP Call?

Can any body suggest me, any Android Intent to make SIP Call? or even third party framework/lib/app, which has the facility to be invoked using an intent and some parameters will be fine.
Kindly Note: Not regular phone call, needed intent for SIP/Internet Phone call.
Thanks In Advance.
1) Do you mean you want to implement a SIP app?
Then, check this:
http://developer.android.com/guide/topics/connectivity/sip.html
Make you app and listen to ACTION_CALL.
Or
2) Do you want to invoke a calling app?
Then the usual ACTION_CALL will do.
(For example, in my phone ACTION_CALL will prompt me if I want to use Skype or Phone App)
Added:
I am using SipDroid in one of my phone. This is what happens when I try to make call:
Alternatively, if you meant to create an Intent, you could trying looking into declaring a custom scheme within an IntentFilter in your AndroidManifest.xml, such as calling an Intent with a sip:<numberToCall> will open your Activity.

Place a SIP call via Intent

I am writing an Android application which will place a SIP call. I want to use the native Android SIP APIs and have found documentation under:
http://developer.android.com/guide/topics/connectivity/sip.html and
http://developer.android.com/reference/android/net/sip/SipManager.html
Although I could regsiter with a SIP provider and start a call, it looks like this is too low-level. I want to just hand off the SIP call to the native Android phone app and give it a SIP address to call and assume that the user has already registered a SIP account in the Android phone app.
I thought that there must be an Intent for this, like http://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL where I could provide a SIP address, like this:
Uri phoneCall = Uri.parse("tel:1234567890");
Intent caller = new Intent(Intent.ACTION_DIAL, phoneCall);
startActivity(caller);
but my experiments were unsuccessful. Do I have to use SipManager or is there an Intent I could use?
Assuming you've already created a global SIP-account:
Uri phoneCall = Uri.parse("sip:[number]#[domain]");
Just replace number and domain with the appropriate values.

Making an emergency call in Android 2.1

Can I make an emergency call programmatically in Android 2.1?
I've tried to use something like this:
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(telUri));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_NO_USER_ACTION);
appCtx.startActivity(intent);
but the only thing that I can do is call the system dialpad with the specified emergency number.
I have to push the 'dial' button to make call. Is there any way to skip the dialer?
No, you can't. The phone activity (actually part of the Contacts application) is what responds to the ACTION_CALL intent and you can't change how it handles it. This is done specifically to make sure the user confirms the number he/she wishes to dial.

Categories

Resources