Changeset 206
- 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
| r203 |
r206 |
|
| 964 | 964 | char* input; |
|---|
| 965 | 965 | int reason = 0; |
|---|
| | 966 | int state = 0; |
|---|
| 966 | 967 | int ms; |
|---|
| 967 | 968 | struct ast_channel *channels[2]; |
|---|
| … | … | |
| 991 | 992 | |
|---|
| 992 | 993 | /* 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); |
|---|
| 994 | 995 | |
|---|
| 995 | 996 | /* If somthing has gone wrong */ |
|---|
| … | … | |
| 1084 | 1085 | /* Init session */ |
|---|
| 1085 | 1086 | H324MSessionInit(id); |
|---|
| 1086 | | |
|---|
| 1087 | | /* Answer call */ |
|---|
| 1088 | | ast_answer(chan); |
|---|
| 1089 | | |
|---|
| 1090 | 1087 | /* Create enpty packet */ |
|---|
| 1091 | 1088 | send = (struct ast_frame *) malloc(sizeof(struct ast_frame) + AST_FRIENDLY_OFFSET + 160 ); |
|---|
| … | … | |
| 1125 | 1122 | /* read data */ |
|---|
| 1126 | 1123 | 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 | } |
|---|
| 1127 | 1145 | /* Get frames */ |
|---|
| 1128 | 1146 | while ((frame=H324MSessionGetFrame(id))!=NULL) |
|---|
| r192 |
r206 |
|
| 937 | 937 | /* goto end */ |
|---|
| 938 | 938 | goto clean_pseudo; |
|---|
| | 939 | |
|---|
| | 940 | /* Answer channel */ |
|---|
| | 941 | ast_answer(chan); |
|---|
| 939 | 942 | |
|---|
| 940 | 943 | /* Set up array */ |
|---|
Download in other formats:
|
|