LinuxBox PBX API: PLPGSQL API

LinuxBox PBX API: PLPGSQL API

Built:

2019-03-18 08:29:22


Function

pbx.agent_call_att_transfer


Attended transfer of a call from one agent to another

Parameters:


x_userid TEXT user ID


x_duserid TEXT user ID of destination agent

Returns:

TEXT status


Function

pbx.agent_call_bargein


Join agent into another agent call

Parameters:


x_agent TEXT user ID of barging agent


x_dagent TEXT user ID of destination agent

Returns:

TEXT status


Function

pbx.agent_call_hold


Put agent call on hold

Parameters:


x_userid TEXT agent user ID


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.agent_call_hold


Transfer held call back to agent

Parameters:


x_userid TEXT agent user ID


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.agent_call_hold


Transfer held call back to extension

Parameters:


x_exten TEXT extension


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.agent_call_spy


Initiate agent call spy on another agent call

Parameters:


x_agent TEXT user ID of spying agent


x_dagent TEXT user ID of destination agent

Returns:

TEXT status


Function

pbx.agent_call_transfer


Transfer call from one agent to another

Parameters:


x_userid TEXT user ID


x_duserid TEXT user ID of destination agent

Returns:

TEXT status


Function

pbx.agent_call_whisper


Initiate agent whisper on another agent call

Parameters:


x_agent TEXT user ID of whispering agent


x_dagent TEXT user ID of destination agent

Returns:

TEXT status


Function

pbx.agent_create


Create new agent

Parameters:


x_agent TEXT agent user ID

Returns:

TEXT status


Function

pbx.agent_delete


Delete agent

Parameters:


x_agent TEXT agent user ID

Returns:

TEXT status


Function

pbx.agent_dial


Dial call to agent

Parameters:


x_agent TEXT user ID


x_number TEXT target number


x_params JSONB optional parameters (outgoing_cid_num)

Returns:

TEXT status


Function

pbx.agent_hangup


Hangup pending agent call

Parameters:


x_agent TEXT user ID

Returns:

TEXT status


Function

pbx.agent_login


Login agent

Parameters:


x_userid TEXT user ID


x_exten TEXT phone extensions


x_queues TEXT[] list of queues to login to (optional)


x_attrs JSON attributes (optional)

Returns:

TEXT status


Function

pbx.agent_logout


Logout agent

Parameters:


x_userid TEXT user ID


x_reason TEXT logout reason (optional)

Returns:

TEXT status


Function

pbx.agent_pause


Pause agent

Parameters:


x_userid TEXT agent user ID


x_reason TEXT pause reason (name of state) (optional)


x_attrs JSON pause attributes (optional)

Returns:

TEXT status


Function

pbx.agent_set_attr


Set attribute for agent

Parameters:


x_userid TEXT agent user ID


x_attr JSON attribute(s) to set

Returns:

TEXT status


Function

pbx.agent_skill_add


Add skill to agent

Parameters:


x_userid TEXT agent user ID


x_skill TEXT name of the skill to add

Returns:

TEXT status


Function

pbx.agent_skill_remove


Remove skill from agent

Parameters:


x_userid TEXT agent user ID


x_skill TEXT name of the skill to remove

Returns:

TEXT status


Function

pbx.agent_unpause


Unpause agent

Parameters:


x_userid TEXT agent user ID

Returns:

TEXT status


Function

pbx.call_att_transfer


Attended transfer of call to destination extension at given context

Parameters:


x_call_id TEXT call ID


x_dst_exten TEXT destination extensions


x_dst_context TEXT destination context

Returns:

TEXT status


Function

pbx.call_hangup


Request call hangup

Parameters:


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.call_hold


Put call on hold

Parameters:


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.call_transfer


Transfer call to destination extension at given context

Parameters:


x_call_id TEXT call ID


x_dst_exten TEXT destination extensions


x_dst_context TEXT destination context

Returns:

TEXT status


Function

pbx.exten_call_att_transfer


Attended transfer call from extension to another at given context

Parameters:


x_exten TEXT extension


x_dst_exten TEXT destination extension


x_dst_context TEXT destination context

Returns:

TEXT status


Function

pbx.exten_call_bargein


Join exten into another exten call

Parameters:


