diff -ur asterisk-1.4.0.orig/codecs/codec_ilbc.c asterisk-1.4.0/codecs/codec_ilbc.c --- asterisk-1.4.0.orig/codecs/codec_ilbc.c 2006-09-08 17:33:32.000000000 -0400 +++ asterisk-1.4.0/codecs/codec_ilbc.c 2007-03-01 15:35:13.000000000 -0500 @@ -203,6 +203,7 @@ .sample = ilbctolin_sample, .desc_size = sizeof(struct ilbc_coder_pvt), .buf_size = BUFFER_SAMPLES * 2, + .native_plc = 1, }; static struct ast_translator lintoilbc = { Only in asterisk-1.4.0/codecs: codec_ilbc.c~ diff -ur asterisk-1.4.0.orig/codecs/codec_speex.c asterisk-1.4.0/codecs/codec_speex.c --- asterisk-1.4.0.orig/codecs/codec_speex.c 2006-09-08 17:33:32.000000000 -0400 +++ asterisk-1.4.0/codecs/codec_speex.c 2007-03-01 15:35:20.000000000 -0500 @@ -354,6 +354,7 @@ .desc_size = sizeof(struct speex_coder_pvt), .buffer_samples = BUFFER_SAMPLES, .buf_size = BUFFER_SAMPLES * 2, + .native_plc = 1, }; static struct ast_translator lintospeex = { Only in asterisk-1.4.0/codecs: codec_speex.c~ diff -ur asterisk-1.4.0.orig/include/asterisk/translate.h asterisk-1.4.0/include/asterisk/translate.h --- asterisk-1.4.0.orig/include/asterisk/translate.h 2006-10-31 16:47:48.000000000 -0500 +++ asterisk-1.4.0/include/asterisk/translate.h 2007-03-01 15:34:26.000000000 -0500 @@ -104,6 +104,7 @@ int desc_size; /*!< size of private descriptor in pvt->pvt, if any */ int plc_samples; /*!< set to the plc block size if used, 0 otherwise */ int useplc; /*!< current status of plc, changed at runtime */ + int native_plc; /*!< true if the translator can do native plc */ struct ast_module *module; /* opaque reference to the parent module */ Only in asterisk-1.4.0/include/asterisk: translate.h~ Only in asterisk-1.4.0/include/asterisk: version.h diff -ur asterisk-1.4.0.orig/main/translate.c asterisk-1.4.0/main/translate.c --- asterisk-1.4.0.orig/main/translate.c 2006-11-24 12:17:07.000000000 -0500 +++ asterisk-1.4.0/main/translate.c 2007-03-01 15:38:06.000000000 -0500 @@ -174,7 +174,9 @@ pvt->samples += l; pvt->datalen = pvt->samples * 2; /* SLIN has 2bytes for 1sample */ } - return 0; + /* We don't want generic PLC. If the codec has native PLC, then do that */ + if (!pvt->t->native_plc) + return 0; } if (pvt->samples + f->samples > pvt->t->buffer_samples) { ast_log(LOG_WARNING, "Out of buffer space\n");