Hi all!
I am trying to figure out which variable in the dialplan would return, not the sip channel (Sip/102 in this case) but the channel with its unique call id (is that what its called?) such as SIP/102-08f3d380. Can somebody tell me more about this id that follows the sip channel and how I can use grab it in the dial plan to use in a UserEvent? Thanks!
All asterisk channels have “unique id” and “name”. The “unique id” is really unique identifier. The “name” is not unique string and can be reused in the future.
If you want to use an ID in manager events (e.g in UserEvent) you should use channel “unique id” that can be returned by ${UNIQUEID} channel variable. The “unique id” looks like “1187260146.4”. Note that this id is unique for any channel types (not only for SIP).
Also note that id “SIP/102-08f3d380” from your post is SIP channel “name” and it is NOT unique id because the right part of the string is a memory address of the sip_pvt stucture related with the channel. After the channel will be freed, any other SIP channel can alloc a new structure with the same memory address and so will have the same name. In any case if you want to get channel “name”, try use ${CHANNEL} variable.