Ethereal-users: [Ethereal-users] Mimicking the Cisco Call Manager.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jonathan Anand Fernandes <jonathan@xxxxxxxxxxxxxxx>
Date: Sun, 11 Feb 2001 02:37:14 +0800 (GMT-8)
Hi all -

The big picture :
	I have been working with the Cisco IP phones 7960 for the last couple
of weeks. The IP phones require a Call Manager in order to make any calls.
I want to replace the Cisco Manager with my own Call Manager, but I want
to achieve the most basic of operations - so nothing fancy here. 

What I have done:
	I used Ethereal to figure out what packets are being sent between
the Call Manager and the IP phones.( For example, when I pick up the
reciever of the IP phone, the IP phone sends a TCP packet to the Call
Manager,and the Call Manager sends a TCP packet back, which triggers off
the dial tone on the IP phone). I did some socket programming, so that I
have a TCP server that I hope will model the Call Manager. The idea is
that this server will recieve whatever data has been sent by the IP phone,
but will send the data that will trigger off the dial tone on the IP
phone. (I got this data previously from a *real* Call Manager to IP phone
capture, using Ethereal).

Here is a sample of the capture obtained from Ethereal -

Transmission Control Protocol, Src Port: 2000 (2000), Dst Port: 52332
(52332), Seq: 1125651928, Ack: 1788356169
Data (48 bytes)

   0  2800 0000 0000 0000 9900 0000 2020 2020   (...........     
  10  2020 2020 2020 2020 2020 2020 2020 2020                    
  20  3330 3236 2020 2020 2020 2020 0000 0000   3026        .... 

And this a fragment of server socket code, that I wrote. 

#include <stdlib.h>
main()
{
  int i;
   char a[49];
  unsigned char t[49]={
0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x33,0x30,0x32,0x36,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00
  };

  for ( i=0;i<49;i++){
	a[i]= t[i]; 
  }

 /* I then send the data in the array a, to the IP phone via a call to a
 "write" function that will send the data to the IP phone, the prototype 
being writeString(int fd, char *strbuf)
*/
   
}
    	
What's wrong:
1. Am I making a mistake in the unsigned char to char, should I be using
another "type"?
2. Are their any glaring errors that I have missed?

I do realize this isn't a directly related Ethereal problem, but I know
this kind of stuff is second-nature to anyone who has done any serious
development work or otherwise with Ethereal. I would *really* appreciate
all the help I can get.

Thanks again

jonathan