Voice API call with SIP UPDATE message
Back to Articles
SIP Howto Regulation API

Voice API call with SIP UPDATE message

August 1, 2018 2 min
Aivis Olsteins

Aivis Olsteins

Earlier we discussed about setting specific SIP headers in calls generated by API.

Some voice carriers set specific requirements of how SIP sessions should be set and maintained. For example, there might be requirement to update call state information every given number of minutes during active call to indicate that the call is still alive. If the caller party does not issue call update every at predetermined time frames, the session is considered closed, and call is disconnected.

To update call status, SIP method UPDATE is used. Here is an example of SIP INVITE with subsequent UPDATE sent later within call:

 

INVITE sip:1234567890@10.1.1.1:5060;user=phone SIP/2.0
To: "1234567890"<sip:1234567890@10.1.1.1:5060;user=phone>
From: "987654321" <sip:987654321@10.1.1.2;user=phone>
Session-Expires: 1800;refresher=uac
Call-ID: 123456789abcdef@10.1.1.1:5060
Contact: <sip:987654321@10.1.1.2:5060>
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, PRACK, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 280

And later, in the call:

 

UPDATE sip:1234567890@10.1.1.1:5060;user=phone SIP/2.0
Call-ID: 123456789abcdef@10.1.1.1:5060
To: "1234567890"<sip:1234567890@10.1.1.1:5060;user=phone>
From: "987654321" <sip:987654321@10.1.1.2;user=phone>
CSeq: 26 UPDATE
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, PRACK, INFO, UPDATE
Content-Length: 0

 

To which the other party replies with:

 

SIP/2.0 200 OK
From: "1234567890"<sip:1234567890@10.1.1.1:5060;user=phone>
To: "987654321" <sip:987654321@10.1.1.2;user=phone>
Call-ID: 123456789abcdef@10.1.1.1:5060
CSeq: 26 UPDATE
Content-Length: 0

 

Important to note, that in order for other party to properly identify the call which is being updated, it is essential to send proper request URI and Call-ID header value.

Now, in the context of API, the call request send a voice call callback request with update every 15 minutes on both call legs, the request will look like this:



POST /voice/call/callback

{
"leg_A":
{
"to": "1000123",
"from": "1000125",
"sip_update": 900
},
"leg_B":
{
"to": "1000125",
"from": "1000123",
"sip_update": 900
}
}

The attribute sip_update takes integer value in seconds and asks to send SIP UPDATE every 900 seconds to the both parties.

Finally, let's look at slightly more complex example: SIP UPDATE and Privacy headers request:

 

POST /voice/call/callback

{
"leg_A":
{
"to": "1000123",
"from": "1000125",
"osip_P-Asserted-Identity": "tel:+3312345678",
"osip_Privacy": "Id"
"sip_update": 900
},
"leg_B":
{
"to": "1000125",
"from": "1000123",
"osip_P-Asserted-Identity": "tel:+4412345678",
"osip_Privacy": "Id"
"sip_update": 900
}
}

 

The above example will set privacy headers to their proper, E.164 formatted values for call routing and rating purposes, while keeping their shorter, informal IDs in “from” fields, as well as send SIP UPDATE every 15 minutes to both call legs.

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

How Voice AI Reduces Agent Burnout and Boosts Satisfaction

How Voice AI Reduces Agent Burnout and Boosts Satisfaction

Reduce Burnout with Voice AI: Offload Repetitive Calls, Real‑Time Agent Assist, 40–80% Less ACW, Calmer Escalations, Healthier Occupancy, Proactive Deflection & PCI‑Safe Flows—Happier Agents, Faster Resolutions, Better Coaching, Faster Ramp

Read Article
Seamless Voice AI Integrations: Salesforce, HubSpot, and ERP Systems

Seamless Voice AI Integrations: Salesforce, HubSpot, and ERP Systems

Seamless Voice AI Integrations with Your Stack: Salesforce & HubSpot CRM + SAP/Oracle/NetSuite/Dynamics ERP; OAuth2 & mTLS Security; Real‑Time Read/Write (Cases, Orders, Payments, Scheduling); Warm Transfers, Context; Audit Logs, SLAs, iPaaS Support

Read Article
Measuring Voice AI Success: The KPIs That Matter—CSAT, Containment, Speed, Accuracy, Reliability, and ROI

Measuring Voice AI Success: The KPIs That Matter—CSAT, Containment, Speed, Accuracy, Reliability, and ROI

Voice AI KPI Scorecard: CSAT/NPS, FCR & Containment, Time‑to‑First‑Word & p95 Latency, Intent/Slot Accuracy & ASR WER, Groundedness, Tool Success (Payments/IDV/Scheduling), Warm Xfers, Uptime/Reliability, Consent/Redact, Cost per Resolution & ROI

Read Article
Sensitive Data in Voice AI: PCI‑Safe Payments, HIPAA‑Compliant PHI, Redaction & Tokenization

Sensitive Data in Voice AI: PCI‑Safe Payments, HIPAA‑Compliant PHI, Redaction & Tokenization

Managing Sensitive Data in Voice AI: PCI‑Safe Payments (DTMF Masking, Tokenization), HIPAA‑Compliant PHI Segregation, Redaction/De‑Identification, End‑to‑End Encryption, Zero‑Trust Access, Residency/Retention, DSAR Deletion, SIEM‑Audited Trails

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts