Configuring a queue

本文介绍了一个具体的队列配置案例:所有来电将被监控并保存;若60秒内无人接听,则转语音邮箱;设有两层代理,一级为代理302和303,二级为代理301。此外还提供了更多队列配置的相关资源链接。
Configuring a queue
The following queue works as following:
all calls are monitored, i.e. saved to disk
if after 60 seconds on the queue the call is unanswered, the call is routed to voicemail
there are two levels of agents: agents 302 and 303 will answer the queue (level 1); only if none of them is available the call is routed to agent 301 (level 2). If nobody is available, the queue keeps trying until timeout is reached.

Extensions.conf

[q-my-sample]
; ...queue description.....
exten =>
s,1,SetVar(MONITOR_FILENAME=/var/spool/asterisk/queuecalls/QSAMPLE-${
UNIQUEID})
exten => s,2,Queue(q-sample|n|||)
exten => s,3,Playback(voicemail-invitation)
exten => s,4,VoiceMail,s2001
Queues.conf

[q-sample]
music = default
announce = q-sample-announce
strategy = roundrobin
timeout = 60
retry = 5
maxlen = 0
announce-frequency = 0
announce-holdtime = no
monitor-format = wav
monitor-join = yes
queue-youarenext = silence
queue-thankyou = q-sample-thankyou
member=>Agent/302,0
member=>Agent/303,0
member=>Agent/301,1
More information on configuring a queue can be found at Understanding queue logic.

