Changeset 160

Show
Ignore:
Timestamp:
09/11/07 17:49:30 (1 year ago)
Author:
klaus
Message:

- added documentation
- prepare to handle AST_FRAME_DIGITAL too

Files:

Legend:

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

    r152 r160  
    4141#ifndef AST_FORMAT_AMRNB 
    4242#define AST_FORMAT_AMRNB        (1 << 13) 
     43#endif 
     44#ifndef AST_FRAME_DIGITAL 
     45#define AST_FRAME_DIGITAL 13 
    4346#endif 
    4447 
     
    6871static char *name_h324m_gw = "h324m_gw"; 
    6972static char *syn_h324m_gw = "H324m gateway"; 
    70 static char *des_h324m_gw = "  h324m_gw():  Creates a pseudo channel for an incoming h324m call.\n"; 
     73static char *des_h324m_gw = "  h324m_gw(extension@context):  Creates a pseudo channel for an incoming h324m call.\n" 
     74        "This function decodes the received H.324M data (usually via a ISDN connection\n" 
     75        "and extracts the video and voice frames into Asterisk's internal frame format\n" 
     76        "and vice versa.\n" 
     77        "A pseudo channel will be created to continue dialplan execution at another\n" 
     78        "extension/context.\n" 
     79        "\n" 
     80        "Examples:\n" 
     81        " [frompstn]\n" 
     82        " exten => 111,1,h324m_gw(britney@3gp_videos)\n" 
     83        " exten => 112,1,h324m_gw(justin@3gp_videos)\n" 
     84        " [3gp_videos]\n" 
     85        " exten => britney,1,h324m_gw_answer()\n" 
     86        " exten => britney,2,mp4_play(/var/videos/britney.3gp)\n" 
     87        " exten => justin,1,h324m_gw_answer()\n" 
     88        " exten => justin,2,mp4_play(/var/videos/justin.3gp)\n"; 
    7189 
    7290static char *name_h324m_call = "h324m_call"; 
    7391static char *syn_h324m_call = "H324m call"; 
    74 static char *des_h324m_call = "  h324m_call():  Creates a pseudo channel for an outgoing h324m call.\n"; 
     92static char *des_h324m_call = "  h324m_call(extension@context):  Creates a pseudo channel for an outgoing h324m call.\n" 
     93        "This function encodes the video and voice frames from Asterisk's internal\n" 
     94        " frame format into H.324M data and vice versa.\n" 
     95        "A pseudo channel will be created to continue dialplan execution at another\n" 
     96        "extension/context.\n" 
     97        "\n" 
     98        "Examples:\n" 
     99        " [fromsip]\n" 
     100        " ;prefix 0 means PSTN with normal audio call\n" 
     101        " ;prefix 1 means PSTN with 3G video calls\n" 
     102        " exten => _0X.,1,Dial(Zap/${EXTEN:1}\n" 
     103        " exten => _1X.,1,h324m_call(0${EXTEN:1}@fromsip)\n"; 
    75104 
    76105static char *name_h324m_gw_answer = "h324m_gw_answer"; 
    77106static char *syn_h324m_gw_answer = "H324m Answer incoming call"; 
    78 static char *des_h324m_gw_answer = "  h324m_gw_answer():  Answer and incomming call from h324m_gw and waits for 3G negotiation.\n"; 
     107static char *des_h324m_gw_answer = "  h324m_gw_answer():  Answer an incomming call from h324m_gw and waits for 3G negotiation.\n"; 
    79108 
    80109static char *name_video_loopback = "video_loopback"; 
     
    581610        vt.first = 1; 
    582611 
    583         ast_log(LOG_DEBUG, "h324m_loopback\n"); 
     612        ast_log(LOG_DEBUG, "h324m_gw\n"); 
    584613 
    585614        /* Lock module */ 
     
    674703                { 
    675704                        /* Check frame type */ 
    676                         if (f->frametype == AST_FRAME_VOICE)  
     705                        if ((f->frametype == AST_FRAME_DIGITAL) || (f->frametype == AST_FRAME_VOICE))  
    677706                        { 
    678707                                /* read data */ 
     
    834863        /* Request new channel */ 
    835864        pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW, data, &reason); 
     865/*      pseudo = ast_request("Local", AST_FORMAT_DIGITAL, data, &reason);*/ 
    836866  
    837867        /* If somthing has gone wrong */ 
Copyright 2006 - Sergio García Murillo
Powered by Trac - Edgewall Software