Asterisk channel re-usage

Hello,

Should asterisk channels be re used for direrent calls?

I see in the logs that somehow (without any asterisk restart or crash) the same channel name (C-XXXXXX) is reported for different calls (with a time difference of some minutes)

I am using an agi script (I didn’t wrote tbh) but I don’t know if it is correct to re use the same asterisk channels in the first place.

Best regards,
Stavros Kladis

It’s a Call ID which can be inherited, and is not unique to each channel:

https://docs.asterisk.org/Operation/Logging/Call-Identifier-Logging/?h=call+id

1 Like

Thank you so much jcolp!

Now I understand about the Call-Identifier, thanks!
Not sure if this the correct part of the forum to get technical, I have one more question:
An instance of struct ast_channel (which is associated with a struct ast_channel_id uniqueid) will it be used for one call only in the asterisk process lifetime and after the call it is destroyed or asterisk recycles and re-uses these channels in future calls?

Asterisk won’t reuse the allocated ast_channel structure, but the memory allocator could theoretically provide it back when allocating memory again.

1 Like

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