Show
Ignore:
Timestamp:
02/24/11 14:40:42 (2 years ago)
Author:
escape2mtns
Message:

document ability to use asterisk vars for destination match (as opposed to db lookup)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/smartroutes/CHANGES

    r11540 r11588  
    2323 TO-DO: 
    2424 ------- 
    25  - Allow destination matches based on DB search OR an existing dialplan variable (maybe from a previous search) 
     25  - Allow destination matches based on DB search OR an existing dialplan variable (maybe from a previous search) 
     26 ** unnecessary ** Can be done with SQL query SELECT('${var}') 
     27 - Section for ad-hoc setting of Asterisk dialplan variables (as going through routes, may want to set some vars and route based on those later)  
     28 ** unnecessary ** Can be done with SQL query SELECT('${var}') & var to assign is one of 5  
     29 
    2630 - Notes field to record descriptions of what the routes are doing 
    2731 - Better identification of sql returns by counting commas outside parens 
  • contributed_modules/modules/smartroutes/page.smartroutes.php

    r11531 r11588  
    228228   
    229229  echo('<div id="smartroutes_adv_query" '.($smartroute_queries[$main_query]['use_wizard']==1?'style="display:none;"':'').'><table>'."\n"); 
    230   echo('<tr><td><a href=# class="info">'._("SQL").'<span><br>'._("Enter an SQL query to use.  You can return up to 5 columns and they will be assigned to the associated Asterisk vars.  The first column returned will be the key used to match a destination below.  The other columns can be assigned to Asterisk dialplan vars for use in the dialplan, as a CID name prefix, recorded into the CDR, etc.<br><br>Note that any Asterisk vars in the query need to be indicated as they are in Asterisk with '\${asteriskvar}'.").'<br></span></a></td><td><a href=# class="info">'._("Assign AST Vars 1-5").'<span><br>'._("<b>Note: The first value returned is used for the destination match.</b><br><br>Up to five results from the query can be assigned to Asterisk dialplan vars. Examples would be: CALLERID(name), CDR(userfield), OUTCID_2, or a custom variable that you put in the FreePBX Caller ID prefix field.<br><br>Note that you can leave a return value blank and not assign a var.<br><br>Note that the vars entered here do not need to be formatted as Asterisk vars but just include the var name.").'<br></span></a></td></tr>'."\n"); 
     230  echo('<tr><td><a href=# class="info">'._("SQL").'<span><br>'._("Enter an SQL query to use.  You can return up to 5 columns and they will be assigned to the associated Asterisk vars.  The first column returned will be the key used to match a destination below.  The other columns can be assigned to Asterisk dialplan vars for use in the dialplan, as a CID name prefix, recorded into the CDR, etc.<br><br>Note that any Asterisk vars in the query need to be indicated as they are in Asterisk with '\${asteriskvar}'.<br><br>Tip: SQL \"SELECT ('\${var}')\" will allow an Asterisk variable to be assigned to a new var (specified as one of the five) or be used as the destination match criteria.").'<br></span></a></td><td><a href=# class="info">'._("Assign AST Vars 1-5").'<span><br>'._("<b>Note: The first value returned is used for the destination match.</b><br><br>Up to five results from the query can be assigned to Asterisk dialplan vars. Examples would be: CALLERID(name), CDR(userfield), OUTCID_2, or a custom variable that you put in the FreePBX Caller ID prefix field.<br><br>Note that you can leave a return value blank and not assign a var.<br><br>Note that the vars entered here do not need to be formatted as Asterisk vars but just include the var name.").'<br></span></a></td></tr>'."\n"); 
    231231  echo('<tr><td><input type="text" class="smartroute_query_adv_sql[0]" name="smartroute_query_adv_sql[0]" value="'.$smartroute_queries[$main_query]['adv_query'].'" tabindex="'.$tabindex++.'" /></td>'); 
    232232  echo('<td><nobr><input type="text" class="smartroute_query_adv_var1[0]" name="smartroute_query_adv_var1[0]" value="'.$smartroute_queries[$main_query]['adv_varname1'].'" tabindex="'.$tabindex++.'" />');