Changeset 160
- 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
| r152 |
r160 |
|
| 41 | 41 | #ifndef AST_FORMAT_AMRNB |
|---|
| 42 | 42 | #define AST_FORMAT_AMRNB (1 << 13) |
|---|
| | 43 | #endif |
|---|
| | 44 | #ifndef AST_FRAME_DIGITAL |
|---|
| | 45 | #define AST_FRAME_DIGITAL 13 |
|---|
| 43 | 46 | #endif |
|---|
| 44 | 47 | |
|---|
| … | … | |
| 68 | 71 | static char *name_h324m_gw = "h324m_gw"; |
|---|
| 69 | 72 | static char *syn_h324m_gw = "H324m gateway"; |
|---|
| 70 | | static char *des_h324m_gw = " h324m_gw(): Creates a pseudo channel for an incoming h324m call.\n"; |
|---|
| | 73 | static 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"; |
|---|
| 71 | 89 | |
|---|
| 72 | 90 | static char *name_h324m_call = "h324m_call"; |
|---|
| 73 | 91 | static char *syn_h324m_call = "H324m call"; |
|---|
| 74 | | static char *des_h324m_call = " h324m_call(): Creates a pseudo channel for an outgoing h324m call.\n"; |
|---|
| | 92 | static 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"; |
|---|
| 75 | 104 | |
|---|
| 76 | 105 | static char *name_h324m_gw_answer = "h324m_gw_answer"; |
|---|
| 77 | 106 | static 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"; |
|---|
| | 107 | static char *des_h324m_gw_answer = " h324m_gw_answer(): Answer an incomming call from h324m_gw and waits for 3G negotiation.\n"; |
|---|
| 79 | 108 | |
|---|
| 80 | 109 | static char *name_video_loopback = "video_loopback"; |
|---|
| … | … | |
| 581 | 610 | vt.first = 1; |
|---|
| 582 | 611 | |
|---|
| 583 | | ast_log(LOG_DEBUG, "h324m_loopback\n"); |
|---|
| | 612 | ast_log(LOG_DEBUG, "h324m_gw\n"); |
|---|
| 584 | 613 | |
|---|
| 585 | 614 | /* Lock module */ |
|---|
| … | … | |
| 674 | 703 | { |
|---|
| 675 | 704 | /* Check frame type */ |
|---|
| 676 | | if (f->frametype == AST_FRAME_VOICE) |
|---|
| | 705 | if ((f->frametype == AST_FRAME_DIGITAL) || (f->frametype == AST_FRAME_VOICE)) |
|---|
| 677 | 706 | { |
|---|
| 678 | 707 | /* read data */ |
|---|
| … | … | |
| 834 | 863 | /* Request new channel */ |
|---|
| 835 | 864 | pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW, data, &reason); |
|---|
| | 865 | /* pseudo = ast_request("Local", AST_FORMAT_DIGITAL, data, &reason);*/ |
|---|
| 836 | 866 | |
|---|
| 837 | 867 | /* If somthing has gone wrong */ |
|---|
Download in other formats:
|
|