diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index a1fcf8e0beb4e38eaddd6314268dcc3360b1cd1f..21b59692863a1057f154b347bcc1d0cddb0af443 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -111,6 +111,13 @@ struct ast_frame {
 	struct ast_frame *next;			
 };
 
+#define	FR_SET_BUF(fr, _base, _ofs, _datalen)	\
+	{					\
+	(fr)->data = (char *)_base + (_ofs);	\
+	(fr)->offset = (_ofs);			\
+	(fr)->datalen = (_datalen);		\
+	}
+
 /*! Queueing a null frame is fairly common, so we declare a global null frame object
     for this purpose instead of having to declare one on the stack */
 extern struct ast_frame ast_null_frame;