UC LabFree University
Offline

Progress

SIP ยท RFC 3264

Hold

Hold is a new offer that changes direction, not a mute button on one phone.

re-INVITE sendonlyAliceBobre-INVITE200ACKre-INVITE200

  1. re-INVITE โ€” Same dialog. SDP a=sendonly, or inactive when neither side should send.
  2. 200 โ€” Bob answers with recvonly, matching the direction.
  3. ACK โ€” The new offer is in force. Music, if any, is a local decision.
  4. re-INVITE โ€” Resume offers sendrecv again.
  5. 200 โ€” Both directions restored.

If the far side answers sendrecv to a sendonly offer, you still have a direction bug. Check both SDPs before you blame the network.

Sources

Study card carried forward

SIP ยท RFC 3264

Hold

Hold is a change to an existing dialog. The same Call-ID stays. A new INVITE, with a higher CSeq, changes the direction attribute on the media line.

Ladder: Alice sends a re-INVITE with sendonly, Bob answers recvonly, then a later re-INVITE with sendrecv resumes the call.
Alice holds Bob, then resumes. Music is optional and is not a third SIP dialog.

On a phone, swipe a wide ladder sideways. The steps below repeat the same sequence.

Sequence

  1. re-INVITE โ€” Alice to Bob. a=sendonly on the audio line
  2. 200 OK โ€” Bob to Alice. Answer uses a=recvonly
  3. ACK โ€” Alice to Bob. Hold is now in effect
  4. RTP one way โ€” Alice to Bob. Often music from Alice's side
  5. re-INVITE โ€” Alice to Bob. a=sendrecv resumes the call
  6. 200 OK โ€” Bob to Alice. a=sendrecv
  7. ACK โ€” Alice to Bob. Both directions open again
  8. RTP both ways โ€” Alice to Bob. Conversation resumes

Direction attributes

RFC 3264 section 8.4 replaced the old habit of setting the connection address to 0.0.0.0. On a modern offer:

  • a=sendonly means the offerer will send media and will not receive it. The answer should be a=recvonly (or a=inactive if the answerer will not receive either).
  • a=inactive means neither direction. Both sides use inactive. Use this when nobody should send, including music.
  • a=recvonly is the mirror of sendonly.
  • a=sendrecv is the normal two-way state, and it is the default when no direction attribute is present.

Music on hold is an application choice. The RFC does not require it. If Alice offers sendonly, her side is allowed to send a music stream. Bob has agreed only to receive.

v=0
o=alice 2890844526 2890844527 IN IP4 192.0.2.10
s=Hold
c=IN IP4 192.0.2.10
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendonly

Bob's answer uses his own address and a=recvonly. The port stays a real RTP port. Setting the port to 0 rejects the stream. That removes media. It is not hold.

Sources

  • RFC 3264, section 8.4 (putting a unicast stream on hold)
  • RFC 3261, section 14 (modifying an existing session)

Download exports