Skip to content

Capture packet from another IP within the same network #122

@a6datta

Description

@a6datta

I am trying to get the details when a VOIP phone rings. The hardware phone is connected to the same network.

With softphone I can get the device details as per the example
IList<LivePacketDevice> allDevices = LivePacketDevice.AllLocalMachine;

and get the SIP header

private static void PacketHandler(Packet packet)
        {
            IpV4Datagram ip = packet.Ethernet.IpV4;
            UdpDatagram udp = ip.Udp;9
            Datagram datagram = null;

            if (ip.Protocol == IpV4Protocol.Udp)
            {
                datagram = udp.Payload;

                if (null != datagram)
                {
                    var decoded = datagram.Decode(System.Text.Encoding.UTF8);
                    //i can get the SIP header here
                }
            }
        }

How do I get the same with another IP within the same network?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions