Android custom native dialer with ConnectionService implementation for OutgoingCall never goes out

I am trying to implement ConnectionService, Connection, and registering PhoneAccount for outgoing calls. So far, I have been able to initiate a call using customPhoneAccount but that phone call never goes through, which means the call does not reach the destination phone.

Below is code for PhoneAccount and ConnectionService,

@RequiresApi(api = Build.VERSION_CODES.M)
    private void registerConnectionService() {
        try {
            TelecomManager manager = (TelecomManager) getSystemService(Context.TELECOM_SERVICE);
            String connectionServiceId = getConnectionServiceId();
            ComponentName componentName = new ComponentName(getApplicationContext(), MyService.class);
            PhoneAccountHandle phoneAccountHandle = new PhoneAccountHandle(componentName, "Dialer");
            phoneAccount = manager.getPhoneAccount(phoneAccountHandle);
            // Log.i("phoneAccountTekV",phoneAccount.getAddress()+" "+phoneAccount.getCapabilities()+"  "+phoneAccount.getLabel());
            if (phoneAccount == null) { // no phone account from us registered yet
                PhoneAccount.Builder builder = PhoneAccount.builder(phoneAccountHandle, "Dialer");
                Uri uri = Uri.parse("tel:9959165743");
                //builder.setSubscriptionAddress(uri);
                //builder.setAddress(uri);
                builder.setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER);
                //builder.setCapabilities(PhoneAccount.CAPABILITY_CONNECTION_MANAGER);
                // builder.setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED);
                phoneAccount = builder.build();
                manager.registerPhoneAccount(phoneAccount);
                Log.i("phoneAccount", "" + phoneAccount.isEnabled());
                Intent intent = new Intent();
                intent.setComponent(new ComponentName("com.android.server.telecom",
                        "com.android.server.telecom.settings.EnableAccountPreferenceActivity"));
                startActivity(intent);
            }
            Log.i("is phoneAccountEnabled", "" + phoneAccount.isEnabled());
        } catch (SecurityException se) {
            Log.e("registerPhoneAccount", "SecurityException: Ensure all necessary permissions are granted", se);
        } catch (IllegalArgumentException iae) {
            Log.e("registerPhoneAccount", "IllegalArgumentException: Ensure the PhoneAccount is properly configured", iae);
        } catch (RuntimeException re) {
            Log.e("registerPhoneAccount", "RuntimeException: An unexpected error occurred", re);
        } catch (Exception re) {
            Log.e("registerPhoneAccount", "Exception: An unexpected error occurred", re);
        }
    }

ConnectionService:

@RequiresApi(api = Build.VERSION_CODES.Q)
    @RequiresPermission(value = "android.permission.READ_PHONE_STATE")
    @Override
    public Connection onCreateOutgoingConnection(PhoneAccountHandle connectionManagerPhoneAccount, ConnectionRequest originalRequest) {
        Uri handle = originalRequest.getAddress();
        MyConnection connection = new MyConnection(false, originalRequest,this);
        connection.setAddress(handle, TelecomManager.PRESENTATION_ALLOWED);
        //connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED);
       // connection.setDialing();
        connection.setInitializing();
        connection.setConnectionCapabilities(Connection.CAPABILITY_HOLD | Connection.CAPABILITY_MUTE | Connection.CAPABILITY_SUPPORT_HOLD);
        connection.setVideoState(originalRequest.getVideoState());
        addCall(connection);
        TelecomManager manager = (TelecomManager) getSystemService(Context.TELECOM_SERVICE);
        boolean isOut = manager.isOutgoingCallPermitted(connectionManagerPhoneAccount);
        Log.i("phoneAccountTekV",connectionManagerPhoneAccount.getUserHandle().toString());
                //setAddress(connection,handle);
        Log.i("isOutgoingCallPermitted"," isOutgoingCallPermitted-"+isOut);
        PhoneAccountHandle ph = manager.getUserSelectedOutgoingPhoneAccount();
        List<PhoneAccountHandle>  selfHandles =manager.getSelfManagedPhoneAccounts();
        List<PhoneAccountHandle>  handles =manager.getCallCapablePhoneAccounts();
        connection.startOutgoing();
        return connection;

    }

Logs from LogCat is below:

