Contact Sales

All fields are required

SIP 101: Understanding Programmable SIP | SignalWire
Industry

SIP 101: Understanding Programmable SIP

SIP vs. Programmable SIP vs. SIP Trunking

Dani Plicka

Programmable SIP takes the foundational Session Initiation Protocol (SIP) and adds developer-friendly control over call behavior such as routing, media actions, interactive voice response (IVR), recording, and more using APIs and scripting. Unlike traditional SIP trunks that simply connect endpoints, programmable SIP lets you inject business logic and real-time decision-making into voice calls while SignalWire handles infrastructure, scaling, and network complexity.

SIP, VoIP, and the Differences Between Programmable SIP and SIP Trunking

What is SIP?

Session initiation protocol (SIP) is one of the most popular protocols to allow voice calls over the internet. If you have two computers and want to make a voice call between them, you would not want to connect your computer to the phone network using actual cables. Instead, you would use the internet to bypass the phone network altogether. This is what SIP does: it establishes a voice call between two computers over the internet.

By itself, SIP is just a protocol to connect two devices, so it is unable to connect to physical phones via the public switched telephone network (PSTN). However, services like SignalWire can connect SIP to the phone network, which allows your computer to use SIP to call a PSTN phone, or vice versa.

Programmable SIP and SIP trunking, however, are two different concepts.

What is programmable SIP?

Programmable SIP allows you to add programmability to SIP calls. Programmable calls do more than just connecting two users; for example, interactive voice response systems (IVRs) require programmability. Similarly, routing calls, playing audio, starting and stopping recordings, and transcription are all actions that require programmability.

With SignalWire, programmability is usually achieved by the use of a SignalWire Markup Language (SWML) script, RELAY application, compatibility XML, or SIP domain application.

With programmable SIP, you are charged for the number of SIP legs connected to SignalWire. Generally, one person on a call corresponds to one SIP leg. On top of that, there are charges for any programmable features being used.

If you use programmable SIP to connect to the phone network, then you will also be charged the relevant programmable voice price.

By partnering with a provider like SignalWire, you can apply business-specific logic such as call routing rules or call handling logic to SIP calls without needing to build the underlying infrastructure. You could also inject real-time decision-making capabilities into SIP traffic, such as adjusting routing based on network conditions or call cost optimizations.

Programmable SIP reduces the learning curve by providing intuitive APIs and tools, removing the need to write custom SIP headers or scripts. You can easily integrate SIP capabilities into CRMs, IVRs, or other business systems.

This way, you don’t need to invest in expensive, high-availability SIP servers, and SignalWire handles the complexity of scaling SIP operations to meet demand while ensuring redundancy and uptime.

SIP vs. VoIP: What’s the difference?

Voice over Internet Protocol (VoIP) is the umbrella technology that enables voice and multimedia communications over IP networks instead of traditional phone lines. Anytime you make a call through the internet, whether it’s through a softphone, a browser, or an app, you’re using VoIP. It encompasses every layer of the process: encoding your voice into data packets, routing those packets, and playing them back in real time.

SIP, on the other hand, is a signaling protocol used within many VoIP systems. Its job is to establish, manage, and terminate communication sessions between endpoints. SIP makes a VoIP call possible by telling devices when to ring, how to connect, and how to negotiate codecs and network paths. Once the session is set up, another protocol (typically the Real-Time Transport Protocol) carries the actual voice or video data.

In other words:

  • VoIP is the method of transmitting voice over IP networks.

  • SIP is one of the protocols that makes VoIP work by handling the signaling and session control.

While SIP is the most common signaling standard used in VoIP today, it’s not the only one. Older or specialized systems might use protocols like H.323, MGCP, or proprietary signaling stacks. But SIP’s open standard and flexibility have made it the foundation of most modern cloud-based communication platforms.

SIP calls are VoIP calls, but not all VoIP calls use SIP.

Programmable SIP use cases

Bring Your Own Carrier (BYOC)

If you need to build a voice application that requires programmability, but have an existing carrier relationship, SignalWire can accommodate this with BYOC.

Pricing

In a BYOC scenario, charges are for the number of SIP legs connected to SignalWire, plus any programmable features. Typically, for a standard call, this would include two SIP legs.

Call routing for contact centers

Contact centers may need to route certain inbound calls to the appropriate destination according to defined rules. In this case, the contact center would be connected to SignalWire via SIP. SignalWire receives inbound calls and executes a script (like SWML or RELAY) that will route the call to the appropriate destination within the contact center.

Pricing

In a call routing scenario, charges apply for the number of legs connected to SignalWire. Typically this would include two legs (a SIP leg and a PSTN leg).

What is SIP trunking?

A SIP trunk is simply a virtual phone line and can be used to make multiple simultaneous calls on a single connection. Sometimes, programmability may not be necessary. This might be because you already have a private branch exchange (PBX) such as an on-premises instance of FreeSWITCH that can perform similar programmable functions. In this case, SignalWire can be used for SIP trunking as a way to connect to the phone network.

SIP trunking allows you to receive inbound traffic for simple use cases, such as connecting to human agents. For existing infrastructure like a PBX, a SIP trunking setup can route inbound calls to save on costs.

How do I get started with Programmable SIP?

Sign up for a free SignalWire Space, create a SIP endpoint, and point it to a SWML script or API endpoint. From there, you can begin routing calls, testing programmable logic, and integrating with your app.

SignalWire’s Programmable SIP offers the ability to easily apply logic and control to each SIP leg and enhance how you manage the SIP connections that would otherwise require deep technical expertise and your own infrastructure. Start building in the cloud today and join our community of developers on Discord.

Frequently asked questions

What is programmable SIP?
Programmable SIP extends standard SIP by letting developers control call logic, routing, media actions, and events via APIs and scripting instead of static connections.

How is programmable SIP different from traditional SIP trunking?
Traditional SIP trunking connects SIP endpoints to the public network, while programmable SIP lets you control what happens on each call, such as adding IVRs, playing audio, recording, or routing dynamically.

What kinds of actions can be performed with programmable SIP?
Programmable SIP enables call routing, media playback, recording, transcription, integration with IVRs, and custom logic that reacts to real-time events during a call.

Do I need to manage SIP infrastructure myself?
No. A programmable SIP provider like SignalWire handles scaling, redundancy, and network complexity, letting you focus on call logic and integration via APIs.

Where is programmable SIP used in real applications?
Developers use programmable SIP in contact centers, IVRs, cloud PBXs, AI voice agents, integrated CRM call systems, and custom VoIP applications that need flexible call control.

Related Articles