[asterisk-dev] channel name uniqueness
Tony Mountifield
tony at softins.clara.co.uk
Wed May 20 11:41:04 CDT 2009
In article <36a74c840905200850x5cebfe22xdfa1b2d0bfbba0d at mail.gmail.com>,
Tim Ringenbach <tim.ringenbach at gmail.com> wrote:
>
> On Mon, May 18, 2009 at 3:39 PM, Russell Bryant <russell at digium.com> wrote:
>
> > The unique ID field on a channel is what uniquely identifies it from
> > others that had the same name. The unique ID field is a monotonically
> > increasing integer, a timestamp, and optionally, a system name.
> >
> >
> I did recently notice that the unique ID isn't copied during a channel masq
> and had been wondering if that was intentional. For what I was doing, it
> would have been much more convenient if it did copy. The way it is now, the
> same channel name (e.g. SIP/foo-xxxx), representing the same actual call
> leg, will change uniqueid's (because it isn't copied into the channel struct
> on masq) during the lifetime of the call if certain events happen.
>
> Is that on purpose or an oversite? If it's intentional, you might want to
> add that quirk to the documentation.
It's not an oversight. The start and end channels of a masquerade are
different channel instances, and are distinguished precisely by having
different Unique IDs. Take a look at the events on the Manager interface
when a masq is happening. If the unique ID got copied across, it would
be impossible to distinguish between the hangup of the old channel at
the completion of the masq and the hangup of the new channel later on.
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list