· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Source/Main Cdr

AsteriskSource/MainCdr


* struct ast_cdr *ast_cdr_alloc(void)
  • ast_cdr_dup main/cdr.c
    • newcdr = ast_cdr_alloc();
  • ast_channel_alloc main/channel.c
    • tmp->cdr = ast_cdr_alloc();
    • ast_cdr_init(tmp->cdr, tmp);
    • ast_cdr_start(tmp->cdr);
  • __ast_request_and_dial main/channel.c
    • if (!chan->cdr && (chan->cdr = ast_cdr_alloc()))
      • ast_cdr_init(chan->cdr, chan);
    • if (chan->cdr) {
      • char tmp256;
      • snprintf(tmp, sizeof(tmp), "%s/%s", type, (char *)data);
      • ast_cdr_setapp(chan->cdr,"Dial",tmp);
      • ast_cdr_update(chan);
      • ast_cdr_start(chan->cdr);
      • ast_cdr_end(chan->cdr);
      • if (ast_cdr_disposition(chan->cdr,chan->hangupcause))
        • ast_cdr_failed(chan->cdr);
    • }
  • clear_caller apps/app_followme.c
    • if (!outbound->cdr) {
      • outbound->cdr = ast_cdr_alloc();
      • if (outbound->cdr)
        • ast_cdr_init(outbound->cdr, outbound);
    • }
    • if (outbound->cdr) {
      • char tmp256
      • snprintf(tmp, sizeof(tmp), "%s/%s", "Local", tmpuser->dialarg);
      • ast_cdr_setapp(outbound->cdr, "FollowMe", tmp);
      • ast_cdr_update(outbound);
      • ast_cdr_start(outbound->cdr);
      • ast_cdr_end(outbound->cdr);
      • if (ast_cdr_disposition(outbound->cdr, outbound->hangupcause))
        • ast_cdr_failed(outbound->cdr);
    • } else
  • findmeexec apps/app_followme.c
    • if (!outbound->cdr)
      • outbound->cdr = ast_cdr_alloc();
    • if (outbound->cdr) {
      • char tmp256;
      • ast_cdr_init(outbound->cdr, outbound);
      • snprintf(tmp, sizeof(tmp), "%s/%s", "Local", dialarg);
      • ast_cdr_setapp(outbound->cdr, "FollowMe", tmp);
      • ast_cdr_update(outbound);
      • ast_cdr_start(outbound->cdr);
      • ast_cdr_end(outbound->cdr);
      • if (ast_cdr_disposition(outbound->cdr,outbound->hangupcause))
        • ast_cdr_failed(outbound->cdr);
    • } else {
  • __agent_start_monitoring channels/chan_agent.c
    • if (!ast->cdr)
      • ast->cdr = ast_cdr_alloc();
    • ast_cdr_setuserfield(ast, tmp2);

* cdr structure 에 next 가 있는 이유를 모르겠음.

function

* struct ast_cdr *ast_cdr_alloc(void)
  • struct ast_cdr *x = ast_calloc(1, sizeof(struct ast_cdr));

* int ast_cdr_init(struct ast_cdr *cdr, struct ast_channel *c)
  • for ( ; cdr ; cdr = cdr->next) {
    • cdr->channel, set_one_cid(cdr, c);, cdr->disposition
    • cdr->amaflags, cdr->accountcode, cdr->dst
    • cdr->dcontext, cdr->uniqueid
  • }

* void ast_cdr_start(struct ast_cdr *cdr)
  • for (; cdr; cdr = cdr->next) {
    • check_post(cdr);
    • cdr->start = ast_tvnow();
  • }

* include/asterisk/time.h
AST_INLINE_API(
struct timeval ast_tvnow(void),
{
        struct timeval t;
        gettimeofday(&t, NULL);
        return t;
}
)

ID
Password
Join
Might as well be frank, monsieur. It would take a miracle to get you out of Casablanca.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-10-11 09:41:36
Processing time 0.0095 sec