|Summary:||ASTERISK-12198: [patch] incorrect state update in friend nodes (chan_sip.c)|
|Reporter:||Luis Colorado (mojadita)||Labels:|
|Date Opened:||2008-06-15 15:52:26||Date Closed:||2011-06-07 14:07:46|
|Environment:||Attachments:||( 0) patch_-u_correct_state.patch|
|Description:||I have noticed that when devices are being monitored for NOTICE events, when two extensions call each other only the destination one is marked as busy. This issue was discovered with a Linksys SPA-962 with SPA-932 button attendant used to monitor the SIP extensions status.|
Following the code I have observed that when a call is being made from a sip friend, only the user part is being updated for state (on the calling side) but not the peer part for friends, and when it is consulted, only the peer part gets involved for status (and not the user part in case of a friend).
I have modified chan_sip.c to update the peer part for peers/friends and the user part for users only, and the sip_devicestate routine to do the same when asking for status. Now, both extensions (the calling and the called one) activate their busy lights when monitored.
I have published a patch to update the code as I don't have developer status, patch is at http://www.lcssl.es/~luis/asterisk_patches/patch_correct_state.patch
please, feel free to check it (it's been developed for 1.4.19, but it applies well on 1.4.20 and probably to 1.4.21, sorry for the inconvenience) and incorporate to the main trunk if possible (granted will be a mention of my two cents contribution, if possible) Feel free of checking it, as it's a very short one.
Thanks for your attention.
|Comments:||By: snuffy (snuffy) 2008-06-15 16:12:03|
You must sign a license agreement before digium can look at / and accept this code.
By: Luis Colorado (mojadita) 2008-06-16 04:14:24
I can sign it. Just send me the agreement text and procedure application via fax to +34 949276720 and I'll return it to you as soon as possible.
LUIS COLORADO SISTEMAS S.L.
By: Michiel van Baak (mvanbaak) 2008-06-16 04:19:22
You can sign it online.
In the menu on top of this website is a link to the online license application.
By: Luis Colorado (mojadita) 2008-06-16 04:20:56
Just signed it on the web page.
By: Joshua C. Colp (jcolp) 2008-06-16 07:09:53
Okay, now if you attach the patch we will be able to view it once your license is accepted.
By: Luis Colorado (mojadita) 2008-06-16 08:31:36
You cannot post code as a comment -moderator
By: snuffy (snuffy) 2008-06-17 09:40:51
I would make a suggestion that you follow coding guidelines.
That means even single line if/else's are within brackets
By: Luis Colorado (mojadita) 2008-06-17 13:43:41
Sorry, I don't know how to change the patch. I have modified it to follow the last recommendation of putting all the if/else code between curly brackets, but now I cannot upload the patch file. Any help please?
Need I to rename the file? Can I upload it again?
By: Olle Johansson (oej) 2008-07-03 11:30:41
This is already fixed. Se "limitonpeers" in your sip.conf.sample.