SIP Response Code

SIP 302 Moved Temporarily

6 min read  ·  Updated April 2026

SIP 302 Moved Temporarily tells the caller to retry the call at a different URI. It is the mechanism behind call forwarding, hunt groups, and SIP redirect servers. When 302 causes failures, the redirect Contact header is usually the problem.

In this guide

1. How SIP 302 Moved Temporarily works

When a server returns 302, it includes a Contact header with the new URI where the request should be retried. The caller is expected to send a new INVITE to that Contact URI.

; Original INVITE INVITE sip:1001@pbx.example.com SIP/2.0 ; Server responds with 302 SIP/2.0 302 Moved Temporarily Contact: sip:1001@mobile.example.com Contact: sip:voicemail@pbx.example.com ; Caller sends ACK for the 302 ACK sip:pbx.example.com SIP/2.0 ; Caller retries at the new Contact URI INVITE sip:1001@mobile.example.com SIP/2.0

Multiple Contact headers in a 302 represent parallel or sequential targets. The caller can try all of them. The q parameter sets preference: Contact: sip:primary@example.com;q=1.0 is tried before Contact: sip:backup@example.com;q=0.5.

2. When SIP 302 is used

3. Why SIP 302 causes call failures

Issue 01
Client does not follow redirect
Not all SIP clients follow 302 redirects automatically. Some clients (especially older IP phones) treat 302 as a failure and do not retry at the Contact URI. Check client documentation for redirect handling support. On Asterisk, set followredirect=yes in sip.conf or set_follow_redirect in PJSIP.
Issue 02
Contact URI unreachable
The 302 Contact points to an address the caller cannot reach — private IP, wrong port, or unreachable domain. The caller retries but gets no response. Ensure the Contact URI in the 302 is reachable from the original caller.
Issue 03
Redirect loop
The redirect destination also returns 302, creating a loop. A calls B, B redirects to C, C redirects back to A. Most SIP implementations have a maximum redirect depth (usually 5-10 hops) after which they return 483 Too Many Hops.
Issue 04
B2BUA blocking redirects
If a B2BUA (Back-to-Back User Agent) is in the call path, it terminates the dialog and handles the redirect internally rather than passing it to the original caller. The B2BUA may not follow the redirect correctly or may strip the Contact header.

4. How SIP clients handle 302

Per RFC 3261, a UAC receiving a 3xx response should:

  1. Send ACK to the 302
  2. Extract Contact URIs from the 302
  3. Add them to the target set
  4. Send a new INVITE to the highest-priority Contact
  5. If that fails, try the next Contact

In practice, behavior varies widely by implementation. Some clients follow redirects transparently, some require configuration, some ignore them entirely.

5. Fixing SIP 302 redirect issues

Enable redirect following in Asterisk PJSIP:

; In pjsip.conf endpoint: [myendpoint] type=endpoint follow_early_connects=yes ; In dialplan - handle 302 explicitly exten => _X.,1,Dial(PJSIP/${EXTEN}@mytrunk) same => n,GotoIf($["${DIALSTATUS}" = "CANCEL"]?cancel) ; Check if redirected same => n,NoOp(Redirect: ${REDIRECTING(to-num)})

Handle 302 in Kamailio:

; In Kamailio, handle 3xx in onreply_route onreply_route[MANAGE_REPLY] { if (t_check_status("3[0-9][0-9]")) { xlog("L_INFO", "[$ci] Redirect received: $rs $hdr(Contact) "); # Follow redirect t_relay(); } }

6. Implementing 302 forwarding in Asterisk

; Send 302 redirect from Asterisk dialplan exten => 1001,1,Redirect(SIP/1001@192.168.1.50) ; Or use the SIPAddHeader approach for more control exten => 1001,1,Set(REDIRECTING(to-num)=1002) same => n,Set(REDIRECTING(to-name)=Voicemail) same => n,Redirect(SIP/voicemail@pbx.example.com) ; For call forwarding via database lookup exten => _XXXX,1,Set(FWD=${DB(CF/${EXTEN})}) same => n,GotoIf($["${FWD}" = ""]?no-forward) same => n,Redirect(SIP/${FWD}@${SIPDOMAIN}) same => n(no-forward),Dial(PJSIP/${EXTEN})

Frequently asked questions

What does SIP 302 Moved Temporarily mean?

SIP 302 Moved Temporarily tells the caller to retry the call at a different URI specified in the Contact header. It is the mechanism for call forwarding, find-me/follow-me, and SIP redirect servers. The caller should send ACK to the 302, then send a new INVITE to the Contact URI in the response.

Why is SIP 302 causing my calls to fail?

SIP 302 call failures are usually caused by: the client not following redirects (needs followredirect=yes in Asterisk), the Contact URI in the 302 being unreachable from the caller, a redirect loop where the target also returns 302, or a B2BUA in the path that does not handle redirects correctly.

How do I implement call forwarding with SIP 302?

In Asterisk dialplan, use the Redirect() application to send a 302: exten => 1001,1,Redirect(SIP/forward-target@domain). The caller receives 302 with the forwarding target in the Contact header and retries there. For database-driven forwarding, look up the forward target with DB() and pass it to Redirect().

Having SIP 302 redirect issues?

Paste your SIP trace into SIPSymposium. The analyzer traces redirect chains, identifies loop patterns, and checks Contact URI reachability in 302 responses.

Analyze my trace Create free account
Related guides