Asterisk SIP transfer support

From 탱이의 잡동사니
Jump to navigation Jump to search


Asterisk SIP transfer(REFER) 내용 정리.

Asterisk 에서 SIP transfer request(REFER)를 어떻게 처리하는지 내용 정리.


REFER is used for call transfer in SIP. The asterisk gets a REFER to place a new call with an INVITE somewhere and then keep the transferer up-to-date of the transfer. If the transfer fails, get back on line with the original call.

  • REFER can be sent outside or inside of a dialog. Asterisk only accepts REFER inside of a dialog.
  • If the asterisk gets a replaces header, it is an attended transfer.

Any REFER request has to be appropriately authenticated.

Blind transfer

The transferer provides the transferee with the transfer targets contact. The signalling between transferer or transferee should not be cancelled, so the call is recoverable if the transfer target can not be reached by the transferee.

In this case, the asterisk receives a TRANSFER from the transferer, thus is the transferee. The asterisk should try to set up a call to the contact provided and if that fails, re-connect the current session. If the new call is set up, the asterisk issues a hangup. In this scenario, the asterisk is following the SIP CC Transfer draft(Transfer without a GRUU).

Transfer with consultation hold

In this case, the transferer talks to the transfer target before the transfer takes place. This is implemented with SIP hold and transfer.

Note: the invite "From: " string could indicate a transfer.

The transferer places the transferee on hold, starts a call with the transfer target to alret them to the impending transfer, terminates the connection with the target, then proceeds with the transfer(as in Blind transfer above).

Attended transfer

The transferer places the transferee on hold, calls the transfer target to alert them, places the target on hold, then proceeds with the transfer using a Replaces header field in the Refer-to header. This will force the transferee to send an invite to the target, with a replaces header that instructs the target to hangup the call between the transferer and the target. In this case, the Refer/to: uses the AOR address(The same URI that the transferee used to establish the session with the transfer target(To:).

The Require: replaces header should be in the INVITE to avoid the wrong UA in a foked SIP proxy scenario to answer and have no call to replace with.

The referred-by header is NOT required, but if it given, it can be copied into the INVITE to the transfer target to inform the target about the transferer.

See also