繁体   English   中英

从应用程序进行SIP呼叫时使用本机SIP拨号程序

[英]Using Native SIP Dialer while making SIP call from Application

我正在为SIP开发android应用程序。 我成功使用Jain -sip-stack制作了SIP Stack,但为了进行通话,我想将我的应用程序与Native SIP拨号程序集成以便进行通话。 这是默认设置,在Android手机中也可用。 可以使用本机拨号程序通过本机SIP拨号程序进行Sip呼叫。

任何帮助,将不胜感激..

谢谢!!!!!

是的,您可以使用本机拨号器进行Sip呼叫。

为此,您需要添加一个BroadcastReceiver类...如下所示...

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);

  } 

}

您需要将<intent-filter>添加到您的AndroidManifest.xml

<receiver android:name=".Dialer" android:enabled="true">
        <intent-filter>
            <action   android:name="android.intent.action.NEW_OUTGOING_CALL" />
        </intent-filter>
 </receiver> 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM