in this file of the "pollmailboxes" and "pollfreq" options to voicemail.conf
for more information.
* Added rtpdest option to CHANNEL() dialplan function.
+ * Added SIPREFERRINGCONTEXT and SIPREFERREDBYHDR variables which are set when a transfer takes place.
IAX2 changes
------------
/* Get referred by header if it exists */
p_referred_by = get_header(req, "Referred-By");
+
+ /* Give useful transfer information to the dialplan */
+ if (transferer->owner) {
+ struct ast_channel *peer = ast_bridged_channel(transferer->owner);
+ if (peer) {
+ pbx_builtin_setvar_helper(peer, "SIPREFERRINGCONTEXT", transferer->context);
+ pbx_builtin_setvar_helper(peer, "SIPREFERREDBYHDR", p_referred_by);
+ }
+ }
+
if (!ast_strlen_zero(p_referred_by)) {
char *lessthan;
h_referred_by = ast_strdupa(p_referred_by);