[asterisk-dev] [Code Review] Prevent caller ID set on channel from getting discarded when originate used with local channel (small patch - review quickly, earn rewards!)

David Vossel dvossel at digium.com
Mon Aug 9 09:34:05 CDT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/847/#review2547
-----------------------------------------------------------

Ship it!


Ah, so this sort of thing has already been detected as an issue.  I hate that trend, but since it is already there it feels like this is the right place for the fix.  If you can find an easier way to detect if a cid value is present that would be nice... and perhaps a more detailed explanation as to why this is necessary would be good for the future.

- David


On 2010-08-06 17:43:42, Jeff Peeler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/847/
> -----------------------------------------------------------
> 
> (Updated 2010-08-06 17:43:42)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The scenario here is that the channel that caller ID is set on is getting swapped with the zombie channel which is hung up and then lost. I am weary of the this change though as I am unsure if the clone channel would ever have valuable caller ID that needs to be swapped.
> 
> (Proof that this is not a trap)
> To demonstrate the issue put the snippet below in your dialplan, changing the endpoints sip/5001 and sip/5002:
> 
> [default]
> exten => 5001, 1, dial(sip/5001,,tTkK)
> 
> [kobaz3]
> exten => s, 1, noop("dialnumber")
> exten => s, n, set(CALLERID(name)=FooBarInc)
> exten => s, n, set(CALLERID(num)=8005551120)
> exten => s, n, set(CHANNEL(callgroup)=3)
> exten => s, n, noop("about to wait")
> exten => s, n, wait(1) ; delay so that masquerade completes
> exten => s, n, noop("done waiting callerid name ${CALLERID(name)}") ; callerid will not have original values
> exten => s, n, dial(sip/5002)
> 
> And then do an originate:
> originate local/5001 extension s at kobaz3
> 
> 
> This addresses bug 17138.
>     https://issues.asterisk.org/view.php?id=17138
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/channels/chan_local.c 281221 
> 
> Diff: https://reviewboard.asterisk.org/r/847/diff
> 
> 
> Testing
> -------
> 
> Fixes the problematic scenario.
> 
> 
> Thanks,
> 
> Jeff
> 
>




More information about the asterisk-dev mailing list