Early Media with Progress()

Call Handling Asterisk 18+ -- Last reviewed 2026-03-29 early-media progress sip call-handling Found this useful? Upvote it. ×

Early Media with Progress()

Progress() sends a SIP 183 Session Progress response with SDP, establishing a media path to the caller before the call is answered. This lets you play audio (custom ringback, announcements, or music) while the call is still in the "ringing" state.

Dialplan

[from-trunk]
exten => 1001,1,Progress()
 same => n,Verbose(1,Early media: playing greeting before answer)
 same => n,Playback(custom/please-hold)
 same => n,Answer()
 same => n,Dial(PJSIP/1001,30)
 same => n,Hangup()

Progress vs Answer

[examples]
; Early media -- caller hears audio but call is not "answered"
; (no billing on metered trunks, CID shows "ringing" on caller's phone)
exten => 2001,1,Progress()
 same => n,Playback(custom/welcome)
 same => n,Answer()
 same => n,Dial(PJSIP/2001,30)
 same => n,Hangup()

; Immediate answer -- billing starts, phone shows "connected"
exten => 2002,1,Answer()
 same => n,Playback(custom/welcome)
 same => n,Dial(PJSIP/2002,30)
 same => n,Hangup()

How it works

  1. 183 Session Progress: Progress() causes Asterisk to send a SIP 183 response with an SDP body. This establishes a media (RTP) path so the caller can hear audio, but the call state remains "ringing". the caller's phone still shows "calling..." or "ringing."
  2. Billing implications: On metered SIP trunks, billing typically starts when a 200 OK (Answer) is received. Using Progress() for pre-answer announcements avoids starting the billing clock.
  3. Playback before Answer: After Progress(), Playback() sends audio over the early media channel. This is how carriers play "your call is being connected" messages or custom ringback tones.
  4. Answer() still required: Early media is temporary. You must still call Answer() (which sends a 200 OK) before bridging the call with Dial(), Queue(), or other applications that expect a fully established call.
  5. SIP signaling flow: The sequence is: INVITE -> 100 Trying -> 183 Session Progress (with SDP) -> [audio plays] -> 200 OK -> ACK -> [call is bridged].

Tips

User Notes

No notes yet. Be the first to contribute a tip or example.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.

Related Snippets