[Home]

Summary:ASTERISK-13741: [patch] MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port (5060)
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2009-03-13 06:00:24Date Closed:2009-06-24 11:49:56
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mwi_port-transport_trunk.diff
( 1) patch_chan_sip_fixMWIuri_1.4.txt
Description:Hi! The MWI Message-Account URI does not contain the port - which is wrong if a non-standard port is used. Attached patch fixes this.

****** ADDITIONAL INFORMATION ******

The bug is also present in 1.6 and trunk and the above patch fixes this issue also in >=1.6.

But in >=1.6 as there is now also different transport protocols (TCP,TLS) which would require adding transport=.... parameter too.
Comments:By: David Vossel (dvossel) 2009-06-19 17:39:13

do you have any plans to make a patch for trunk including the transport field?

By: klaus3000 (klaus3000) 2009-06-20 11:27:26

No. Unfortunately I am not familiar with the new transport options in chan_sip.

By: David Vossel (dvossel) 2009-06-22 12:08:52

I've spent some time investigating this and it doesn't appear that the URI in the Message-Account field is meant to be a reachable URI used for dialing.  It seems to just identify the account the MWI is for.  I could be wrong, but I see no evidence of this being required in RFC 3842.  

Was this causing any problems for you?  I'm just curious how this came to your attention.

By: klaus3000 (klaus3000) 2009-06-22 12:43:58

Good point!

Yes, I had problems. SNOM uses this URI when the user presses the Voicemail button.

Regarding the RFC: I think it depends on the setup. For example, sip:user@domain and sip:user@domain:1234;transport=tcp are both valid SIP accounts. If domain is resolved (by using NAPTR/SRV records) to port 1234 and TCP, probably there are routed identically, but from an external points of view they address to different SIP accounts.

So, if an Asterisk setup uses NAPTR/SRV there is no need to include the port/transport. But if NAPTR/SRV are not used, it is necessary to specify port and transport manually.

> ... It seems to just identify the account the MWI is for...

I think this is correct - but the account can have port/transport.

If there are NAPTRs/SRVs, the SIP AoR would be "sip:user@domain". If there are no NAPTRs/SRVs, the SIP AoR would be "sip:user@domain:port;transport=...".

Now there is the problem: How should Asterisk now if there are NAPTRs/SRVs which point to the non-standard port? Maybe a sip.conf option is needed to tell Asterisk that the port/transport is part of the SIP AoR (the Message-Account).

By: Digium Subversion (svnbot) 2009-06-23 11:28:47

Repository: asterisk
Revision: 202671

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r202671 | dvossel | 2009-06-23 11:28:47 -0500 (Tue, 23 Jun 2009) | 12 lines

MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport

(closes issue ASTERISK-13741)
Reported by: klaus3000
Patches:
     patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
     mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
Tested by: dvossel, klaus3000

Review: https://reviewboard.asterisk.org/r/288/


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

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

By: Digium Subversion (svnbot) 2009-06-23 11:31:31

Repository: asterisk
Revision: 202672

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r202672 | dvossel | 2009-06-23 11:31:30 -0500 (Tue, 23 Jun 2009) | 18 lines

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

........
 r202671 | dvossel | 2009-06-23 11:28:46 -0500 (Tue, 23 Jun 2009) | 12 lines
 
 MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport
 
 (closes issue ASTERISK-13741)
 Reported by: klaus3000
 Patches:
       patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
       mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
 Tested by: dvossel, klaus3000
 
 Review: https://reviewboard.asterisk.org/r/288/
........

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

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

By: Digium Subversion (svnbot) 2009-06-23 11:33:19

Repository: asterisk
Revision: 202673

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

------------------------------------------------------------------------
r202673 | dvossel | 2009-06-23 11:33:18 -0500 (Tue, 23 Jun 2009) | 25 lines

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

................
 r202672 | dvossel | 2009-06-23 11:31:30 -0500 (Tue, 23 Jun 2009) | 18 lines
 
 Merged revisions 202671 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r202671 | dvossel | 2009-06-23 11:28:46 -0500 (Tue, 23 Jun 2009) | 12 lines
   
   MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport
   
   (closes issue ASTERISK-13741)
   Reported by: klaus3000
   Patches:
         patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
         mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
   Tested by: dvossel, klaus3000
   
   Review: https://reviewboard.asterisk.org/r/288/
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-06-23 11:34:46

Repository: asterisk
Revision: 202674

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

------------------------------------------------------------------------
r202674 | dvossel | 2009-06-23 11:34:46 -0500 (Tue, 23 Jun 2009) | 25 lines

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

................
 r202672 | dvossel | 2009-06-23 11:31:30 -0500 (Tue, 23 Jun 2009) | 18 lines
 
 Merged revisions 202671 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r202671 | dvossel | 2009-06-23 11:28:46 -0500 (Tue, 23 Jun 2009) | 12 lines
   
   MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport
   
   (closes issue ASTERISK-13741)
   Reported by: klaus3000
   Patches:
         patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
         mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
   Tested by: dvossel, klaus3000
   
   Review: https://reviewboard.asterisk.org/r/288/
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-06-23 11:40:16

Repository: asterisk
Revision: 202675

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

------------------------------------------------------------------------
r202675 | dvossel | 2009-06-23 11:40:15 -0500 (Tue, 23 Jun 2009) | 25 lines

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

................
 r202672 | dvossel | 2009-06-23 11:31:30 -0500 (Tue, 23 Jun 2009) | 18 lines
 
 Merged revisions 202671 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r202671 | dvossel | 2009-06-23 11:28:46 -0500 (Tue, 23 Jun 2009) | 12 lines
   
   MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport
   
   (closes issue ASTERISK-13741)
   Reported by: klaus3000
   Patches:
         patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
         mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
   Tested by: dvossel, klaus3000
   
   Review: https://reviewboard.asterisk.org/r/288/
 ........
................

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

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