0

I am developing android application for SIP. I am successful in making SIP Stack using Jain -sip-stack but for making call, i want to integrate my application with Native SIP dialer for making calls. which is default and also available in android phones. Is is possible to use native dialer to make sip calls through native SIP Dialer.

Any help would be appreciated..

Thanks!!!!!

G M Ramesh
  • 3,420
  • 9
  • 37
  • 53
  • Hi ramesh i read your post yesterday i am also creating sip dialer just wanted to know that is Jain-sip-stack works fine or u faced any issues after integration in android..? –  Jun 25 '13 at 13:37
  • @PriyankBhojak, it works fine, i have not faced any issues... – G M Ramesh Jun 26 '13 at 04:32
  • i am facing problem to building projects i am using sipdroid but not able to build my project in eclipse i am using windows machine can you please tell me is it possible to build project in windows with out using ndk.. –  Jul 01 '13 at 10:52
  • @PriyankBhojak, build ur project in linux operating system... i did not build in Windows;( – G M Ramesh Jul 01 '13 at 13:13

1 Answers1

4

Yes, You can use native dialer to make sip calls.

For that you need to add one BroadcastReceiver class...like below...

public class Dialer extends BroadcastReceiver 
{

  @Override
  public void onReceive(Context context, final Intent intent) {     

      if (intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL")) {

      String phoneNumber = intent.getExtras().getString( "android.intent.extra.PHONE_NUMBER");

      // Call some function from here to make SIP Call using this phoneNumber.
      // Use this "phoneNumber" to your sip application & setResultData null.

      setResultData(null);

  } 

}

You need to add <intent-filter> to your AndroidManifest.xml

<receiver android:name=".Dialer" android:enabled="true">
        <intent-filter>
            <action   android:name="android.intent.action.NEW_OUTGOING_CALL" />
        </intent-filter>
 </receiver> 
Priyank Patel
  • 12,244
  • 8
  • 65
  • 85
  • is anything else i need to add in android manifest file related to this native dialer to make sip call? – G M Ramesh Sep 27 '12 at 08:51
  • when i do this, i am not able to see default dialer application, this code will only do the sip call if you make sip call after getting phone number, but how do i display the same on dialer application and add log as well in call log portion. – Amit Jan 08 '15 at 11:01