[asterisk-dev] Question/Suggestion for chan_sip

Steve Davies davies147 at gmail.com
Thu May 13 05:48:27 CDT 2010


On 13 May 2010 11:35, Steve Davies <davies147 at gmail.com> wrote:
> On 12 May 2010 19:34, Russell Bryant <russell at digium.com> wrote:
>> On 05/12/2010 05:21 AM, Steve Davies wrote:
>>> Just thought I would check whether it made any sense before submitting
>>> it as a patch.
>>>
>>> In do_magic_pickup() in chan_sip.c, we try to grab a call from
>>> extension at context, usually using "subscribecontext " from sip.conf as
>>> the context.
>>>
>>> This got me thinking - Should do_magic_pickup() look for a "hint"
>>> extension in the specified @context, and try to pick up a call by
>>> device-list using PickupChan. This will give a more accurately
>>> directed pickup list, particularly as pickup by extension number may
>>> well pick up a call that was sent to a completely different,
>>> unmonitored device.
>>
>> I don't think that will work.  If you do that, you're going to find the
>> callee channels, not the caller channels.  It's the caller channels that
>> you want to find and connect to.  If you get a hold of the callee
>> channels, there is no way to know what has caused them to be ringing.
>>
>
> A very good point :) I'll need to put more thought into that!

As it turns out, the callee is exactly what you WANT to find - that
way you Masquerade yourself (the picking-up party) in as a replacement
for the ringing party, and the result is that you are bridged to the
caller as required and the ringing party is zombied and destroyed.

I put together a patch that uses PickupChan if it can and falls back
to the original code if not, and it seem to work in simple cases.

Worth putting on the bugtracker? Or is it not a general purpose patch?

Regards,
Steve



More information about the asterisk-dev mailing list