summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-11-11 15:08:57 +0000
committerMark Spencer <markster@digium.com>2004-11-11 15:08:57 +0000
commit2840e351ad4682427ed2e1bf18d62f76f7969432 (patch)
tree0c7fa0a50335f12836b8c78164a08857888f08b6 /channels
parentec3dc05bf74ea1d2a4a6e768ad9150151cf379e6 (diff)
Cleanup/performance improve chan_sip slightly (bug #2823)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a912741a9..a16dfea2c 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1432,19 +1432,16 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout)
headp=&ast->varshead;
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)
- {
+ } else if (!distinctive_ring && !strcasecmp(ast_var_name(current),"ALERT_INFO")) {
+ /* Check whether there is a ALERT_INFO variable */
distinctive_ring = ast_var_value(current);
}
#ifdef OSP_SUPPORT
- else if (!strcasecmp(ast_var_name(current), "OSPTOKEN")) {
+ else if (!osptoken && !strcasecmp(ast_var_name(current), "OSPTOKEN")) {
osptoken = ast_var_value(current);
- } else if (!strcasecmp(ast_var_name(current), "OSPHANDLE")) {
+ } else if (!osphandle && !strcasecmp(ast_var_name(current), "OSPHANDLE")) {
osphandle = ast_var_value(current);
}
#endif