Both sides previous revision Previous revision Next revision | Previous revision |
sa41-00 [2017/12/01 16:35] – external edit 127.0.0.1 | sa41-00 [2020/11/16 18:51] (current) – Justin Willey |
---|
<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> |
| |
Then when you click on "Dial" on a phone number in IQX the appropriate http call will be made. | 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. |
| |
Note that the user extension number needs to be set up for each IQX user in Maintenance | Users. | Note that the user extension number needs to be set up for each IQX user in Maintenance | Users. |
| |
=== More complex situations === | === More complex situations === |
| |
| == POST requests required == |
| |
| 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> |
| |
| {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 == |
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. |