[svn-commits] oej: trunk r151739 - in /trunk: channels/chan_sip.c doc/tex/channelvariables.tex

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 23 10:30:17 CDT 2008


Author: oej
Date: Thu Oct 23 10:30:16 2008
New Revision: 151739

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151739
Log:
Adding a small new feature. 
Setting _SIPFROMDOMAIN in a channel will set the domain we use for the URI in the outbound call leg.

Modified:
    trunk/channels/chan_sip.c
    trunk/doc/tex/channelvariables.tex

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=151739&r1=151738&r2=151739
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Oct 23 10:30:16 2008
@@ -4652,6 +4652,8 @@
 		} 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;

Modified: trunk/doc/tex/channelvariables.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/channelvariables.tex?view=diff&rev=151739&r1=151738&r2=151739
==============================================================================
--- trunk/doc/tex/channelvariables.tex (original)
+++ trunk/doc/tex/channelvariables.tex Thu Oct 23 10:30:16 2008
@@ -922,6 +922,7 @@
 \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




More information about the svn-commits mailing list