[asterisk-dev] [Code Review] Asterisk Unique ID for call logging - Phase III part 1 - Binding Call IDs before entering PBX in the SIP channel driver
jrose
reviewboard at asterisk.org
Tue Apr 24 09:34:31 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1868/#review6045
-----------------------------------------------------------
/team/jrose/call_identifiers/main/pbx.c
<https://reviewboard.asterisk.org/r/1868/#comment11079>
|
|
v
/team/jrose/call_identifiers/main/pbx.c
<https://reviewboard.asterisk.org/r/1868/#comment11080>
|
|
v
/team/jrose/call_identifiers/main/pbx.c
<https://reviewboard.asterisk.org/r/1868/#comment11081>
Just realized my folly here... if this function was called from an already bound thread, we'll kill the binding prematurely.
I need to rethink this strategy. I think I'll set a flag based on whether a new callid was created or if the old one was in use and then use that to determine whether to perform the threadassoc_remove.
- jrose
On April 23, 2012, 2:29 p.m., jrose wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1868/
> -----------------------------------------------------------
>
> (Updated April 23, 2012, 2:29 p.m.)
>
>
> Review request for Asterisk Developers, Mark Michelson, rmudgett, and Matt Jordan.
>
>
> Summary
> -------
>
> This patch adds a number of new functions involving channels and call identifiers to allow the creation of callids within specific channel drivers so that log messages can be bound to a call ID before going into the PBX. The SIP channel driver is used to demonstrate the methodology involved. Also adds display of callid involved with a channel in core show channel if it is a channel that has been deliberately bound to call id.
>
>
> Diffs
> -----
>
> /team/jrose/call_identifiers/channels/chan_iax2.c 363306
> /team/jrose/call_identifiers/channels/chan_sip.c 363306
> /team/jrose/call_identifiers/channels/sip/include/dialog.h 363306
> /team/jrose/call_identifiers/channels/sip/include/sip.h 363306
> /team/jrose/call_identifiers/include/asterisk/channel.h 363306
> /team/jrose/call_identifiers/include/asterisk/logger.h 363306
> /team/jrose/call_identifiers/main/channel.c 363306
> /team/jrose/call_identifiers/main/channel_internal_api.c 363306
> /team/jrose/call_identifiers/main/cli.c 363306
> /team/jrose/call_identifiers/main/logger.c 363306
> /team/jrose/call_identifiers/main/pbx.c 363306
>
> Diff: https://reviewboard.asterisk.org/r/1868/diff
>
>
> Testing
> -------
>
> Normal calls, calls being transfered, calls being rejected from Chan SIP.
>
> EDIT:
> I have a few scenarios to detail, and the behavior of one of them might be less than awesome.
>
> 1 - peer A calls extension to dial peer B (single invite, no reauthorization takes place)
> A call ID is generated and bound to the channel for peer A making the call. The PBX thread is started and also takes a reference to the Call ID copied from the channel. Peer is dialed and when that channel is created, it gets a reference to the call ID as well. This is pretty ideal.
>
> 2 - peer C calls extension to dial peer B (reauthorization takes place, so a second invite happens before C connects)
> In this case, the first invite gets a call ID which is bound to the SIP thread momentarily before the call is confirmed as being unable to complete. Peer C sends a second invite with authorization, which causes a second call ID to be created which gets bound to the call. This is a bit of a problem since the call ID should ideally be the same for both the preauthorized and post authorized portions of the call, so it needs some work.
>
> As for transfer scenarios, it was tested with both blind and attended transfers. In the case of a blind transfer, the call ID remains the same throughout the whole process. For attended transfers however, a new call ID is created which covers the transferring channel as well as the channel receiving the transfer. Once the transfer is completed, the transferred channel is also on the new call ID. This behavior might not be a problem, though it is perhaps a little inconsistent.
>
>
> Thanks,
>
> jrose
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120424/7a2ffc2f/attachment-0001.htm>
More information about the asterisk-dev
mailing list