Number and semicolon added to channel id

I noticed there is a semicolon and a number added to the channel id in case of the callee doesn’t pick up the call and a CANCEL event occurs.
What is the reason for that?

ChannelHangupRequest 16 - (channel id CHID-76ccb32e-ffb2-46e0-af11-59b4828b2e78;2)

There’s not enough context here to be able to answer this, beyond saying that Local channels are composed of two channels, one being ;1 and the other being ;2.

Yes it is a local channel connected to a sip trunk.

Obviously there is a hang up event for each of the two channels, although channel 1 doesn’t get the channel id suffix …

ChannelHangupRequest 16 - (channel id CHID-de89a61c-861b-417a-ad02-8de7594b0980;2)
ChannelHangupRequest 16 - (channel id CHID-de89a61c-861b-417a-ad02-8de7594b0980)

Local/MyEndpoint@Context

[MyEndpoint]
type=endpoint
aors=MyEndpoint
allow=g722,alaw
transport=transport-udp
send_pai=yes

I don’t know what “channel id” you are referring to.

I am using a framework and set the channel id on channel creation through originate ARI requests.

ari.channels().originate(endpoint).setChannelId(channelID)

I think a have to analyze the framework behaviour …

Okay, that is setting the unique id. Since a unique id has to be by definition unique only one channel can have that unique id. The second channel for a Local channel, by default, will append ;2 to make it unique. When requesting in ARI there is also the ability to set the unique id for the second channel in otherChannelId[1].

[1] Asterisk 20 Channels REST API - Asterisk Project - Asterisk Project Wiki

Ah ok there is a method setOtherChannelId(). Wasn’t aware of that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.