Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.556 diff -u -r1.556 chan_sip.c --- channels/chan_sip.c 9 Nov 2004 02:38:18 -0000 1.556 +++ channels/chan_sip.c 11 Nov 2004 00:56:30 -0000 @@ -1428,23 +1428,22 @@ return -1; } /* Check whether there is vxml_url, distinctive ring variables */ - + headp=&ast->varshead; - AST_LIST_TRAVERSE(headp,current,entries) { + AST_LIST_TRAVERSE(headp, current, entries) { /* Check whether there is a VXML_URL variable */ - if (strcasecmp(ast_var_name(current),"VXML_URL")==0) - { + if ((!vxml_url) && !strcasecmp(ast_var_name(current), "VXML_URL")) { vxml_url = ast_var_value(current); - } else + } /* Check whether there is a ALERT_INFO variable */ - if (strcasecmp(ast_var_name(current),"ALERT_INFO")==0) - { + if ((!distinctive_ring) && !strcasecmp(ast_var_name(current), "ALERT_INFO")) { distinctive_ring = ast_var_value(current); - } + } #ifdef OSP_SUPPORT - else if (!strcasecmp(ast_var_name(current), "OSPTOKEN")) { + if ((!osptoken) && !strcasecmp(ast_var_name(current), "OSPTOKEN")) { osptoken = ast_var_value(current); - } else if (!strcasecmp(ast_var_name(current), "OSPHANDLE")) { + } + if ((!osphandle) && !strcasecmp(ast_var_name(current), "OSPHANDLE")) { osphandle = ast_var_value(current); } #endif