Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Bridge Messages

Status
Not open for further replies.

Moebius01

Programmer
Oct 27, 2000
309
US
We are trying to work on an application that connects to the App bridge and sends messages to it using visual basic. The connection and receiving data works fine after you strip off the first 4 digits received (Length Field) but you cannot send messages without this header. The book defines this field with the following:

"For Ethernet connections, the Length field is the first field in the message. This field contains the total message length, exlusive of the initial 4 bytes. Unlike the other message fields, this field is binary; it is not encoded in ASCII."

During training at Aspect the trainer gave me a Contact Server Simulation program that is written in Visual Basic and can attach to the App Bridge to send and receive messages, so VB can do this. Does anyone know how or have some sample code in VB, C, C++, Java, or any other language.
 
Hi,
perhaps too late, but found your post very interesting. Just thinking about somthing like length=50 -> 50=110010 ? I'm interested in your solution ;-) Sorry, no sample code. But digging in old VB-Code running on a client with OCX using the prospect cti-server and telecall dialer... I'm interested in talking to App.-bridge directly using C or VB.
greetings,
Chris

ckadr1@gmx.net
 
Actually, it turned out to be something rather weird for the good ole' Aspect. Of course, we figure it out now that the App Bridge is becoming end of life.

I don't have the code handy, but basically you pad two 0s then the length of the message /256 as a number and the length of the message/256*256 as a number and it works like magic.

 
Sounds magic ;-)
And you're right, App Bridge is going to be outdated, Portal server is beeing pushed...
Times are changing. I like the old CC Rel.6 and the Nortel C-series. These are rock solid, but big iron and too expensive to sell. During the next years, switches will become nothing more than switches of PCM-streams and some signaling, until VoIP will take over in a decade... but life goes on ;-)




 
I'd tend to agree on missing good ole Rel 6. I rather liked that switch. I've already started converting my App Bridge apps to Contact Server, which while having some shortcomings, is not as bad as I feared.

And whadaya mean VoIP in a decade? We're already using it in a couple of production scenarios now. Granted, it's not mainstream yet, but I'd wager you'll see it within a couple of years. We've been asked to help Aspect develop their IP Contact Suite as we tend to push their products to the envelope and beyond.
 
well I thought I would go ahead and post the code for making it work. basically you just append
Chr(0) & Chr(0) & Chr(0) & Chr(Len(message)
to the beginning of you string where message is the variable your string is stored
 
I thought I would reply from the experience I've gained from coding a translator for the App Bridge for Rel 6. In C/C++ anyway:

#include <netinet/in.h>

//convert received msg length to normal integer
msglen = ntohl(*ipointer);

for recieving from the app bridge

//convert msg length to network-order integer
//for network transmission
code = htonl(msglen);

for sending. If you look up the man entries under linux you will find as the title for these functions.

/*snip*/
htonl, htons, ntohl, ntohs - convert values between host
and network byte order
/*snip*/

and later on in the man pages....

/*snip*/
On the i80x86 the host byte order is Least Significant
Byte first, whereas the network byte order, as used on the
Internet, is Most Significant Byte first.
/*snip*/

Anyway; that frustrated me for a little while until I found it out....having constrained my programming to non-network oriented software.

 
Does anyone have sample code of using VB to talk to the Aspect system using the app bridge. Or, better yet, know of an OCX that has some canned functions?
 
The following will send a message via an established winsock connection. As long as the message has the proper data for whatever type of message it is (the App Bridge Help Doc lists all of them), it should work.


***********************************************************

Private Sub cmdSend_Click()

Send_AB_Msg True, txtSendRaw.Text

End Sub

Public Sub Send_AB_Msg(logit As Boolean, ParamArray varargs() As Variant)
Dim i As Integer
Dim strData As String
Dim lngMsgLen As Long
Dim msgLen As String

If TCP.State = sckConnected Then
strData = txtCTIServer & &quot;,&quot;
For i = LBound(varargs) To UBound(varargs)
strData = strData & varargs(i) & &quot;,&quot;
Next i
strData = Left$(strData, Len(strData) - 1) ' strip extra &quot;,&quot;
lngMsgLen = Len(strData)
msgLen = Chr(0) & Chr(0) & Chr(CInt(lngMsgLen / 256)) & Chr(lngMsgLen - (CInt(lngMsgLen / 256) * 256))

TCP.SendData msgLen
'If logit And (chkShowSendLength.Value > 0) Then
'Log &quot;SENDING Length: &quot; & lngMsgLen
'End If
' frmMain.TCP.SendData msgLen & strData
frmMain.TCP.SendData strData
If logit Then Log &quot;SENDING AB Message: &quot; & strData
End If
End Sub

************************************************************
 
On a side note, if you move to Contact Server, there is a built in control to handle all of the messages, and makes CTI programming quite easy.
 
Moebius01 - do you happen to have the App Bridge Help Doc in electronic form? If so, could you send it to: bardocz@savance.com? Also, I have found a nice document on migrating from the AB to Contact Server but do not have a good help document on just the Contact Server. We have a software product called EIOBoard ( that a customer wants to integrate with their Aspect call center. Our plan is to have a middle-tier application that pulls queue information and caller status. In addition, we want to have some real-time commands and status information that we'll add to our product such as Call, Release, On a call, etc. Any pointers would be appreciated! Thank you so much for all of your help.
 
Unfortunately, I don't have the help docs any more, but either the client, or Aspect should be able to get those to you.

If you're looking to work with Contact Server (they're phasing out app bridge in another year), I'd recommend trying to get the SDK from Aspect. It includes a good doc, and the ocx control, plus some sample apps. Not sure how much it costs, or if they'll offer it, but I'd definately give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top