Asterisk queue agent status Mechanism Analysis

Source: Internet
Author: User

The final obtaining of the agent status is to call devicestate. in C, the ast_device_state is obtained. When the queue module is initialized, it registers the callback function for device status change, devicestate. c starts the thread do_devstate_changes when the system starts, constantly calls ast_device_state to get the device status, and updates the agent status based on the callback function registered during queue initialization, the ast_device_state function provides two methods to obtain the device status. One is to call the device status query function provided by the protocol stack when the protocol stack supports the device status, such as the SIP protocol stack, which is obtained through the sip_devicestate function, the other is to retrieve the agent status by traversing the channel composed of the agent interface.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.