diff --git a/main/slinfactory.c b/main/slinfactory.c
index fdcfa878fad47483e1e7865d7ab72144ebd6f5dc..adec9f3e85c4c7b5745f6c7ab92950c7706f01b3 100644
--- a/main/slinfactory.c
+++ b/main/slinfactory.c
@@ -56,14 +56,14 @@ int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f)
 	struct ast_frame *begin_frame = f, *duped_frame = NULL, *frame_ptr;
 	unsigned int x;
 
-	if (f->subclass != AST_FORMAT_SLINEAR) {
+	if (f->subclass != AST_FORMAT_SLINEAR && f->subclass != AST_FORMAT_SLINEAR16) {
 		if (sf->trans && f->subclass != sf->format) {
 			ast_translator_free_path(sf->trans);
 			sf->trans = NULL;
 		}
 
 		if (!sf->trans) {
-			if (!(sf->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, f->subclass))) {
+			if (!(sf->trans = ast_translator_build_path((f->subclass == AST_FORMAT_G722 ? AST_FORMAT_SLINEAR16 : AST_FORMAT_SLINEAR), f->subclass))) {
 				ast_log(LOG_WARNING, "Cannot build a path from %s to slin\n", ast_getformatname(f->subclass));
 				return 0;
 			}