Changeset 209
- Timestamp:
- 01/16/08 13:09:51
(8 months ago)
- Author:
- klaus
- Message:
- fixed bug in h324m_call: hangup of caller during call setup was not recognized
- added note about ALAW/ULAW problem
- src change detection now analyzes only video frames: fixed problem with false src change detection as audio and video may have different src
identifier
- more logging for debuggig (commented by default)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r206 |
r209 |
|
| 883 | 883 | |
|---|
| 884 | 884 | } else { |
|---|
| 885 | | /* Check src */ |
|---|
| 886 | | if (!src && f->src) { |
|---|
| 887 | | /* Store it */ |
|---|
| 888 | | src = strdup(f->src); |
|---|
| 889 | | } else if (src && !f->src) { |
|---|
| 890 | | /* Delete old one */ |
|---|
| 891 | | free(src); |
|---|
| 892 | | /* Store it */ |
|---|
| 893 | | src = NULL; |
|---|
| 894 | | /* Reset media */ |
|---|
| 895 | | H324MSessionResetMediaQueue(id); |
|---|
| 896 | | } else if (src && f->src && strcmp(src,f->src)!=0) { |
|---|
| 897 | | /* Delete old one */ |
|---|
| 898 | | free(src); |
|---|
| 899 | | /* Store it */ |
|---|
| 900 | | src = strdup(f->src); |
|---|
| 901 | | /* Reset media */ |
|---|
| 902 | | H324MSessionResetMediaQueue(id); |
|---|
| 903 | | } |
|---|
| 904 | | /* Media packet */ |
|---|
| 905 | | /* |
|---|
| | 885 | /* Check src: only use one type of AST_FRAME for src change detection |
|---|
| | 886 | * as video and voice may have different src (e.g. video-src="RTP" |
|---|
| | 887 | * and audio-src="lintoamr") |
|---|
| | 888 | */ |
|---|
| | 889 | if (f->frametype == AST_FRAME_VIDEO) |
|---|
| | 890 | { |
|---|
| | 891 | if (!src && f->src) { |
|---|
| | 892 | /* Store it */ |
|---|
| | 893 | src = strdup(f->src); |
|---|
| | 894 | } else if (src && !f->src) { |
|---|
| | 895 | /* Delete old one */ |
|---|
| | 896 | free(src); |
|---|
| | 897 | /* Store it */ |
|---|
| | 898 | src = NULL; |
|---|
| | 899 | /* Reset media */ |
|---|
| | 900 | H324MSessionResetMediaQueue(id); |
|---|
| | 901 | } else if (src && f->src && strcmp(src,f->src)!=0) { |
|---|
| | 902 | /* Delete old one */ |
|---|
| | 903 | free(src); |
|---|
| | 904 | /* Store it */ |
|---|
| | 905 | src = strdup(f->src); |
|---|
| | 906 | /* Reset media */ |
|---|
| | 907 | H324MSessionResetMediaQueue(id); |
|---|
| | 908 | } |
|---|
| | 909 | } |
|---|
| | 910 | /* Media packet */ |
|---|
| | 911 | /* |
|---|
| 906 | 912 | if (f->frametype == AST_FRAME_VOICE) |
|---|
| 907 | 913 | { |
|---|
| 908 | 914 | ast_log(LOG_DEBUG, "AST_FRAME_VOICE: subtype=%d; AST_FORMAT_AMRNB=%d\n",f->subclass,AST_FORMAT_AMRNB); |
|---|
| 909 | | ast_log(LOG_DEBUG, "AST_FRAME_VOICE: f->data=%p, f->datalen=%d\n",f->data,f->datalen); |
|---|
| | 915 | ast_log(LOG_DEBUG, "AST_FRAME_VOICE: f->data=%p, f->datalen=%d, f->src=%s\n",f->data,f->datalen,f->src); |
|---|
| | 916 | } |
|---|
| | 917 | if (f->frametype == AST_FRAME_VIDEO) |
|---|
| | 918 | { |
|---|
| | 919 | ast_log(LOG_DEBUG, "AST_FRAME_VIDEO: subtype=%d; AST_FORMAT_H263=%d, AST_FORMAT_H263_PLUS=%d\n",f->subclass,AST_FORMAT_H263,AST_FORMAT_H263_PLUS); |
|---|
| | 920 | ast_log(LOG_DEBUG, "AST_FRAME_VIDEO: f->data=%p, f->datalen=%d, f->src=%s\n",f->data,f->datalen,f->src); |
|---|
| 910 | 921 | } |
|---|
| 911 | 922 | */ |
|---|
| … | … | |
| 992 | 1003 | |
|---|
| 993 | 1004 | /* Request new channel */ |
|---|
| 994 | | pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW , data, &reason); |
|---|
| | 1005 | /* sometimes Asterisk uses internally a differnt LAW then chan_zap/zaptel and |
|---|
| | 1006 | * performs ALAW/ULAW conversion. Is is deadly as we transmit digital data inside |
|---|
| | 1007 | * LAW-frames (we have to do this as Asterisk does not support digital ISDN calls). |
|---|
| | 1008 | * |
|---|
| | 1009 | * If you have problems on outgoing 3G calls please specify exactly the LAW used |
|---|
| | 1010 | * by your ISDN line. Usually in Europe you have ALAW, in USA ULAW. |
|---|
| | 1011 | * |
|---|
| | 1012 | * Example for Austria(Europe): |
|---|
| | 1013 | * pseudo = ast_request("Local", AST_FORMAT_ALAW , data, &reason); |
|---|
| | 1014 | */ |
|---|
| | 1015 | pseudo = ast_request("Local", AST_FORMAT_ALAW | AST_FORMAT_ULAW, data, &reason); |
|---|
| 995 | 1016 | |
|---|
| 996 | 1017 | /* If somthing has gone wrong */ |
|---|
| … | … | |
| 1022 | 1043 | break; |
|---|
| 1023 | 1044 | /* Read frame */ |
|---|
| 1024 | | f = ast_read(pseudo); |
|---|
| | 1045 | f = ast_read(where); |
|---|
| 1025 | 1046 | /* If not frame */ |
|---|
| 1026 | 1047 | if (!f) |
|---|
Download in other formats:
|
|