Softlinks:
Home Page - Understanding queue logic - Recording queue transfers to disk - Compiling Asterisk with OH323 - Installing the Asterisk GUI - Connecting to FWD using IAX - Compiling Asterisk 1.4 beta - Peering two Asterisk servers using IAX - Script to convert music-on-hold to native formats - Compiling Asterisk 1.2 with TDM400 and H323 - QueueMetrics - Installing QueueMetrics - Installing QueueMetrics from scratch - Compiling Asterisk 1.4 with TDM400 and H323 - Upgrading QueueMetrics licences - AddQueueMember and the queue_log file - Installing Queuemetrics on Debian - asterisk - Avoiding queue_log file rotation - Using a HT-488 with Asterisk - Managing agents that dynamically log-on - Installing QueueMetrics on Fonality PBXtra - Listening to recorded calls using XC-AST - QueueMetrics logs - Manually updating QueueMetrics - Installing Queuemetrics on PBX-in-a-Flash - Administering QueueMetrics using Tomcat - Debugging Qloaderd installation - Installing QueueMetrics using Yum - Rebuilding Fonality queue_log
Tags:
#popular monitor queue
The Packet Analyzer (PA) Manager is a software layer acting as a CPSS resource manager, and is responsible for managing the debug and analysis features, such as the i-Debug mechanism. The PA Manager utilizes the i-Debug mechanism and resources. Might expose in future when additional resources are added The PA manager operates on a single device. To use the PA for multiple devices, configure separate PA managers to operate concurrently, each on a differing device. The Packet Analyzer uses Stages to access i-Debug’s Interfaces and Instances, where each Stage is named by the user, and represents an i-Debug Interface accessed by the Packet Analyzer. The PA Manager manages groups of rules. Each rule includes a key with a set of stages and fields as well as corresponding field values to match in packet descriptors during the listed stages. In addition, the rule includes an action to apply on packets/descriptors in which a match is found. When a group is enabled, the i-Debug mechanism utilizes the set of rules in the group during Traffic, and the sampled results are retrieved with the details of the descriptor fields in the sampled interfaces. The following figure illustrates the software structures and their relation. Figure 323: Packet Analyzer Manager Blocks The group concept allows configuring several sets of rules, and run one group at a time, narrowing down the location of the tracked problem. Predefined Stages Most Prestera devices have a common set of main engines the packet descriptor traverses through. The Packet Analyzer manager identifies the Interfaces ingressing these engines as major i-Debug Interfaces, and terms them pre-defined Stages. These stages are used in the keys for identifying the Interfaces to sample. The stages are enumerated by the CPSS enumeration type CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ENT. The following table lists the stages and the CPSS enumerators representing them. Note that some stages are inactive by default. For their list, see the relevant device diagram in i-Debug. Table 170: Prestera Pipe Stages: CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ENT Stage Name CPSS Enumerator TTI CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_TTI_E Ingress PCL CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_PCL_E Bridge CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_BRIDGE_E Router CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_ROUTER_E Ingress OAM CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_OAM_E Ingress Policer CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_POLICER_E MLL CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_MLL_E e_Queue CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_INGRESS_PRE_E_QUEUE_E Egress Filter CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_FILTER_E Transmit Queue CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_TRANSMIT_QUEUE_E Header Alteration CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_HEADER_ALTERATION_E Egress OAM CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_OAM_E Egress PCL CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_PCL_E Egress Policer CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_POLICER_E Timestamp CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_TIMESTAMP_E Port MAC CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_MAC_E PHA (Falcon Only) CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_PHA_E Replication (Falcon Only) CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_EGRESS_PRE_REPLICATION_E CPSS Stages (No CLI Equivalent) All Stages CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ALL_STAGES_E Predefined Fields The Packet Analyzer stores a common set of fields often used in descriptors within the Prestera pipeline. These fields are used within the keys for identifying the descriptors to sample. As explained in the i-Debug section, not all fields exist in all stages. However, many of them exist in multiple stages, allowing the user to track a specific packet. Look here for a list of field name enumerators, listed in CPSS_DXCH_PACKET_ANALYZER_FIELD_ENT, description, and their stage relevancy (activeness). User Defined Stages As described above, Prestera devices incorporate numerous engines, resulting with numerous interfaces connecting them, beyond the basic stages. i-Debug is capable of tracing and sampling them all. To enable the Packet Analyzer accessing these additional interfaces through APIs, the application can define any Interface as a User Defined Stage, name it, and use it as part of a key. There is a maximum of 20 User Defined Stages, or UDSs, available for simultaneous usage, and enumerated within CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ENT as CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_UDS_n_E, with n ranging between 0 and 19. Call cpssDxChPacketAnalyzerUserDefinedStageAdd to define any i-Debug interface as a Stage with its name as a parameter. Use this name to refer this Stage when calling the PA APIs. User Defined Stages are kept for internal use, thus requiring the application writer to obtain the exact parameter values from a Marvell Application Engineer The following APIs are used to manage the User-Defined-Fields: cpssDxChPacketAnalyzerUserDefinedFieldAdd Adds a UDF cpssDxChPacketAnalyzerUserDefinedFieldGet Obtains attributes of UDF with the specified name cpssDxChPacketAnalyzerUserDefinedFieldDelete Deletes a UDF User Defined Fields Similarly to User Defined Stages, i-Debug interfaces include fields on top of the predefined fields. To sample and apply matching criteria on them, use the User Defined Field mechanism. Call cpssDxChPacketAnalyzerUserDefinedFieldAdd to add a user defined field to the list of usable fields with its name for future reference as a parameter. There are 64 User Defined Fields, or UDF, which are enumerated within CPSS_DXCH_PACKET_ANALYZER_FIELD_ENT as CPSS_DXCH_PACKET_ANALYZER_FIELD_UDF_n_E, with n ranging between 0 and 63. User Defined Fields are kept for internal use, thus requiring the application writer to obtain their exact values from a Marvell Application Engineer The following APIs are used to manage the User-Defined-Fields: cpssDxChPacketAnalyzerUserDefinedFieldAdd Adds a UDF cpssDxChPacketAnalyzerUserDefinedFieldGet Obtains attributes of UDF with the specified name cpssDxChPacketAnalyzerUserDefinedFieldDelete Deletes a UDF Description and Flow Each packet descriptor traverses the switch through its stages, as demonstrated in figure Main Interfaces and i-Debug Instances in Aldrin2. The PA Manager lists these stages in CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ENT. The PA Manager uses the entities listed in the following table to manage packet analysis. Table 171: Packet Analyzer Entities PA Entity Description API Creating the Entity Key A sampling criteria comprised of: A list of fields Field mode assignment A list of Stages in which to sample the specified fields cpssDxChPacketAnalyzerLogicalKeyCreate creates a key Action An action comprised of: Sampling status Sampling mode (first/last) Inverse state cpssDxChPacketAnalyzerActionCreate creates an action Rule A rule comprised of: A Key instance A list of Key field value filters An Action instance When a rule is enabled the i-Debug engine samples only descriptors in the Stages listed in the Key with matching field values. cpssDxChPacketAnalyzerGroupRuleAdd adds a Rule to a rule group Group (of rules) A Group comprised of a set of rules activated jointly cpssDxChPacketAnalyzerGroupCreate creates a Group of rules All i-Debug and Packet Analyzer operations, such as obtaining Stages and fields available for usage, are operated within a specific Packet Analyzer manager context defined by this manager’s ID. This ID is assigned upon PA manager creation and enabling, for latter usage as the first parameter in all Packet Analyzer API calls. Once the PA Manager is created and enabled, define at least one key to indicate the Stages and fields for the PA manager to sample. This definition is generic, and does not include actual field values, thus can be used in multiple rules. For each key, define its field assignment mode attribute as listed in the following table. Table 172: Field Assignment Modes – CPSS_DXCH_PACKET_ANALYZER_FIELD_ASSIGNMENT_MODE_ENT Enumerator Description Usage CPSS_DXCH_PACKET_ANALYZER_FIELD_ASSIGNMENT_MODE_ASSIGN_ALL_E All Stages must include all fields in the key; otherwise, the API returns an error Useful when tracking a set of packet attributes across all sampled Stages CPSS_DXCH_PACKET_ANALYZER_FIELD_ASSIGNMENT_MODE_ASSIGN_PARTIAL_E Each Stage may include a subset of the fields in the key Useful for looser sampling to provide basic comprehension of traffic flow throughout device pipeline Now, create an Action with the following attributes: Table 173: Action Attributes Attribute Description samplingEnable Indicates whether the attached rule is enabled samplingMode Indicates whether i-Debug should sample the first or last descriptor matching the rule matchCounterIntThresh Match counter interrupt threshold; if interruptMatchCounterEnable is true, an interrupt to the application is triggered upon reaching that threshold interruptSamplingEnable Indicates whether an interrupt to the application is triggered upon sampling. Useful for detecting sampling events to enable retrieving the sampled data. When using CLI, this is not required, since the user can directly view the sampling, as well as the sampling results interruptMatchCounterEnable Indicates whether an interrupt to the application is triggered upon the match counter equaling the value set in matchCounterIntThresh inverseEnable Indicates whether all rules are inversed, meaning sampling occurs whenever a descriptor does not match the values indicated by the rule samplingEnable Indicates whether the attached rule is enabled samplingMode Indicates whether i-Debug should sample the first or last descriptor matching the rule inverseEnable Indicates whether all rules are inversed, meaning sampling occurs whenever a descriptor does not match the values indicated by the rule The Packet Analyzer Manager uses groups of rules as an action unit. Once the Packet Analyzer is activated, it is possible to define several groups of rules, and activate either several groups jointly, or a single group at a time. A rule is an instantiation of a key with specific values and an action. Once a complete setup of keys, rules, and groups is in place, it is possible to activate a group, which in turn sets the i-Debug instances tied to the Stages listed in the keys, to the match information in the fields, and enables sampling. When traffic flows through the Prestera device, i-Debug samples the information based on this setup. To view the sampled data, begin with disabling i-Debug to avoid inconsistent information. Software Considerations – Configuration To configure the PA Manager: To create a PA Manager, call cpssDxChPacketAnalyzerManagerCreate, with the managerId parameter set (beginning with 1). To enable the PA Manager, call cpssDxChPacketAnalyzerManagerEnableSet, with the enable parameter set to GT_TRUE. Verify the XML file specifying the i-Debug configuration specific for the device is loaded under the appropriate location. See i-Debug XML Files for locations per platform. Set the device associated with the PA Manager, by calling with the CPSS device number, commonly 0. Should the XML configuration file be missing from the appropriate location, the API returns GT_FAIL. To create a Logical key, call cpssDxChPacketAnalyzerLogicalKeyCreate with: Key ID and name (keyAttrPtr is pointer to key name) A list of stages (CPSS_DXCH_PACKET_ANALYZER_LOOKUP_STAGES_ENT) and fields (CPSS_DXCH_PACKET_ANALYZER_FIELD_ENT) filtered by key NOTE: The key contains only the list of fields. The values determining the sampling/filtering is set by rules using that key - in each rule a list of respective field values. fieldModePtr key creation mode set to ALL / PARTIAL (see table Field Assignment Modes – CPSS_DXCH_PACKET_ANALYZER_FIELD_ASSIGNMENT_MODE_ENT) To create an action, call cpssDxChPacketAnalyzerActionCreate with: Action ID Action to perform samplingEnable set to GT_TRUE To apply the action to descriptors with field values other than those specified in the rule, set inverseEnable to GT_TRUE To create a group of rules, call cpssDxChPacketAnalyzerGroupCreate with its ID and name. To add a rule to a group, call cpssDxChPacketAnalyzerGroupRuleAdd with the following parameters setup: managerId – PA Manager ID keyId – Key ID containing list of fields for which the rule should specify the values, and list of stages in which to match/test these fields groupId – Group ID ruleId – The new rule ID ruleAttPtr – The new rule name numOfFields and fieldsValueArr – Respectively, number and list of specified field values matching the key fields actionId – An existing action ID to perform upon a found match To add keys, actions, rules, and groups, repeat steps 6. through 9.. To activate a group, call cpssDxChPacketAnalyzerGroupActivateEnableSet with the group ID and the enable parameter set to GT_TRUE. Run traffic. To disable a group, call cpssDxChPacketAnalyzerGroupActivateEnableSet with the group ID and the enable parameter set to GT_FALSE. To obtain the list of sampled stages, call cpssDxChPacketAnalyzerRuleMatchStagesGet. To display the sampled data – counters, field names, and field values, for a specific stage, call cpssDxChPacketAnalyzerStageMatchDataGet or cpssDxChPacketAnalyzerStageMatchDataAllFieldsGet. The first returns the values of fields included as input in the field list, and the latter - the values for all stage fields.能同时启用多个规则组吗
09-26
基于遗传算法的新的异构分布式系统任务调度算法研究(Matlab代码实现)内容概要:本文档围绕基于遗传算法的异构分布式系统任务调度算法展开研究,重点介绍了一种结合遗传算法的新颖优化方法,并通过Matlab代码实现验证其在复杂调度问题中的有效性。文中还涵盖了多种智能优化算法在生产调度、经济调度、车间调度、无人机路径规划、微电网优化等领域的应用案例,展示了从理论建模到仿真实现的完整流程。此外,文档系统梳理了智能优化、机器学习、路径规划、电力系统管理等多个科研方向的技术体系与实际应用场景,强调“借力”工具与创新思维在科研中的重要性。; 适合人群:具备一定Matlab编程基础,从事智能优化、自动化、电力系统、控制工程等相关领域研究的研究生及科研人员,尤其适合正在开展调度优化、路径规划或算法改进类课题的研究者; 使用场景及目标:①学习遗传算法及其他智能优化算法(如粒子群、蜣螂优化、NSGA等)在任务调度中的设计与实现;②掌握Matlab/Simulink在科研仿真中的综合应用;③获取多领域(如微电网、无人机、车间调度)的算法复现与创新思路; 阅读建议:建议按目录顺序系统浏览,重点关注算法原理与代码实现的对应关系,结合提供的网盘资源下载完整代码进行调试与复现,同时注重从已有案例中提炼可迁移的科研方法与创新路径。
【微电网】【创新点】基于非支配排序的蜣螂优化算法NSDBO求解微电网多目标优化调度研究(Matlab代码实现)内容概要:本文提出了一种基于非支配排序的蜣螂优化算法(NSDBO),用于求解微电网多目标优化调度问题。该方法结合非支配排序机制,提升了传统蜣螂优化算法在处理多目标问题时的收敛性和分布性,有效解决了微电网调度中经济成本、碳排放、能源利用率等多个相互冲突目标的优化难题。研究构建了包含风、光、储能等多种分布式能源的微电网模型,并通过Matlab代码实现算法仿真,验证了NSDBO在寻找帕累托最优解集方面的优越性能,相较于其他多目标优化算法表现出更强的搜索能力和稳定性。; 适合人群:具备一定电力系统或优化算法基础,从事新能源、微电网、智能优化等相关领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①应用于微电网能量管理系统的多目标优化调度设计;②作为新型智能优化算法的研究与改进基础,用于解决复杂的多目标工程优化问题;③帮助理解非支配排序机制在进化算法中的集成方法及其在实际系统中的仿真实现。; 阅读建议:建议读者结合Matlab代码深入理解算法实现细节,重点关注非支配排序、拥挤度计算和蜣螂行为模拟的结合方式,并可通过替换目标函数或系统参数进行扩展实验,以掌握算法的适应性与调参技巧。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值