[asterisk-commits] branch crichter/0.3.0 - r7500 in
/team/crichter/0.3.0/channels: ./ misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Dec 16 05:09:05 CST 2005
Author: crichter
Date: Fri Dec 16 05:09:02 2005
New Revision: 7500
URL: http://svn.digium.com/view/asterisk?rev=7500&view=rev
Log:
fixed:
* for a digital call no Codec IE in SETUP
* some wrong pointer check/use if statements (one pointer checked, another used)
Modified:
team/crichter/0.3.0/channels/chan_misdn.c
team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=7500&r1=7499&r2=7500&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Fri Dec 16 05:09:02 2005
@@ -1510,9 +1510,7 @@
struct chan_list *p;
- if (!ast || ! MISDN_ASTERISK_PVT(ast)) return -1;
- p = MISDN_ASTERISK_TECH_PVT(ast) ;
-
+ if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast)) ) return -1;
chan_misdn_log(1, p? (p->bc? p->bc->port : 0) : 0, "* ANSWER:\n");
@@ -1562,9 +1560,7 @@
{
struct chan_list *p;
- if (!ast || ! MISDN_ASTERISK_PVT(ast)) return -1;
- p = MISDN_ASTERISK_TECH_PVT(ast) ;
-
+ if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast))) return -1;
struct misdn_bchannel *bc=p->bc;
chan_misdn_log(1, bc?bc->port:0, "* IND : Digit %c\n",digit);
@@ -1622,8 +1618,7 @@
{
struct chan_list *p;
- if (!ast || ! MISDN_ASTERISK_PVT(ast)) return -1;
- p = MISDN_ASTERISK_TECH_PVT(ast) ;
+ if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast) )) return -1;
chan_misdn_log(1, p->bc?p->bc->port:0, "* IND: Got Fixup State:%s Holded:%d L3id:%x\n", misdn_get_ch_state(p), p->holded, p->l3id);
@@ -1640,11 +1635,10 @@
struct chan_list *p;
- if (!ast || ! MISDN_ASTERISK_PVT(ast)) {
+ if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast))) {
ast_log(LOG_WARNING, "Returnded -1 in misdn_indication\n");
return -1;
}
- p = MISDN_ASTERISK_TECH_PVT(ast) ;
if (!p->bc ) {
chan_misdn_log(1, 0, "* IND : Indication from %s\n",ast->exten);
Modified: team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c?rev=7500&r1=7499&r2=7500&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c Fri Dec 16 05:09:02 2005
@@ -219,7 +219,7 @@
// cb_log(2, bc->stack->port, " --> cap Else\n");
break;
}
-
+
switch(user) {
case 2:
bc->law=INFO_CODEC_ULAW;
@@ -281,31 +281,30 @@
{
int coding=0, capability, mode=0 /* 2 for packet ! */
,user, rate=0x10;
+
+ switch (bc->law) {
+ case INFO_CODEC_ULAW: user=2;
+ break;
+ case INFO_CODEC_ALAW: user=3;
+ break;
+ default:
+ user=3;
+ }
+
switch (bc->capability) {
case INFO_CAPABILITY_SPEECH: capability = 0;
-// cb_log(2, bc->stack->port, " --> Speech\n");
break;
case INFO_CAPABILITY_DIGITAL_UNRESTRICTED: capability = 8;
-// cb_log(2, bc->stack->port, " --> cap unres Digital\n");
+ user=-1;
break;
case INFO_CAPABILITY_DIGITAL_RESTRICTED: capability = 9;
-// cb_log(2, bc->stack->port, " --> cap res Digital\n");
+ user=-1;
break;
default:
-// cb_log(2, bc->stack->port, " --> cap Speech\n");
capability=bc->capability;
}
- switch (bc->law) {
- case INFO_CODEC_ULAW: user=2;
-// cb_log(2, bc->stack->port, " --> Codec Ulaw\n");
- break;
- case INFO_CODEC_ALAW: user=3;
-// cb_log(2, bc->stack->port, " --> Codec Alaw\n");
- break;
- default:
- user=3;
- }
+
enc_ie_bearer(&setup->BEARER, msg, coding, capability, mode, rate, -1, user, nt,bc);
}
More information about the asterisk-commits
mailing list