aboutsummaryrefslogtreecommitdiffstats
path: root/addons/ooh323c/src/ooh323.c
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-16 22:58:22 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-16 22:58:22 +0000
commit45c06aa91d989bca383c39909b1a5ae544ed29aa (patch)
tree3d454ede37ba5b4bae6b5f96bb7eca8d09522f31 /addons/ooh323c/src/ooh323.c
parente0188cab26f049c28e3e1b7eb87fa033d8ff42e2 (diff)
generate connected line info update from info in h.323 packets
Tested by: benngard git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247035 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/ooh323c/src/ooh323.c')
-rw-r--r--addons/ooh323c/src/ooh323.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/addons/ooh323c/src/ooh323.c b/addons/ooh323c/src/ooh323.c
index 6cd3d8812..02c925b84 100644
--- a/addons/ooh323c/src/ooh323.c
+++ b/addons/ooh323c/src/ooh323.c
@@ -38,6 +38,23 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg);
+int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg);
+
+int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
+ Q931InformationElement* pDisplayIE;
+
+ /* check for display ie */
+ pDisplayIE = ooQ931GetIE(q931Msg, Q931DisplayIE);
+ if(pDisplayIE) {
+ if (call->remoteDisplayName)
+ memFreePtr(call->pctxt, call->remoteDisplayName);
+ call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
+ pDisplayIE->length*sizeof(ASN1OCTET)+1);
+ strncpy(call->remoteDisplayName, (char *)pDisplayIE->data, pDisplayIE->length*sizeof(ASN1OCTET));
+ }
+
+ return OO_OK;
+}
int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
@@ -796,6 +813,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
+ ooHandleDisplayIE(call, q931Msg);
if(!q931Msg->userInfo)
{
@@ -1019,6 +1037,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
+ ooHandleDisplayIE(call, q931Msg);
if(!q931Msg->userInfo)
{
@@ -1242,6 +1261,8 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
ooLogicalChannel * pChannel = NULL;
H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ ooHandleDisplayIE(call, q931Msg);
+
if(!q931Msg->userInfo)
{
OOTRACEERR3("Error: UUIE not found in received H.225 Connect message"