12:27:49.085 1563-1563/? W/Telecom: Call: maybeOnInCallServiceTrackingChanged() request on a call without a connection service.: ICSBC.oSC(cgag)@C/U
2024-06-24 12:27:49.085 1563-1563/? W/Telecom: Call: maybeOnInCallServiceTrackingChanged() request on a call without a connection service.: ICSBC.oSC(cgaa)@C/Y
2024-06-24 12:27:49.091 1563-6781/? W/WindowManager: Prepare app transition: mNextAppTransitionRequests=[TRANSIT_OPEN, TRANSIT_OPEN], mNextAppTransitionFlags=, displayId: 0 Callers=com.android.server.wm.DisplayContent.prepareAppTransition:6493 com.android.server.wm.TaskFragment.resumeTopActivity:1573 com.android.server.wm.TaskFragment.resumeTopActivity:1307 com.android.server.wm.Task.resumeTopActivityInnerLocked:6451 com.android.server.wm.Task.resumeTopActivityUncheckedLocked:6352
2024-06-24 12:27:49.091 1563-6781/? W/ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (1105139)
2024-06-24 12:27:49.096 1563-1563/? W/Telecom: Call: maybeOnInCallServiceTrackingChanged() request on a call without a connection service.: TSI.pC->CM.fOCP->CM.sOCPA->CM.dSMCP->CM.dSPA->CM.sRCQ->CM.pASP(ctd)@C/M
2024-06-24 12:27:49.096 1563-1563/? W/Telecom: Call: maybeOnInCallServiceTrackingChanged() request on a call without a connection service.: TSI.pC->CM.fOCP->CM.sOCPA->CM.dSMCP->CM.dSPA->CM.sRCQ->CM.pASP(ctd)@C/M
2024-06-24 12:27:49.097 1563-6781/? W/WindowManager: Execute app transition: mNextAppTransitionRequests=[TRANSIT_OPEN, TRANSIT_OPEN], mNextAppTransitionFlags=, displayId: 0 Callers=com.android.server.wm.RootWindowContainer.executeAppTransitionForAllDisplay:2580 com.android.server.wm.ActivityTaskSupervisor.reportResumedActivityLocked:2287 com.android.server.wm.ActivityRecord.completeResumeLocked:6987 com.android.server.wm.Task.minimalResumeActivityLocked:6156 com.android.server.wm.ActivityTaskSupervisor.realStartActivityLocked:1137
2024-06-24 12:27:49.098 1563-1563/? W/Telecom: Call: maybeOnInCallServiceTrackingChanged() request on a call without a connection service.: TSI.pC->CM.fOCP->CM.sOCPA->CM.dSMCP->CM.dSPA->CM.sRCQ->CM.pASP(ctd)@C/M
2024-06-24 12:27:49.099 1224-1461/? W/SecAudioParamPolicy: g_volume_situation_key: did not support legacy situation volumes
2024-06-24 12:27:49.099 32494-32494/? E/m.samsung.crane: Not starting debugger since process cannot load the jdwp agent.
2024-06-24 12:27:49.102 9896-9925/? E/BluetoothAdapterService: getActiveDevices: HearingAidService is null
2024-06-24 12:27:49.107 1563-1563/? W/Telecom: Logging: Log.endSession was called with no session active.
2024-06-24 12:27:49.110 9896-9925/? E/BluetoothAdapterService: getActiveDevices: HearingAidService is null
W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1252 com.android.server.notification.sec.DisplayToast.sendIntentForToastDumpLog:156 com.android.server.notification.sec.DisplayToast.outFile:106 com.android.server.notification.sec.DisplayToast.out:62 com.android.server.notification.NotificationManagerService$12.enqueueToastForDex:3989
2024-06-24 12:27:49.507 5214-5307/? W/Parcel: Expecting binder but got null!

2024-06-24 12:27:49.513 677-677/? W/keymaster_tee: [WRN]begin req PARAMS: A32 B32 P1
2024-06-24 12:27:49.521 677-677/? W/keymaster_tee: [WRN]begin req PARAMS: A32 B32 P1
2024-06-24 12:27:49.529 1121-1121/? E/Sensors: inject_scontext_data: New ssp_data_injection_fd(44)
2024-06-24 12:27:49.530 1563-1718/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=com.samsung.rcs.contentsharing.action.NUMBER_TOKEN flg=0x10 (has extras) } to com.samsung.crane/.app.PhoneNumberReceiver
2024-06-24 12:27:49.536 1563-1718/? W/BroadcastQueue: Permission Denial: receiving Intent { act=android.intent.action.PHONE_STATE flg=0x1000010 (has extras) } to ProcessRecord{b77a6ce 6726:com.samsung.android.app.cocktailbarservice/u0a52} (pid=6726, uid=10052) requires android.permission.READ_PHONE_STATE due to sender android (uid 1000)
2024-06-24 12:27:49.537 1563-1718/? W/BroadcastQueue: Permission Denial: receiving Intent { act=android.intent.action.PHONE_STATE flg=0x1000010 (has extras) } to ProcessRecord{b77a6ce 6726:com.samsung.android.app.cocktailbarservice/u0a52} (pid=6726, uid=10052) requires android.permission.READ_PHONE_STATE due to sender android (uid 1000)
2024-06-24 12:27:49.537 9896-18745/? E/BluetoothAdapterService: getActiveDevices: HearingAidService is null

can someone please help me ?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật