sa41-00

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sa41-00 [2020/11/16 16:28] Justin Willeysa41-00 [2020/11/16 18:51] (current) Justin Willey
Line 13: Line 13:
  
 <code>http://192.168.7.231:546342/ivr/PbxAPI.aspx?func=make_call&from=^&to=#</code> <code>http://192.168.7.231:546342/ivr/PbxAPI.aspx?func=make_call&from=^&to=#</code>
 +
 +Some phone systems install a local client program that supports a custom URL scheme such as Dial or Tel - these work just like very simple URLs eg:
 +
 +<code>tel://#</code>
  
 Then when you click on "Dial" on a phone number in IQX the appropriate http GET request will be made. Then when you click on "Dial" on a phone number in IQX the appropriate http GET request will be made.
Line 24: Line 28:
 Some phone systems require that POST requests with variables are made rather than a simple GET request with parameters in the URL. This can be done using an extended syntax eg: Some phone systems require that POST requests with variables are made rather than a simple GET request with parameters in the URL. This can be done using an extended syntax eg:
  
-<code>{POST}http://192.168.7.231:546342/ivr/PbxAPI.aspx?func=make_call<&>from=^<&>to=#/code>+<code>{POST}http://192.168.7.231:546342/ivr/PbxAPI.aspx?func=make_call<&>from=^<&>to=#</code>
  
-{POST} tells IQX to make a POST rather than a GET request. <&> indicates that the following parameter should be sent as a POST variable instead of a URL parameter. Note that all +{POST} tells IQX to make a POST rather than a GET request. <&> indicates that the following parameter should be sent as a POST variable instead of a URL parameter. Note that all post variables (ie <&> tokens) must come after any / all URL parameters. If there are no URL parameters, omit the initial ? eg:
  
 +<code>{POST}http://192.168.7.231:546342/ivr/PbxAPI.aspx<&>from=^<&>to=#</code>
 +
 +{GET} can be used to make it clear when GET request is being used, but is optional eg:
 +
 +<code>{GET}http://192.168.7.231:546342/ivr/PbxAPI.aspx?func=make_call&from=^&to=#</code>
  
 == Different URLs needed for different locations == == Different URLs needed for different locations ==
Line 35: Line 44:
 If you need additional substitutions or other more complex behaviour, you can use a database function to create the URL instead of entering it in General Settings. If you need additional substitutions or other more complex behaviour, you can use a database function to create the URL instead of entering it in General Settings.
  
-To do this enter the word FUNCTION as the value for the "Use Web Phone Dialling Mechanism". Then go to Maintenance | Database Functions | Communications | Generate Web Dial URL. The function which returns null by default can be edited here. Note that the output of the function should be a valid html URL, with spaces and other control characters appropriately escaped. Please contact IQX support for help if required. +To do this enter the word FUNCTION as the value for the "Use Web Phone Dialling Mechanism". Then go to Maintenance | Database Functions | Communications | Generate Web Dial URL. The function which returns null by default can be edited here. Note that the output of the function should be a valid html URL, with spaces and other control characters appropriately escaped. The {PUT} behaviour described above works in the same way, but be aware that the ^ & # substitutions are not carried out. The telephone number is passed to the function as a parameter, other information can be looked up from the database - the UserStaffID variable (the StaffID of the logged in user) is especially helpful. As sample procedure which allows for a number of different telephone systems, specified by a localised (ie Branch) general setting: 
 + 
 +<sxh SQL> 
 +ALTER FUNCTION "pears"."GenerateWEBDialURL"( in "Number" char(100) )  
 +returns long varchar 
 +begin 
 +declare rv long varchar; 
 +declare PhoneSystem char(50); 
 +declare Extension char(100); 
 +select WPKMaintainGetSwitchValue('SYNETY',Staff.AgencyID,'L'), Staff.Extension into PhoneSystem, Extension from Staff where Staff.StaffID = UserStaffID; 
 +case PhoneSystem 
 +       when 'MAIN' then set rv = string('http://sys1:82/api/call/makecall/',Extension,'/',[Number],'/9'
 +       when 'ALSR' then set rv =  string('http://phones2:81/api/call/makecall',Extension,'/',[Number]) 
 +       when 'ABSA' then set rv =  string('http://myphones:8180/api/call/makecall',Extension,'/',[Number]) 
 +       when 'AVYIA' then set rv =  string('http://main.intra.com:55340/phone.asmx/MakeCall?originatorExtension=',Extension,'&destinationPhoneNumber=',[Number],'&openLineCharacter=9'
 +    end case; 
 +return rv; 
 +end; 
 +</sxh> 
 + 
 +Please contact IQX support for help if required. 
  • sa41-00.1605544125.txt.gz
  • Last modified: 2020/11/16 16:28
  • by Justin Willey