[fpc-pascal] Help Reading SIP Messages.

lloyd thomas lloydie.t at googlemail.com
Tue Jan 5 15:48:19 CET 2010


Also came across this which uses pcap, but seems to be delphi only
http://www.magsys.co.uk/delphi/magmonsock.asp

is there something similar for fpc?

2010/1/5 lloyd thomas <lloydie.t at googlemail.com>

> OK. I wish to monitor and record calls between a SIP endpoint and SIP
> Gateway. At the moment I am doing that by connecting the SIP endpoint and=
 my
> machine to an ethernet hub so that I can see all the traffic.
> In the first instance I just need to correctly capture, read and interpre=
te
> the SIP messages so that I can make an informed decision which RDP packets
> to capture.
>
> Then I suppose I will have an even harder task capturing the RDP packets
> and joining both legs together (my coding skills is not great)!
>
> Lloydie T
>
> 2010/1/5 ik <idokan at gmail.com>
>
> Hello,
>>
>> SIP first of all uses UDP most of the times (and rarely TCP) .
>> It only create a tunnel that other protocols such as RDP and SDP are goi=
ng
>> inside.
>>
>> Can you explain a bit more what exactly do you wish to implement (i'm not
>> sure that I understand) ?
>>
>> Ido
>>
>> http://ik.homelinux.org/
>>
>>
>> On Tue, Jan 5, 2010 at 15:08, lloyd thomas <lloydie.t at googlemail.com>wro=
te:
>>
>>> Please forgive my ignorance regarding the project I am about to embark
>>> on.
>>> Need some advice on Lnet and capturing SIP RTP data to file. In the fir=
st
>>> instance I just need to work with the sip messages. I believe the SIP
>>> messages are similar to HTTP. I am using wireshark to understand how th=
e SIP
>>> messages are processed, but I am not sure how to capture and read each =
frame
>>> (wireshark speak) using Lnet.
>>>
>>> (FYI:
>>> http://en.wikipedia.org/wiki/Session_Initiation_Protocol#SIP_network_el=
ements
>>> )
>>>
>>> For instance the following is from frame 12 (935 bytes)
>>>
>>> -----------------------------------------------------------------------=
-----------------------
>>> INVITE sip:1002 at 192.168.91.200 <sip%3A1002 at 192.168.91.200> SIP/2.0
>>> Via:SIP/2.0/UDP 192.168.91.190:5060;rport;branch=3Dz9hG4bK83570061
>>> From:"Lloyd" <sip:1000 at 192.168.91.200 <sip%3A1000 at 192.168.91.200>
>>> >;tag=3D4b428357-2fa-1ec5d4e
>>> To:<sip:1002 at 192.168.91.200 <sip%3A1002 at 192.168.91.200>>
>>> Contact:"Lloyd" <sip:1000 at 192.168.91.190:5060;transport=3DUDP>
>>> Call-ID:83570000-4ce59f27 at 192.168.91.200<Call-ID%3A83570000-4ce59f27 at 19=
2.168.91.200>
>>> Subject:sip phone call
>>> CSeq:2112045024 INVITE
>>> User-Agent:Mitel-5212-SIP-Phone 07.02.00.04 08000F24BEE5
>>> Allow:INVITE,ACK,CANCEL,BYE,OPTIONS,REFER,NOTIFY,PRACK,UPDATE
>>> Allow-Events:talk,hold,conference
>>> Supported:timer,100rel,replaces
>>> Session-Expires: 1800
>>> Min-SE: 90
>>> Max-Forwards:70
>>> Content-Type:application/sdp
>>> Content-Length:247
>>>
>>> v=3D0
>>> o=3D1000 1262650963 1262650962 IN IP4 192.168.91.190
>>> s=3DSIP Call
>>> c=3DIN IP4 192.168.91.190
>>> t=3D0 0
>>> a=3Dsendrecv
>>> m=3Daudio 20036 RTP/AVP 0 8 18 96
>>> a=3Drtpmap:0 PCMU/8000
>>> a=3Drtpmap:8 PCMA/8000
>>> a=3Drtpmap:18 G729/8000
>>> a=3Drtpmap:96 telephone-event/8000
>>>
>>> -----------------------------------------------------------------------=
------------------------
>>>
>>> I get a response from the sip server on frame 13 (371 bytes)
>>>
>>> -----------------------------------------------------------------------=
-----------------------
>>> SIP/2.0 100 Trying
>>> Via: SIP/2.0/UDP 192.168.91.190:5060;rport=3D5060;branch=3Dz9hG4bK83570=
061
>>> From: "Lloyd" <sip:1000 at 192.168.91.200 <sip%3A1000 at 192.168.91.200>
>>> >;tag=3D4b428357-2fa-1ec5d4e
>>> To: <sip:1002 at 192.168.91.200 <sip%3A1002 at 192.168.91.200>>
>>> Call-ID: 83570000-4ce59f27 at 192.168.91.200
>>> CSeq: 2112045024 INVITE
>>> User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-15355M
>>> Content-Length: 0
>>>
>>> -----------------------------------------------------------------------=
------------------------
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>>
>>
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freepascal.org/lists/fpc-pascal/attachments/20100105/c676=
95af/attachment.htm


More information about the fpc-pascal mailing list