Adding a small new feature.

Setting _SIPFROMDOMAIN in a channel will set the domain we use for the URI in the outbound call leg.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.2
Olle Johansson 17 years ago
parent a45c3a8729
commit 5aa23add8c

@ -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"))) { } 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 */ /* Check whether there is a variable with a name starting with SIPADDHEADER */
p->options->addsipheaders = 1; 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")) { } else if (!strcasecmp(ast_var_name(current), "SIPTRANSFER")) {
/* This is a transfered call */ /* This is a transfered call */
p->options->transfer = 1; p->options->transfer = 1;

@ -922,6 +922,7 @@ ${SMDI_VM_TYPE} * When an call is received with an SMDI message, the 'type
\begin{verbatim} \begin{verbatim}
${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching) ${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching)
${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate) ${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate)
${SIPFROMDOMAIN} Set SIP domain on outbound calls
${SIPUSERAGENT} * SIP user agent (deprecated) ${SIPUSERAGENT} * SIP user agent (deprecated)
${SIPURI} * SIP uri ${SIPURI} * SIP uri
${SIP_CODEC} Set the SIP codec for a call ${SIP_CODEC} Set the SIP codec for a call

Loading…
Cancel
Save