Summary:ASTERISK-04716: [patch] [post 1.2] present SIP Call-ID of ringing call in NOTIFYs to subscribed phones
Reporter:Frank Sautter (xylome)Labels:
Date Opened:2005-07-28 05:02:24Date Closed:2011-06-07 14:02:41
Versions:Frequency of
Environment:Attachments:( 0) callidnotify.r801.txt
Description:this patch introduces the presentation of the Call-ID of a ringing call of another sip-phone to the subscribed phone.
this is necessary to realise on key call-pickup on a busy lamp field.


* this patch is an offspring of bug ASTERISK-3564 (please add relationship)
* this patch will should not find it's way into cvs until ASTERISK-3564 is in cvs. this patch will work the way it's submitted now (2005-07-28) but will change it's behaviour if ASTERISK-3564 is in place (and need's some changes then). i submitted it in this form now, to not have it feature freezed out for asterisk 1.2
* this patch will not enable call-pickup as there needs to be support for INVITE/Replaces in asterisk (which is not jet in cvs-head)
Comments:By: Olle Johansson (oej) 2005-07-28 05:22:03

Only allocate variables when needed (explained on IRC)

By: Olle Johansson (oej) 2005-07-28 05:29:21

You also need to check if the other channel really is SIP, don't assume it is - it may be IAX2 or Agent and those channel doesn't have the information you pick from tech_pvt.

By: Olle Johansson (oej) 2005-07-28 05:33:21

hints may look like this = "SIP/olle&SIP/3300&IAX2/ssokol" - that will not match the channel name. You need to split the channel name at "-".

Look at the devicestate function to get some hints :-) and the functions for device/extensionstate in channel.c.

I do like this functionality, so please continue this work ! :-)

By: Frank Sautter (xylome) 2005-08-01 14:01:50

* updated to revision 797
* hint string is now splitted at '&'
* everything after a dash is ignored in a channel name
* only SIP channels are considered
* got rid of a lot of unnecessary variable declarations

By: Michael Jerris (mikej) 2005-08-01 16:26:56

please note, channel names can contain a -, so you need to ignore only after the last -.  This is currently an issue in the device\extension state function that we need a fix for.

By: Frank Sautter (xylome) 2005-08-03 03:55:28

MikeJ: i'm aware of the '-' problem in the hint systems (i stumbled over it) and it should be changed in general. i had some thoughts about my implementation and concluded that my patch should work consistent to all the other devicestate functions. so my intention is to leave this patch this way.

By: Frank Sautter (xylome) 2005-08-03 04:00:35

updated to revision 801

By: Olle Johansson (oej) 2005-08-24 14:23:53

I think we need a configuration setting to enable this. It adds quite a lot of processing to each notify.

Also, seems like we have to re-write this system for next version so that we won't have to do this for every subscription to the same device.

By: Kevin P. Fleming (kpfleming) 2005-08-24 23:21:36

I agree, this is a lot of processing for every NOTIFY, and prone to causing deadlocks, since it walks the channel list very, very often.

For this type of functionality to make it into the tree, it's going to have to be 'push' based, not 'pull'. There is just no way to make it efficient if each interested party has to pull the state information they need (see the problems we are already dealing with in app_voicemail).

By: Olle Johansson (oej) 2005-08-25 00:57:36

Ok, let us take this in 1.3, move it post 1.2. Agreed?

By: Frank Sautter (xylome) 2005-08-25 10:28:08

no problem for me putting this post 1.2
ASTERISK-3564 has to be in place for this making more sense
and it needs support for INVITE/Replace

By: Michael Jerris (mikej) 2005-12-01 13:41:23.000-0600

Can we please get an updated patch for this now.

By: Olle Johansson (oej) 2005-12-01 16:44:43.000-0600

We can not implement this patch as it is constructed now. The channel walk is to heavy a burden for each notify. Before doing this, the subscription system needs a serious overhaul.

By: Olle Johansson (oej) 2005-12-01 16:46:42.000-0600

Seems like the same patch is in two issues. Closing this in favour of 5014.