android notification channel sound not working

First I do not know Your Notification is not working on which devices like Oreo, Pie or below than N.

For your question StackOver Flow have lots of answer.

Now As per your question Your missing only one line of code But here unable to check your whole notification code because of you are not pasted yet.

Here I am Pasting a Notification code which is just fulfill your all notification requirement. (Full Custom Notification)

Notification With Image

public void createNotificationWithImage(String title,String message ,Bitmap image) {
PendingIntent resultPendingIntent = PendingIntent.getActivity(mContext,
            0 /* Request code */, resultIntent,
            PendingIntent.FLAG_UPDATE_CURRENT);

// Custom Sound Uri

Uri soundUri = Uri.parse("android.resource://" + mContext.getApplicationContext()
                .getPackageName() + "/" + R.raw.sniper_gun);

 mBuilder = new NotificationCompat.Builder(mContext);
 mBuilder.setSmallIcon(R.mipmap.notification_icon);

 // Pay attention on below line here (NOTE)
 mBuilder.setSound(soundUri);

if (image!=null) {
            mBuilder.setContentTitle(title)
                    .setContentText(message)
                    .setAutoCancel(false)
                    .setLargeIcon(image)
                    .setStyle(new NotificationCompat.BigPictureStyle()
                            .bigPicture(image).setSummaryText(message).bigLargeIcon(null))
                    .setColor(Color.GREEN)
                    .setContentIntent(resultPendingIntent);
        }
mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);

Now I am pasting code of notification which will work above or on OREO devices.

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
        int importance = NotificationManager.IMPORTANCE_HIGH;
        NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "NOTIFICATION_CHANNEL_NAME", importance);
        notificationChannel.enableLights(true);
        notificationChannel.setLightColor(Color.RED);
        notificationChannel.enableVibration(true);
        notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});

        if(soundUri != null){
            AudioAttributes audioAttributes = new AudioAttributes.Builder()
                    .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                    .setUsage(AudioAttributes.USAGE_ALARM)
                    .build();
            notificationChannel.setSound(soundUri,audioAttributes);
        }

        assert mNotificationManager != null;
        mBuilder.setChannelId(NOTIFICATION_CHANNEL_ID);
        mNotificationManager.createNotificationChannel(notificationChannel);
    }
    assert mNotificationManager != null;
    mNotificationManager.notify(0 /* Request Code */, mBuilder.build());


below middle braces use for close your method.
}

Notification for without Image

    public void createNotification(String title,String message){
    PendingIntent resultPendingIntent = PendingIntent.getActivity(mContext,
                0 /* Request code */, resultIntent,
                PendingIntent.FLAG_UPDATE_CURRENT);

        Uri soundUri = Uri.parse("android.resource://" + mContext.getApplicationContext()
                .getPackageName() + "/" + R.raw.sniper_gun);



        mBuilder = new NotificationCompat.Builder(mContext);
        mBuilder.setSmallIcon(R.mipmap.notification_icon);
        mBuilder.setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(),
                R.mipmap.icon));
        mBuilder.setSound(soundUri);
        mBuilder.setContentTitle(title)
                .setContentText(message)
                .setAutoCancel(false)
                .setColor(Color.GREEN)
                .setStyle(new NotificationCompat.BigTextStyle())
                .setContentIntent(resultPendingIntent);

        mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);

        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
            int importance = NotificationManager.IMPORTANCE_HIGH;
            NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "NOTIFICATION_CHANNEL_NAME", importance);
            notificationChannel.enableLights(true);
            notificationChannel.setLightColor(Color.RED);
            notificationChannel.enableVibration(true);
            notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
//            notificationChannel.s

            if(soundUri != null){
                AudioAttributes audioAttributes = new AudioAttributes.Builder()
                        .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                        .setUsage(AudioAttributes.USAGE_ALARM)
                        .build();
                notificationChannel.setSound(soundUri,audioAttributes);
            }

            assert mNotificationManager != null;
            mBuilder.setChannelId(NOTIFICATION_CHANNEL_ID);
            mNotificationManager.createNotificationChannel(notificationChannel);

        }

        assert mNotificationManager != null;
        mNotificationManager.notify(0 /* Request Code */, mBuilder.build());

    }

NOTE: In my code I mentioned that pay attention on one specific line where I descrided about to set sound Uri with Notification. You can describe like this.

mBuilder.setContentTitle(title)
            .setContentText(message)
            .setAutoCancel(false)
            .setSound(soundUri)
            .setColor(Color.GREEN)
            .setStyle(new NotificationCompat.BigTextStyle())
            .setContentIntent(resultPendingIntent);

but it will not play a sound for your because after Oreo device is not set a sound as a priority level.

So always for sound use code as I described.