Index: asterisk/channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.661 diff -u -r1.661 chan_sip.c --- asterisk/channels/chan_sip.c 14 Feb 2005 23:20:01 -0000 1.661 +++ asterisk/channels/chan_sip.c 16 Feb 2005 15:05:44 -0000 @@ -352,6 +352,7 @@ struct sip_route *route; /* Head of linked list of routing steps (fm Record-Route) */ int route_persistant; /* Is this the "real" route? */ char from[256]; /* The From: header */ + char alertinfo[256]; /* Alert-Info SIP header for distinctive ring */ char useragent[256]; /* User agent in SIP request */ char context[AST_MAX_EXTENSION]; /* Context for this call */ char fromdomain[AST_MAX_EXTENSION]; /* Domain to show in the from field */ @@ -2148,6 +2149,9 @@ if (!ast_strlen_zero(i->callid)) { pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid); } + if (!ast_strlen_zero(i->alertinfo)) { + pbx_builtin_setvar_helper(tmp, "SIPALERTINFO", i->alertinfo); + } ast_setstate(tmp, state); if (state != AST_STATE_DOWN) { if (ast_pbx_start(tmp)) { @@ -7880,6 +7884,7 @@ char *from; char *e; char *useragent; + char *alertinfo; struct ast_channel *c=NULL; struct ast_channel *transfer_to; int seqno; @@ -7918,6 +7923,9 @@ useragent = get_header(req, "User-Agent"); strncpy(p->useragent, useragent, sizeof(p->useragent)-1); + /* Save Alert-Info sent to us */ + alertinfo = get_header(req, "Alert-Info"); + strncpy(p->alertinfo, alertinfo, sizeof(p->alertinfo)-1); if (strcasecmp(cmd, "SIP/2.0")) { /* Request coming in */ Index: asterisk/doc/README.variables =================================================================== RCS file: /usr/cvsroot/asterisk/doc/README.variables,v retrieving revision 1.33 diff -u -r1.33 README.variables --- asterisk/doc/README.variables 13 Feb 2005 20:57:52 -0000 1.33 +++ asterisk/doc/README.variables 16 Feb 2005 15:05:44 -0000 @@ -398,6 +398,7 @@ ${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate) ${SIPUSERAGENT} SIP user agent ${SIPURI} SIP uri +${SIPALERTINFO} SIP Alert-Info header for distinctive ring, received. The SIP channel reads the following variable: ${SIP_CODEC} Set the SIP codec for a call