Changeset 14280
- Timestamp:
- 08/10/12 08:16:15 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/smartroutes/functions.inc.php
r14273 r14280 912 912 $ext->add($context, $extension, '', new ext_gotoif('$["${'.$smartroute_queries[$main_query]['adv_varname1'].'}" '.$matchtype.' "'.$dest['matchkey'].'"]',"destination".$index)); 913 913 } 914 else if($matchtype == "=" && version_compare($version, "1.6", "gt")) {915 // values as strings916 // asterisk 1.8 doesn't like the null values when no db match found so set var as "(nullstring)" before comparison917 $ext->add($context, $extension, '', new ext_execif('$["${'.$smartroute_queries[$main_query]['adv_varname1'].'}foo"="foo"]','Set',$smartroute_queries[$main_query]['adv_varname1'].'="NULL"'));918 $ext->add($context, $extension, '', new ext_gotoif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'} '.$matchtype.' "'.$dest['matchkey'].'"]',"destination".$index));919 }920 914 else { 921 915 // values as integers OR in version 1.8 never double quote values 922 916 // asterisk 1.8 doesn't like the null values when no db match found so set var as "(nullstring)" before comparison 923 917 $ext->add($context, $extension, '', new ext_execif('$["${'.$smartroute_queries[$main_query]['adv_varname1'].'}foo"="foo"]','Set',$smartroute_queries[$main_query]['adv_varname1'].'="NULL"')); 924 $ext->add($context, $extension, '', new ext_gotoif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'} '.$matchtype.' '.$dest['matchkey'].']',"destination".$index));918 $ext->add($context, $extension, '', new ext_gotoif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'}'.$matchtype.$dest['matchkey'].']',"destination".$index)); 925 919 } 926 920 }
