--- asterisk/trunk/apps/app_queue.c 2010-01-27 18:37:33.000000000 -0200 +++ asterisk/trunk/apps/app_queue_pacth.c 2010-02-08 13:36:54.000000000 -0200 @@ -973,6 +973,8 @@ int rrpos; /*!< Round Robin - position */ int memberdelay; /*!< Seconds to delay connecting member to caller */ int autofill; /*!< Ignore the head call status and ring an available agent */ + // NOTE by Hozo : Variable to read aftercallautopause from config + int aftercallautopause; /*!< Auto pause queue member after a call is completed */ struct ao2_container *members; /*!< Head of the list of members */ /*! @@ -1772,6 +1774,9 @@ q->montype = 1; } else if (!strcasecmp(param, "autopause")) { q->autopause = ast_true(val); + // NOTE By Hozo : Set aftercallautopase value from config + } else if (!strcasecmp(param, "aftercallautopause")) { + q->aftercallautopause = ast_true(val); } else if (!strcasecmp(param, "maxlen")) { q->maxlen = atoi(val); if (q->maxlen < 0) @@ -4727,6 +4732,14 @@ update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart)); } + // NOTE By Hozo : Activate aftercallautopause + if (qe->parent->aftercallautopause) + if (!set_member_paused( (char *) NULL, interface, "AfterCallAutoPause", 1)) { + ast_verb(3, "AfterCallAutoPausing Queue Member %s in ALL queues.\n", interface); + } else { + ast_verb(3, "Failed to AfterCallAutoPause Queue Member %s in ALL queues!\n", interface); + } + if (transfer_ds) { ast_datastore_free(transfer_ds); }