End-User URL Control API

From Taridium

(Difference between revisions)
Jump to: navigation, search
(Generic Authentication)
Line 72: Line 72:
== Generic Authentication ==
== Generic Authentication ==
-
While URL Control can be used in an dedicated user context. One can also use plain HTTP authentication to place arbitrary calls from any extension to another. This applies only to the call functionality and cannot be used for any other command, since there is no specific user associated to the login (no need to use key or come from a specific IP address).
+
While URL Control can be used in an dedicated user context one can also use plain HTTP authentication to place arbitrary calls from any extension to another. This applies only to the call functionality and cannot be used for any other commands, since there is no specific user associated to the login. There is no need to use the '''key''' argument or come from a specific IP address.
-
   $GLOBALS['cfg']['IPPSUser'] // the variable that sets the username
+
The following system configuration variables are applicable:
-
   $GLOBALS['cfg']['IPPSPassword'] // the variable that sets the password
+
 
-
   $GLOBALS['cfg']['IPPSDPContext'] // optional dialplan (if not set '''inside''' will be used)
+
   $cfg['IPPSUser'] // the variable that sets the username
 +
   $cfg['IPPSPassword'] // the variable that sets the password
 +
   $cfg['IPPSDPContext'] // optional dialplan (if not set '''inside''' will be used)
Example using URL Control with HTTP authentication:
Example using URL Control with HTTP authentication:
   http://user:password@mypbx/user/c/?user=12345&call=5550000
   http://user:password@mypbx/user/c/?user=12345&call=5550000

Revision as of 17:35, 18 March 2009

This optional ipbx module is installed under Advanced SetupModules. Registered modules are displayed with registered module.

The URL control module allows you to control certain user settings via a simple URL. It also allows you to initiate a call (call origination) to your extension and bridge the call to any destination reachable within your default user settings (or custom extensions).

Warning.gif Do not expose this functionality on the public internet! If your server is reachable via a public IP address, make sure you take the appropriate precautions to prevent abuse.


Contents

Enabling URL Control

This assumes that you have the URL Control module installed. See Optional Modules

Log into the end user panel e.g. http://mypbx/user and enable URL Control under the Features section. Once enabled the system will automatically generate a 6 character key that identifies the user/extension. You can also, optionally specify an IP address that will identify the user/extension instead of the key.

Action Commands

Examples on how to use URL control:

If you specify an authorized client IP address you can omit the key portion. E.g. http://mypbx/user/c/?call=5550000

Return Values

Return values are simple text strings that reply with the result of the requested action. They can either start with the ERROR or OK keyword, followed by a short explanation.

Error Values

 ERROR: AUTHENTICATION FAILED

Returned if authentication fails (invalid key) or IP address cannot be matched.

 ERROR: FAILED PLACING CALL

Returned if the call could not be placed successfully. See also notes below on placed calls. The default timeout for first leg calls is 30 seconds.

Successful Values

 OK: UPDATED FORWARDING SETTINGS

The forwarding settings have been updated successfully.

 OK: UPDATED FOLLOWME SETTINGS

The followme settings have been updated successfully.

 OK: UPDATED VM SETTINGS  

The voicemail settings have been updated successfully.

 OK: CALL PLACED

The call has been placed successfully. Returned once the first leg of the call, to the user, has been placed successfully. Note this value will also be returned if the second leg of the call fails. The second leg call progress will be indicated on the phone of the caller.

HTML Output

URL Control can also return a simple HTML call progress page by setting the progress argument to 1. E.g. http://mypbx/user/c/?call=5550000&progress=1 - HTML output will pause until the successful/failed status is returned.

Successful Call

 » User 4002
 » Placing call to 4012...
 » Call completed!
 » Wait for party to pickup

Failed Call

 » User 4002
 » Placing call to 4012...
 » Call failed!

Generic Authentication

While URL Control can be used in an dedicated user context one can also use plain HTTP authentication to place arbitrary calls from any extension to another. This applies only to the call functionality and cannot be used for any other commands, since there is no specific user associated to the login. There is no need to use the key argument or come from a specific IP address.

The following system configuration variables are applicable:

 $cfg['IPPSUser'] // the variable that sets the username
 $cfg['IPPSPassword'] // the variable that sets the password
 $cfg['IPPSDPContext'] // optional dialplan (if not set inside will be used)

Example using URL Control with HTTP authentication:

 http://user:password@mypbx/user/c/?user=12345&call=5550000
Personal tools
Namespaces
Variants
Actions
Toolbox