呼叫连接中禁止使用Android Pjsip Sip库

呼叫连接中禁止使用Android Pjsip Sip库,android,sip,pjsip,Android,Sip,Pjsip,如何使用本地服务器在Pjsip Android中执行调用 我曾经 用户代理:Pjsua2 Android 2.6-svn 我成功注册了,之后我试着打电话,但它抛出了禁止503 我的注册代码: AccountConfig accCfg = new AccountConfig(); accCfg.setIdUri("sip:localhost"); accCfg.getNatConfig().setIceEnabled(true); accC

如何使用本地服务器在Pjsip Android中执行调用

我曾经 用户代理:Pjsua2 Android 2.6-svn

我成功注册了,之后我试着打电话,但它抛出了禁止503 我的注册代码:

     AccountConfig accCfg = new AccountConfig();
        accCfg.setIdUri("sip:localhost");
        accCfg.getNatConfig().setIceEnabled(true);
        accCfg.getVideoConfig().setAutoTransmitOutgoing(true);
        accCfg.getVideoConfig().setAutoShowIncoming(true);
     //Like 123.12.12.23 
       accCfg.getRegConfig().setRegistrarUri("sip:172.16.4.124");

        AuthCredInfoVector creds = accCfg.getAuthCreds();
        creds.clear();
        if (username.length() != 0) {
           creds.add(new AuthCredInfo("Digest", "*", "abc@172.16.4.124", 0,
            "123"));
                    }
         StringVector proxies = accCfg.getSipConfig().getProxies();
                    proxies.clear();
                    if (proxy.length() != 0) {
                        proxies.add("sip:172.16.4.124");
                    }                                  
           accCfg.getSipConfig().setProxies(proxies);

        /* Enable ICE */
                    accCfg.getNatConfig().setIceEnabled(true);
                    try {
                        account.add(accCfg);
                    } catch (Exception e) {
                        e.printStackTrace();
                        Log.i(TAG, "Exception in Dialog");
                    }
                }
我过去打过电话

public void makeCall(View view) {
    if (buddyListSelectedIdx == -1)
        return;

/* Only one call at anytime */
    if (currentCall != null) {
        return;
    }

    HashMap<String, String> item = (HashMap<String, String>) buddyListView.
            getItemAtPosition(buddyListSelectedIdx);
    String buddy_uri = item.get("uri");

    MyCall call = new MyCall(account, -1);
    SendInstantMessageParam param = new SendInstantMessageParam();
    param.setContent("Hello Pjsip");
    param.setContentType("text");


    CallOpParam prm = new CallOpParam(true);

    try {
        call.makeCall(buddy_uri, prm);
//            call.delete();
//            call.sendInstantMessage(param);
    } catch (Exception e) {
        e.printStackTrace();
        call.delete();
        return;
    }
    currentCall = call;
    showCallActivity();

}
我可以通过sip默认客户端(如sip:localhost)和其他sip提供商(如linphone)连接呼叫,但服务器禁止。 专家们请帮忙。

非常感谢我自己,经过3天的锻炼,我终于找到了解决办法,
我的amazon服务器缺少端口号,使我无法连接,并在sip端之间进行了sippy呼叫。

请发布您的禁止响应消息日志。我也可以将其连接到本地,但两边都没有声音,然后我在amazon上进行设置,同样,呼叫未连接到我们的客户端在其他客户端工作时收到请求超时错误,请提供建议。如果要在本地服务器上建立呼叫,必须在同一LAN上连接设备和本地服务器。您需要在所有SIP地址中添加端口,如注册器URI、代理、凭据,如SIP:172.16.4.124:5060和端口。先试试这个!