--- asterisk-1.4.17/configs/sip.conf.sample 2007-11-27 08:34:19.000000000 +0100 +++ asterisk-1.4.17-h324m/configs/sip.conf.sample 2008-01-17 15:07:07.000000000 +0100 @@ -123,6 +123,11 @@ ;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s) ; Videosupport and maxcallbitrate is settable ; for peers and users as well +;maxcallbitrate_h263p=80 ; Maximum bitrate for video calls. 0 means 'no maximum' + ; thus no header is added to SDP. (default 0 kb/s) + ; This is only a global setting. This option uses the obsolete + ; MaxBR parameter. Successful tested with eyebeam. + ; 80 kbit is fine for SIP<-->H324M calls ;callevents=no ; generate manager events when sip ua ; performs events (e.g. hold) ;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected, --- asterisk-1.4.17/channels/chan_sip.c 2008-01-02 21:24:09.000000000 +0100 +++ asterisk-1.4.17-h324m/channels/chan_sip.c 2008-01-17 15:18:51.000000000 +0100 @@ -510,6 +510,7 @@ #define DEFAULT_QUALIFY FALSE #define DEFAULT_T1MIN 100 /*!< 100 MS for minimal roundtrip time */ #define DEFAULT_MAX_CALL_BITRATE (384) /*!< Max bitrate for video */ +#define DEFAULT_MAX_CALL_BITRATE_H263P (0) /*!< Max bitrate for video for h263p codec */ #ifndef DEFAULT_USERAGENT #define DEFAULT_USERAGENT "Asterisk PBX" /*!< Default Useragent: header unless re-defined in sip.conf */ #endif @@ -528,7 +529,8 @@ static char default_mohinterpret[MAX_MUSICCLASS]; /*!< Global setting for moh class to use when put on hold */ static char default_mohsuggest[MAX_MUSICCLASS]; /*!< Global setting for moh class to suggest when putting * a bridged channel on hold */ -static int default_maxcallbitrate; /*!< Maximum bitrate for call */ +static int default_maxcallbitrate; /*!< Maximum bitrate for call */ +static int default_maxcallbitrate_h263p; /*!< Maximum bitrate for call for h263p codec */ static struct ast_codec_pref default_prefs; /*!< Default codec prefs */ /* Global settings only apply to the channel */ @@ -960,6 +962,7 @@ int jointnoncodeccapability; /*!< Joint Non codec capability */ int redircodecs; /*!< Redirect codecs */ int maxcallbitrate; /*!< Maximum Call Bitrate for Video Calls */ + int maxcallbitrate_h263p; /*!< Maximum Call Bitrate for Video Calls with h263p codec*/ struct t38properties t38; /*!< T38 settings */ struct sockaddr_in udptlredirip; /*!< Where our T.38 UDPTL should be going if not to us */ struct ast_udptl *udptl; /*!< T.38 UDPTL session */ @@ -4463,6 +4466,7 @@ if (p->udptl) ast_udptl_settos(p->udptl, global_tos_audio); p->maxcallbitrate = default_maxcallbitrate; + p->maxcallbitrate_h263p = default_maxcallbitrate_h263p; } if (useglobal_nat && sin) { @@ -6180,6 +6184,10 @@ } else if (codec == AST_FORMAT_ILBC) { /* Add information about us using only 20/30 ms packetization */ ast_build_string(a_buf, a_size, "a=fmtp:%d mode=%d\r\n", rtp_code, fmt.cur_ms); + } else if (codec == AST_FORMAT_H263_PLUS) { + /* Add eyebeam style maxbandwidth description */ + if (p->maxcallbitrate_h263p) + ast_build_string(a_buf, a_size, "a=fmtp:%d QCIF=1 MaxBR=%d0\r\n", rtp_code,p->maxcallbitrate_h263p); } if (fmt.cur_ms && (fmt.cur_ms < *min_packet_size)) @@ -10634,6 +10642,7 @@ ast_cli(fd, " Notify hold state: %s\n", global_notifyhold ? "Yes" : "No"); ast_cli(fd, " SIP Transfer mode: %s\n", transfermode2str(global_allowtransfer)); ast_cli(fd, " Max Call Bitrate: %d kbps\r\n", default_maxcallbitrate); + ast_cli(fd, " Max Call Bitrate h263p: %d kbps\r\n", default_maxcallbitrate_h263p); ast_cli(fd, " Auto-Framing: %s \r\n", global_autoframing ? "Yes" : "No"); ast_cli(fd, "\nDefault Settings:\n"); ast_cli(fd, "-----------------\n"); @@ -16799,6 +16808,7 @@ default_fromdomain[0] = '\0'; default_qualify = DEFAULT_QUALIFY; default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE; + default_maxcallbitrate_h263p = DEFAULT_MAX_CALL_BITRATE_H263P; ast_copy_string(default_mohinterpret, DEFAULT_MOHINTERPRET, sizeof(default_mohinterpret)); ast_copy_string(default_mohsuggest, DEFAULT_MOHSUGGEST, sizeof(default_mohsuggest)); ast_copy_string(default_vmexten, DEFAULT_VMEXTEN, sizeof(default_vmexten)); @@ -17059,6 +17069,10 @@ default_maxcallbitrate = atoi(v->value); if (default_maxcallbitrate < 0) default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE; + } else if (!strcasecmp(v->name, "maxcallbitrate_h263p")) { + default_maxcallbitrate_h263p = atoi(v->value); + if (default_maxcallbitrate_h263p < 0) + default_maxcallbitrate_h263p = DEFAULT_MAX_CALL_BITRATE_H263P; } else if (!strcasecmp(v->name, "matchexterniplocally")) { global_matchexterniplocally = ast_true(v->value); }