<% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>

FS::part_export::broadworks

CREATE-OR-UPDATE METHODS

These take a Freeside object that can be exported to the Broadworks system, determine if it already has been exported, and if so, update it to match the Freeside object. If it's not already there, they create it. They return a list of two objects: - that object's identifying string or hashref or whatever in Broadworks, and - an error message, if creating the object failed.

set_cust_main_Group CUST_MAIN

Takes a FS::cust_main, creates a Group for the customer, and returns a GroupId. If the Group exists, it will be updated with the current customer and export settings.

set_svc_phone_User SVC_PHONE, GROUPID

Creates a User object corresponding to this svc_phone, in the specified group. If the User already exists, updates the record with the current customer name (or phone name), phone number, and access device.

set_device_AccessDevice DEVICE, [ GROUPID ]

Creates/updates an Access Device Profile. This is a record for a specific physical device that can send/receive calls. (Not to be confused with an "Access Device Endpoint", which is a port on such a device.) DEVICE can be any record with a foreign key to FS::part_device.

If GROUPID is specified, this device profile will be created at the Group level in that group; otherwise it will be a ServiceProvider level record.

PROVISIONING METHODS

These return an error string on failure, and an empty string on success.

assign_number NUMBER, GROUPID

Assigns a phone number to a group. If it's assigned to a different group or doesn't belong to the service provider, this will fail. If it's already assigned to this group, it will do nothing and return success.

release_number NUMBER, GROUPID

Unassigns a phone number from a group. If it's assigned to a user in the group then this will fail. If it's not assigned to the group at all, this does nothing.

set_endpoint USERID [, DEVICENAME ]

Sets the endpoint for communicating with USERID to DEVICENAME. For now, this assumes that all devices are defined at Group level.

If DEVICENAME is null, the user will be set to have no endpoint.

set_sip_authentication USERID, NAME, PASSWORD

Sets the SIP authentication credentials for USERID to (NAME, PASSWORD).

delete_group GROUPID

Deletes the group GROUPID.

delete_User USERID

Deletes the user USERID, and releases its phone number if it has one.

delete_Device DEVICENAME[, GROUPID ]

Deletes the access device DEVICENAME (from group GROUPID, or from the service provider if there is no GROUPID).

CONVENIENCE METHODS

SPID

Returns 'serviceProviderId' => the service_provider option. This is commonly needed in request parameters.

groupId CUST_MAIN

Returns the groupID that goes with the specified customer.

userId SVC_X

Returns the userId (including domain) that should go with the specified service.

deviceName DEVICE

Returns the access device name that should go with the specified phone_device or pbx_device.

oci_table HASHREF

Converts the base OCITable type into an arrayref of hashrefs.

import_cdrs START, END

Retrieves CDRs for calls in the date range from START to END and inserts them as a new CDR batch. On success, returns a new cdr_batch object. On failure, returns an error message. If there are no new CDRs, returns nothing.

request SCOPE, COMMAND, [ ARGUMENTS... ]

Wrapper for "request" in BroadWorks::OCI. The client object will be cached. Returns two values: a flag, true or false, indicating success of the request, and the decoded response message as a hashref.

On failure of the request (or failure to authenticate), the response message will be a simple scalar containing the error message.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 692:

=over without closing =back

<% include ('/elements/footer.html' ) %>