1. Ports
  2. Port 2727

What This Port Does

Port 2727 is where an MGCP call agent listens.

MGCP stands for Media Gateway Control Protocol. It is a VoIP signaling protocol from 1999 that was designed to bridge two worlds: the old public switched telephone network (PSTN) and the emerging Internet. Port 2727 is registered with IANA for this specific role: mgcp-callagent.1

To understand port 2727, you have to understand MGCP's core philosophy — and it's an unusual one.

The Dumb Gateway, Smart Agent Split

Most network protocols treat endpoints as peers. SIP, for instance, lets two phones negotiate a call directly.

MGCP took the opposite view: gateways are dumb. Deliberately, architecturally dumb. A media gateway's only job is to translate audio — convert telephone circuit signals into IP packets and back again. It does not make decisions. It does not initiate anything on its own. It waits for orders.

The orders come from the call agent.

The call agent is where all the intelligence lives: routing logic, dial plans, signaling with the telephone network, authorization. It's the brain of the MGCP system. When a call arrives, the call agent decides what to do with it, then issues commands to the gateway telling it what audio streams to open, connect, or terminate.2

This split is reflected directly in the port numbers:

  • Port 2427 — where media gateways listen for commands from the call agent
  • Port 2727 — where call agents listen for responses and notifications from gateways

Same protocol, opposite direction, different port. Port 2427 is where you tell the gateway what to do. Port 2727 is where the gateway tells the call agent what happened.3

The History

In 1999, the telephone network and the Internet were colliding. Voice calls over IP promised to make long-distance nearly free — but billions of dollars of PSTN infrastructure existed and couldn't simply be discarded. The question was: how do you bridge them?

Bellcore and Cisco had been working on SGCP (Simple Gateway Control Protocol) and IPDC (Internet Protocol Device Control). In October 1999, these converged into MGCP Version 1.0, documented in RFC 2705.4 RFC 3435 superseded it in 2003 with clarifications and corrections.5

The protocol saw real deployment in enterprise telephony — Cisco Unified Communications Manager (CUCM), ShoreTel, and other systems used MGCP to control voice gateways. If your company had a PBX in the 2000s that connected desk phones to the outside world, there's a reasonable chance port 2727 was involved.

Why MGCP Lost

MGCP's centralized architecture is also its weakness.

When the call agent goes down, every gateway it controls goes silent. There's no fallback negotiation, no peer-to-peer recovery. The gateways are too dumb to handle calls on their own.

SIP took the distributed approach — endpoints negotiate directly, intelligence lives at the edges — and it won. For new VoIP deployments, SIP is the default. MGCP persists in legacy enterprise environments and in certain carrier-grade telephony systems, but it's not where the industry went.6

The philosophical difference matters: MGCP trusted centralized control. SIP trusted the network's edges. The Internet, being the Internet, rewarded the distributed approach.

Security Considerations

MGCP call agents are high-value targets. Compromising the call agent means controlling every gateway it manages — all call routing, all audio streams. In production deployments, port 2727 should be firewalled to allow traffic only from known gateway IP addresses, never exposed to the public Internet.

MGCP also predates modern authentication thinking. The protocol has weak authentication mechanisms; deployment security depends heavily on network-level controls.

How to Check What's Using This Port

If you see traffic on port 2727 and want to know what's listening:

On Linux/macOS:

# Show what process is listening on port 2727
sudo lsof -i :2727
sudo ss -tlnup | grep 2727

On Windows:

netstat -ano | findstr :2727

If something is listening on port 2727 outside a known VoIP system, that warrants investigation. The port has no well-known malware associations, but unexpected listeners on registered ports are always worth auditing.

PortProtocolRole
2427MGCPMedia gateway (receives commands from call agent)
2727MGCPCall agent (receives responses from gateways)
5060SIPSIP signaling — MGCP's successor in most deployments
5061SIP/TLSEncrypted SIP signaling

Frequently Asked Questions

آیا دا پاڼه ګټوره وه؟

😔
🤨
😃