· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Source/Res Features

AsteriskSource/res/res_features.c

* ast_bridge_call referenced by
  • Dial
  • Followme
  • Queue

* bridge_call in version 0.1.0

* int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast_bridge_config *config)
  • Copy voice back and forth between the two channels. Give the peer the ability to transfer calls with '#
  • struct ast_cdr *chan_cdr = pick_unlocked_cdr(chan->cdr);
  • struct ast_cdr *peer_cdr = pick_unlocked_cdr(peer->cdr);
  • config->start_time = ast_tvnow();
  • pbx_builtin_setvar_helper
    • chan, "BRIDGEPEER", peer->name
    • peer, "BRIDGEPEER", chan->name
    • chan, "BLINDTRANSFER", NULL
  • add_features_datastores(chan, peer, config);
  • if (monitor_ok) {
  • }
  • config->firstpass = 1;
  • if (ast_answer(chan)) return -1;
  • if (!chan_cdr || (chan_cdr && !ast_test_flag(chan_cdr, AST_CDR_FLAG_POST_DISABLED))) {
  • }
  • for (;;) {
    • res = ast_channel_bridge(chan, peer, config, &f, &who);
    • if (config->feature_timer && (!f || f->frametype == AST_FRAME_DTMF_END)) {
    • }
    • if (res < 0) {
      • goto before_you_go;
    • }
    • if (!f || (f->frametype == AST_FRAME_CONTROL && (f->subclass == AST_CONTROL_HANGUP || f->subclass == AST_CONTROL_BUSY || f->subclass == AST_CONTROL_CONGESTION ) ) ) {
      • res = -1;
      • break;
    • }
    • other = (who == chan) ? peer : chan;
    • if (f->frametype == AST_FRAME_CONTROL) {
    • } else if (f->frametype == AST_FRAME_DTMF_BEGIN) {
    • } else if (f->frametype == AST_FRAME_DTMF) {
    • }
    • if (f) ast_frfree(f);
  • }
  • before_you_go:
  • if (ast_test_flag(chan,AST_FLAG_BRIDGE_HANGUP_DONT)) {
    • return res;
  • }
  • if (config->end_bridge_callback) {
    • Dial °ú followme ¿¡¼­ »ç¿ëÇÏ´Â °Í °°À½.
  • }
  • if (!ast_test_flag( (config->features_caller), AST_FEATURE_NO_H_EXTEN) && ast_exists_extension(chan, chan->context, "h", 1, chan->cid.cid_num)) {
  • }
  • new_chan_cdr = pick_unlocked_cdr(chan->cdr);
  • if (bridge_cdr && new_chan_cdr && ast_test_flag(new_chan_cdr, AST_CDR_FLAG_POST_DISABLED)) {
  • }
  • if (bridge_cdr) {
  • }
  • if (new_chan_cdr) {
  • }
  • {
  • }
  • return res;

AST_FLAG_BRIDGE_HANGUP_DONT
This flag indicates that the hangup exten should NOT be run when the bridge terminates, this will allow the hangup in the pbx loop to be run instead.

* static void add_features_datastores(struct ast_channel *caller, struct ast_channel *callee, struct ast_bridge_config *config)
  • ds_caller_features = ast_channel_datastore_find(caller, &dial_features_info, NULL);
  • if (!ds_caller_features) {
  • } else {
    • return;
  • }
  • ds_callee_features = ast_channel_datastore_find(callee, &dial_features_info, NULL);
  • if (!ds_callee_features) {
  • }
  • return;

ID
Password
Join
Beauty and harmony are as necessary to you as the very breath of life.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-10-30 09:01:05
Processing time 0.0057 sec