Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture packet from another IP within the same network #122

Open
a6datta opened this issue Dec 6, 2021 · 0 comments
Open

Capture packet from another IP within the same network #122

a6datta opened this issue Dec 6, 2021 · 0 comments

Comments

@a6datta
Copy link

a6datta commented Dec 6, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant