Changeset 206

Show
Ignore:
Timestamp:
01/05/08 02:04:04 (8 months ago)
Author:
sip
Message:

h324m_call answer channel after negotiation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • app_h324m/app_h324m.c

    r203 r206  
    964964        char*  input; 
    965965        int    reason = 0; 
     966        int    state = 0; 
    966967        int    ms; 
    967968        struct ast_channel *channels[2]; 
     
    991992 
    992993        /* Request new channel */ 
    993         pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW, data, &reason); 
     994        pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW , data, &reason); 
    994995  
    995996        /* If somthing has gone wrong */ 
     
    10841085        /* Init session */ 
    10851086        H324MSessionInit(id); 
    1086  
    1087         /* Answer call */ 
    1088         ast_answer(chan); 
    1089  
    10901087        /* Create enpty packet */ 
    10911088        send = (struct ast_frame *) malloc(sizeof(struct ast_frame) + AST_FRIENDLY_OFFSET + 160 ); 
     
    11251122                                /* read data */ 
    11261123                                H324MSessionRead(id, (unsigned char *)f->data, f->datalen); 
     1124 
     1125                                /* If state changed */ 
     1126                                if (state!=H324MSessionGetState(id)) 
     1127                                { 
     1128                                        /* Update state */ 
     1129                                        state = H324MSessionGetState(id); 
     1130 
     1131                                        /* Log */ 
     1132                                        ast_log(LOG_DEBUG, "H324M changed state %d\n", state); 
     1133                                         
     1134                                        /* If connected */       
     1135                                        if (state==CALLSTATE_STABLISHED) 
     1136                                        { 
     1137                                                /* Answer call if not done yet */ 
     1138                                                ast_answer(chan); 
     1139                                                /* Log */ 
     1140                                                ast_log(LOG_DEBUG, "Connected, sending VIDUPDATE\n"); 
     1141                                                /* Indicate Video Update */ 
     1142                                                ast_indicate(pseudo, AST_CONTROL_VIDUPDATE); 
     1143                                        } 
     1144                                } 
    11271145                                /* Get frames */ 
    11281146                                while ((frame=H324MSessionGetFrame(id))!=NULL) 
  • app_transcoder/app_transcoder.c

    r192 r206  
    937937                /* goto end */ 
    938938                goto clean_pseudo;  
     939 
     940        /* Answer channel */ 
     941        ast_answer(chan); 
    939942 
    940943        /* Set up array */ 
Copyright 2006 - Sergio García Murillo
Powered by Trac - Edgewall Software