Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ARI SIP transfer handling documentation #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vinzens
Copy link

@vinzens vinzens commented Feb 5, 2025

No description provided.


Transfer is a telephony feature. There are two types of transfer, attended and blind. These names may differ depending on the system you are looking on, or what background you have.

The ARI transfer handling is supposed to be used in an ARI only environment to control a traditional channel or bridge with ARI is not possible since it needs to be in a Stasis context. Please refer to "how to use ARI" for more information. For this scenario all channels and bridges need to be placed into an ARI context.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the addition of "is not possible since it needs to be in a Stasis context." is confusing. What are you trying to convey there?

Attended transfer happens, if a call on hold and an active call are connected on request of the user. The user can talk to both parties before connecting them. This is also called a consultative transfer.

### Blind transfer
Blind transfer happens, if the user transfers the active call to a destination, not knowing the state or reachability of the destination. The user does not talk to the destination before the transfer.Blind transfer is also called a cold transfer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between "transfer.Blind"


#### Attended transfer

Asterisk will try to get as much information as possible about the transfer. The `REFER` does only contain the corresponding SIP-Call ID. With this SIP-Call ID, asterisk try to resolve the channel-ID used by ARI for the channel.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asterisk


Where the channel marked with an "X" is set on hold, channel A should receive MOH but this is not necessary.
Depending on the used phone a SIP REFER is send to the channel B or D. Either way, Asterisk tries to resolve all the channel information involved.
the `channelTransferEvent` contains both `refere-to` and `refered-by` information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's refer_to and referred_by

### Actions after the event is received

#### Attended transfer
The ARI application MUST take some action in order to handle the REFER. The Asterisk will not do anything by itself. The first thing to do when received an SIP REFER is acknowledge it. This is done by the Asterisk, as well as the first `NOTIFY` telling the phone an `100 Trying` SIP frag. After that, the telephon waits for a `Notify` containing a SIP frag with `200 OK`. This has to be sent by the ARI application manually.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

telephone

* channel_unavailable
* channel_declined

these will result in the corresponding SIP frag status codes being transmit via SIP notify to the phone. `channel_progress` will do nothing but tell the phone to hold on. This is done by asterisk itself but can be repeated. The other responses will terminate the REFER process in the one or the other way. Using `answered` the phone will most likely hangup the active channel and will wait for the hangup of the other one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asterisk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants