[Home]

Summary:ASTERISK-13543: [patch] registration query
Reporter:Ravindra Devadiga (ravindrad)Labels:
Date Opened:2009-02-09 10:00:10.000-0600Date Closed:2009-09-15 11:23:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) nickcomment-regquery.patch
( 1) patchregquery
( 2) regquerypatch
( 3) updatepatchregquery
Description:Registration query does not send the contact header field back with expire field, instead it sends the Address of record.
Comments:By: Ravindra Devadiga (ravindrad) 2009-02-09 10:04:05.000-0600

In Asterisk as of now whenever a sip registry is queried it sends the response back with the Address Of Record uri with the expire field in the contact. But normally whenever the register query was made it should always send the contact of the UA with the expire field in the invite message.



By: Leif Madsen (lmadsen) 2009-02-13 13:33:18.000-0600

Heya Nick,

Does this sound like any of the issues you currently have open? Not sure why, my gut is telling me this is related to something you already have open.

Thanks!

By: nick_lewis (nick_lewis) 2009-02-19 10:41:40.000-0600

There does not seem to be any relationship to issues I currently have open. My issues relate to outbound registrations whereas this concerns inbound registrations.

Regarding the patch I think that two lines that make the Expires header may have accidentally been left outside a condition as well as being moved inside a condition. Also the char contact can be more conditional.

By: Leif Madsen (lmadsen) 2009-02-19 12:20:21.000-0600

Thanks for following up Nick!

By: Olle Johansson (oej) 2009-02-19 12:28:00.000-0600

I see the problem, but think the patch could be improved. Adding duplicate code seems a bit too messy.

By: Ravindra Devadiga (ravindrad) 2009-02-20 07:26:28.000-0600

Thanks for the comments. Patch updated with those duplicated code are now removed. Those two lines that makes expiry header got accidentally left with the code and now it is been rectified.

By: Olle Johansson (oej) 2009-02-20 07:28:41.000-0600

I still don't agree with the patch, but agree that there's a problem. Will look at this next week and see what I can do. Thanks for your work and your report!

By: Leif Madsen (lmadsen) 2009-02-20 07:44:05.000-0600

oej: what don't you like about the patch? Perhaps the reporter can take that information and rework the patch.

By: Olle Johansson (oej) 2009-02-20 07:51:17.000-0600

Sorry, but don't have time to go through the code right now. Yesterday I noticed that we do have support for reg queries but resprep did not handle that or anything else properly.

1. Check normal reg - do we return the fullcontact
2. Fix that
3. Check reg query

I suspect the problem is not reg queries but ALL registrations

By: Ravindra Devadiga (ravindrad) 2009-02-21 04:41:41.000-0600

Have a look at the latest patch. The registrations and queries are handled more accurately so that it always returns the contact now.

By: Leif Madsen (lmadsen) 2009-07-01 08:25:51

Heya Mark!

If you have some time, think you could review the latest patch here and see what else may need to be done? The reporter seems quite responsive, but just needs some feedback to move this forward.

Thanks!

By: Mark Michelson (mmichelson) 2009-07-01 10:22:22

lmadsen: The patch seems fine by me, but I would like oej to take a look at it too since he was raising objections to earlier versions of patches.

By: nick_lewis (nick_lewis) 2009-07-01 11:00:34

This patch looks to be a slick fix. If I were to add a minor unsolicited comment it would be regarding unnecessary changes to the blank lines.

On a wider point, with this change from AOR to Contact, does there perhaps need to be an opportunity to insert multiple contact headers to support forking

By: Olle Johansson (oej) 2009-09-03 15:02:58

Nick: Don't open the forking can of worms again - we've discussed that many times a month on multiple mailing lists... Please. No forking in channel drivers. Period. Asterisk is a PBX.

I will have to test this and have time, adding it to my todo list and assigning it to myself.

By: Digium Subversion (svnbot) 2009-09-15 11:05:31

Repository: asterisk
Revision: 218578

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r218578 | mnicholson | 2009-09-15 11:05:31 -0500 (Tue, 15 Sep 2009) | 8 lines

Send request contact header field with response to registrer queries instead of the address of record.

(closes issue ASTERISK-13543)
Reported by: ravindrad
Patches:
     regquerypatch uploaded by ravindrad (license 684)
Tested by: ravindrad

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218578

By: Digium Subversion (svnbot) 2009-09-15 11:16:40

Repository: asterisk
Revision: 218586

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r218586 | mnicholson | 2009-09-15 11:16:39 -0500 (Tue, 15 Sep 2009) | 15 lines

Merged revisions 218578 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r218578 | mnicholson | 2009-09-15 11:03:54 -0500 (Tue, 15 Sep 2009) | 8 lines
 
 Send request contact header field with response to registrer queries instead of the address of record.
 
 (closes issue ASTERISK-13543)
 Reported by: ravindrad
 Patches:
       regquerypatch uploaded by ravindrad (license 684)
 Tested by: ravindrad
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218586

By: Digium Subversion (svnbot) 2009-09-15 11:19:44

Repository: asterisk
Revision: 218590

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r218590 | mnicholson | 2009-09-15 11:19:44 -0500 (Tue, 15 Sep 2009) | 22 lines

Merged revisions 218586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218586 | mnicholson | 2009-09-15 11:15:02 -0500 (Tue, 15 Sep 2009) | 15 lines
 
 Merged revisions 218578 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218578 | mnicholson | 2009-09-15 11:03:54 -0500 (Tue, 15 Sep 2009) | 8 lines
   
   Send request contact header field with response to registrer queries instead of the address of record.
   
   (closes issue ASTERISK-13543)
   Reported by: ravindrad
   Patches:
         regquerypatch uploaded by ravindrad (license 684)
   Tested by: ravindrad
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218590

By: Digium Subversion (svnbot) 2009-09-15 11:20:11

Repository: asterisk
Revision: 218592

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r218592 | mnicholson | 2009-09-15 11:20:10 -0500 (Tue, 15 Sep 2009) | 22 lines

Merged revisions 218586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218586 | mnicholson | 2009-09-15 11:15:02 -0500 (Tue, 15 Sep 2009) | 15 lines
 
 Merged revisions 218578 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218578 | mnicholson | 2009-09-15 11:03:54 -0500 (Tue, 15 Sep 2009) | 8 lines
   
   Send request contact header field with response to registrer queries instead of the address of record.
   
   (closes issue ASTERISK-13543)
   Reported by: ravindrad
   Patches:
         regquerypatch uploaded by ravindrad (license 684)
   Tested by: ravindrad
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218592

By: Digium Subversion (svnbot) 2009-09-15 11:23:02

Repository: asterisk
Revision: 218601

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r218601 | mnicholson | 2009-09-15 11:23:01 -0500 (Tue, 15 Sep 2009) | 22 lines

Merged revisions 218586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218586 | mnicholson | 2009-09-15 11:15:02 -0500 (Tue, 15 Sep 2009) | 15 lines
 
 Merged revisions 218578 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218578 | mnicholson | 2009-09-15 11:03:54 -0500 (Tue, 15 Sep 2009) | 8 lines
   
   Send request contact header field with response to registrer queries instead of the address of record.
   
   (closes issue ASTERISK-13543)
   Reported by: ravindrad
   Patches:
         regquerypatch uploaded by ravindrad (license 684)
   Tested by: ravindrad
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218601