x_exten TEXT barging extension


x_dst_exten TEXT destination extension

Returns:

TEXT status


Function

pbx.exten_call_hold


Put call on hold for given extensions

Parameters:


x_exten TEXT extensions


x_call_id TEXT call ID

Returns:

TEXT status


Function

pbx.exten_call_spy


Initiate exten call spy on another extension call

Parameters:


x_exten TEXT spying extension


x_dst_exten TEXT destination extension

Returns:

TEXT status


Function

pbx.exten_call_transfer


Transfer call from extension to another at given context

Parameters:


x_exten TEXT extension


x_dst_exten TEXT destination extension


x_dst_context TEXT destination context

Returns:

TEXT status


Function

pbx.exten_call_whisper


Initiate exten call whisper on another extension call

Parameters:


x_exten TEXT whispering extension


x_dst_exten TEXT destination extension

Returns:

TEXT status


Function

pbx.exten_dial


Dial call to extension

Parameters:


x_exten TEXT phone extension


x_number TEXT target number


x_outgoing_cid_num TEXT outgoing caller identification (number)


x_params JSON optional parameters

Returns:

TEXT status


Function

pbx.exten_hangup


Request exten call hangup

Parameters:


x_exten TEXT phone extension

Returns:

TEXT status


Function

pbx.get_exten_last_call_id


Return call id of exten last call (finished or pending)

Parameters:


x_exten TEXT extension

Returns:

TEXT call id


Function

pbx.group_number_add


Add number to number group

Parameters:


x_group TEXT group name


x_number TEXT number

Returns:

TEXT status


Function

pbx.group_number_remove


Remove number from number group

Parameters:


x_group TEXT group name


x_number TEXT number

Returns:

TEXT status


Function

pbx.queue_agent_add


Add agent to queue

Parameters:


x_queue TEXT queue name


x_userid TEXT agent user id


x_priority INTEGER (optional)

Returns:

TEXT status


Function

pbx.queue_agent_remove


Add agent to queue

Parameters:


x_queue TEXT queue name


x_userid TEXT agent user id


x_priority INTEGER (optional)

Returns:

TEXT status


Function

pbx.queue_exten_add


Add line to queue

Parameters:


x_queue TEXT queue name


x_exten TEXT exten


x_priority INTEGER (optional)

Returns:

TEXT status


Function

pbx.queue_exten_remove


Remove line from queue

Parameters:


x_queue TEXT queue name


x_exten TEXT exten

Returns:

TEXT status


Function

pbx.queue_sip_add


Add SIP line to queue

Parameters:


x_queue TEXT queue name


x_exten TEXT SIP exten


x_priority INTEGER (optional)

Returns:

TEXT status


Function

pbx.queue_sip_remove


Remove SIP line from queue

Parameters:


x_queue TEXT queue name


x_exten TEXT SIP exten

Returns:

TEXT status


Function

pbx.set_call_tag


Insert call tag for specified call into cel table

Parameters:


x_call_id TEXT call id


x_tag TEXT tag

Returns:

NULL


Function

pbx.set_incoming_number


Set incoming number route to agent or exten

Parameters:


x_number TEXT incoming number


x_target_type TEXT target type („exten“/“agent“)


x_target TEXT target (exten or userid)


x_attrs JSON additional route attributes (optional)

Returns:

TEXT status


Function

pbx.set_incoming_numbers


Set/replace incoming route to agent or exten for multiple numbers

Parameters:


x_numbers TEXT[] list of incoming numbers


x_target_type TEXT target type („exten“/“agent“)


x_target TEXT target (exten or userid)

Returns:

TEXT status


Function

pbx.set_incoming_numbers


Set/replace incoming route to agent or exten for multiple numbers

Parameters:


numbers TEXT[] list of incoming numbers


target_type TEXT target type („exten“/“agent“)


target TEXT target (exten or userid)

Returns:

TEXT status


Function

pbx.sip_line_create


Provision new SIP line

Parameters:


x_linenum TEXT line number


x_description TEXT line description


x_secret


x_attrs JSON additional attributes (optional)

Returns:

TEXT status


Function

pbx.sip_line_delete


Deprovision SIP line

Parameters:


x_linenum TEXT line number

Returns:

TEXT status