diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4e3c14db26437219c988e13b00575e322ad7fa86..b5aede88454d20faaf38f02bd8a08593ef2d26cf 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4652,6 +4652,8 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout)
 		} else if (!p->options->addsipheaders && !strncasecmp(ast_var_name(current), "SIPADDHEADER", strlen("SIPADDHEADER"))) {
 			/* Check whether there is a variable with a name starting with SIPADDHEADER */
 			p->options->addsipheaders = 1;
+		} else if (!strcasecmp(ast_var_name(current), "SIPFROMDOMAIN")) {
+			ast_string_field_set(p, fromdomain, ast_var_value(current));
 		} else if (!strcasecmp(ast_var_name(current), "SIPTRANSFER")) {
 			/* This is a transfered call */
 			p->options->transfer = 1;
diff --git a/doc/tex/channelvariables.tex b/doc/tex/channelvariables.tex
index ae28818d388a01daeec61e31399d9452d3e139d9..e52c2187b82497db9a485462828cf845baf54f33 100644
--- a/doc/tex/channelvariables.tex
+++ b/doc/tex/channelvariables.tex
@@ -922,6 +922,7 @@ ${SMDI_VM_TYPE}       * When an call is received with an SMDI message, the 'type
 \begin{verbatim}
 ${SIPCALLID}         * SIP Call-ID: header verbatim (for logging or CDR matching)
 ${SIPDOMAIN}         * SIP destination domain of an inbound call (if appropriate)
+${SIPFROMDOMAIN}       Set SIP domain on outbound calls
 ${SIPUSERAGENT}      * SIP user agent (deprecated)
 ${SIPURI}            * SIP uri
 ${SIP_CODEC}           Set the SIP codec for a call