0
votes

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!!!!!

1
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..? - user1414160
@PriyankBhojak, it works fine, i have not faced any issues... - G M Ramesh
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.. - user1414160
@PriyankBhojak, build ur project in linux operating system... i did not build in Windows;( - G M Ramesh

1 Answers

3
votes

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>