aboutsummaryrefslogtreecommitdiffstats
path: root/addons/ooh323c
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-10 17:53:59 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-10 17:53:59 +0000
commit82a849a9d77a9a55460dd7a2f93c84473172218c (patch)
tree0d835c32ea87d35d7f433ddc3adec6ef2ae3f0af /addons/ooh323c
parentb7ec076367502fec756d6667c99e12ac6fad43d1 (diff)
add docallbacks flag in q931decode function because
when we decode received q931 packet we must do callbacks and when we print sended q931 packet we must not. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239037 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/ooh323c')
-rw-r--r--addons/ooh323c/src/oochannels.c2
-rw-r--r--addons/ooh323c/src/ooq931.c6
-rw-r--r--addons/ooh323c/src/ooq931.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 2988ff1b2..fd6cbb376 100644
--- a/addons/ooh323c/src/oochannels.c
+++ b/addons/ooh323c/src/oochannels.c
@@ -1114,7 +1114,7 @@ int ooH2250Receive(OOH323CallData *call)
initializePrintHandler(&printHandler, "Received H.2250 Message");
setEventHandler (pctxt, &printHandler);
- ret = ooQ931Decode (call, pmsg, len, message);
+ ret = ooQ931Decode (call, pmsg, len, message, 1);
if(ret != OO_OK) {
OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",
call->callType, call->callToken);
diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c
index e8bc41e76..1d5f7e7d7 100644
--- a/addons/ooh323c/src/ooq931.c
+++ b/addons/ooh323c/src/ooq931.c
@@ -47,7 +47,7 @@ static ASN1OBJID gProtocolID = {
};
EXTERN int ooQ931Decode
- (OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data)
+ (OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks)
{
int offset, x;
int rv = ASN_OK;
@@ -173,7 +173,7 @@ EXTERN int ooQ931Decode
OOTRACEDBGB1(" Keypad IE = {\n");
OOTRACEDBGB2(" %s\n", ie->data);
OOTRACEDBGB1(" }\n");
- if(gH323ep.h323Callbacks.onReceivedDTMF)
+ if(docallbacks && gH323ep.h323Callbacks.onReceivedDTMF)
{
gH323ep.h323Callbacks.onReceivedDTMF(call, (char *)ie->data);
}
@@ -626,7 +626,7 @@ static void ooQ931PrintMessage
setPERBuffer (pctxt, msgbuf, msglen, TRUE);
- ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf);
+ ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf, 0);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n",
diff --git a/addons/ooh323c/src/ooq931.h b/addons/ooh323c/src/ooq931.h
index c70771b41..88aef2ee9 100644
--- a/addons/ooh323c/src/ooq931.h
+++ b/addons/ooh323c/src/ooq931.h
@@ -335,7 +335,7 @@ typedef struct OOH225MsgCallbacks {
* @return Completion status - 0 on success, -1 on failure
*/
EXTERN int ooQ931Decode
-(struct OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data);
+(struct OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks);
/**
* This function is used to decode the UUIE of the message from the list of