· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Ver0-2-0/Res Parking

AsteriskVer0-2-0/res/res_parking.c


* int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, int allowredirect, int allowdisconnect)
  • if (chan->_state != AST_STATE_UP) {
    • if (ast_answer(chan)) return -1;
  • }
  • for (;;) {
    • res = ast_channel_bridge(chan, peer, (allowdisconnect ? AST_BRIDGE_DTMF_CHANNEL_0 : 0) + (allowredirect ? AST_BRIDGE_DTMF_CHANNEL_1 : 0), &f, &who);
    • if (res < 0) return -1;
    • 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;
    • }
    • if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_RINGING)) {
    • }
    • if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_OPTION)) {
    • }
    • if (f && (f->frametype == AST_FRAME_DTMF) && (who == chan) && allowdisconnect && (f->subclass == '*')) {
      • res = -1;
      • break;
    • }
    • if ((f->frametype == AST_FRAME_DTMF) && (who == peer) && allowredirect && (f->subclass == '#')) {
    • } else {
    • }
  • }
  • return res;

* channel.c
  • ast_channel_bridge
    • 입력된 내용이 AST_FRAME_CONTROL 이면, return 0
    • 입력된 내용은 fo 에, 누가에게서 입력된 것인가는 rc 에 assign
if ((f->frametype == AST_FRAME_CONTROL) && !(flags & AST_BRIDGE_IGNORE_SIGS)) {
                        *fo = f;
                        *rc = who;
                        res =  0;
                        break;
                }

ID
Password
Join
You are dishonest, but never to the point of hurting a friend.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-08-09 14:59:28
Processing time 0.0035 sec