[Home]

Summary:ASTERISK-16540: [patch] Registration of SIP phone denied on transport=unknown
Reporter:Private Name (falves11)Labels:
Date Opened:2010-08-10 21:24:10Date Closed:2010-08-17 16:37:46
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) issue_17829.diff
( 1) issue_17829.rev1.txt
( 2) sip.conf
Description:<--- SIP read from UDP:97.96.114.139:50568 --->
REGISTER sip:208.X.X.X> SIP/2.0
Via: SIP/2.0/UDP 192.168.1.111:50568;branch=z9hG4bK-d8754z-5a4146132a9ebf05-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:2127532626@97.X.X.X>:50568;transport=udp;rinstance=9afef6894cc65045>
To: "Balancer"<sip:2127532626@208.X.X.X>>
From: "Balancer"<sip:2127532626@208.X.X.X.>;tag=848b0213
Call-ID: NDUxMjkyNzQ0YWUyYjI5MzRjNGJmYTA5NGVhMTkxZGQ.
CSeq: 3 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1104g stamp 54685
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Sending to X.X.X.X: 50568 (NAT)
[Aug 10 22:17:12] ERROR[16325]: chan_sip.c:13129 register_verify: 'UDP' is not a valid transport for '2127532626'. we only use 'UNKNOWN'! ending call.

<--- Transmitting (NAT) to X.X.X.X:50568 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.1.111:50568;branch=z9hG4bK-d8754z-5a4146132a9ebf05-1---d8754z-;received=97.96.114.139;rport=50568
From: "Balancer"<sip:2127532626@X.X.X.X>;tag=848b0213
To: "Balancer"<sip:2127532626@X.X.X.X>;tag=as7f0d7036
Call-ID: NDUxMjkyNzQ0YWUyYjI5MzRjNGJmYTA5NGVhMTkxZGQ.
CSeq: 3 REGISTER
Server: Cisco 3845
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Date: Wed, 11 Aug 2010 02:17:12 GMT
Content-Length: 0


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

My sip.conf has the proper line
transport=udp
and the command "sip show settings" shows

Default Settings:
-----------------
 Allowed transports:     UDP
 Outbound transport:  UDP
 Context:                default

Comments:By: Russell Bryant (russell) 2010-08-10 22:25:06

Please provide both the options used in the [general] section, as well as the full type=peer section related to this registration attempt.

By: Private Name (falves11) 2010-08-11 03:26:50

I uploaded my sip.conf. There are no peers in the application. Sip.conf has autocreatepeers=yes. Any sip device may register freely.

By: Elazar Broad (ebroad) 2010-08-12 11:57:48

In temp_peer() (chan_sip.c) can you change:

struct sip_peer *peer;

to

struct sip_peer *peer = NULL;

By: Private Name (falves11) 2010-08-12 12:01:25

thanks for the solution provided, but can we make it into a permanent patch?

By: Elazar Broad (ebroad) 2010-08-12 12:05:11

Did it work?

By: Private Name (falves11) 2010-08-12 12:07:53

don't know yet. I will let you know as soon as I can access the server.

By: Russell Bryant (russell) 2010-08-12 14:50:22

I don't think that change to temp_peer() is going to make a difference.  I think the fix is that setting a default value for the allowed transports need to be set in set_peer_defaults().

By: Elazar Broad (ebroad) 2010-08-12 14:52:42

I thought so too, but shouldn't peer->expire always == 0? If so, the transport should get set in set_peer_defaults()(the if{} block at the top).

By: Russell Bryant (russell) 2010-08-12 14:54:27

Here's a patch to show what I was thinking.  I haven't had time to test it, though.

By: Private Name (falves11) 2010-08-12 15:14:11

I confirm that the patch work perfectly. Many thanks.

By: Digium Subversion (svnbot) 2010-08-17 16:35:16

Repository: asterisk
Revision: 282576

U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r282576 | dvossel | 2010-08-17 16:35:15 -0500 (Tue, 17 Aug 2010) | 9 lines

fixes no default transport for temp peer creation in chan_sip

(closes issue ASTERISK-16540)
Reported by: falves11
Patches:
     issue_17829.rev1.txt uploaded by russell (license 2)
     issue_17829.diff uploaded by dvossel (license 671)
Tested by: falves11

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

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

By: Digium Subversion (svnbot) 2010-08-17 16:36:55

Repository: asterisk
Revision: 282577

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

------------------------------------------------------------------------
r282577 | dvossel | 2010-08-17 16:36:55 -0500 (Tue, 17 Aug 2010) | 16 lines

Merged revisions 282576 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r282576 | dvossel | 2010-08-17 16:35:17 -0500 (Tue, 17 Aug 2010) | 9 lines
 
 fixes no default transport for temp peer creation in chan_sip
 
 (closes issue ASTERISK-16540)
 Reported by: falves11
 Patches:
       issue_17829.rev1.txt uploaded by russell (license 2)
       issue_17829.diff uploaded by dvossel (license 671)
 Tested by: falves11
........

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

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

By: Digium Subversion (svnbot) 2010-08-17 16:37:45

Repository: asterisk
Revision: 282578

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r282578 | dvossel | 2010-08-17 16:37:45 -0500 (Tue, 17 Aug 2010) | 23 lines

Merged revisions 282577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r282577 | dvossel | 2010-08-17 16:36:57 -0500 (Tue, 17 Aug 2010) | 16 lines
 
 Merged revisions 282576 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r282576 | dvossel | 2010-08-17 16:35:17 -0500 (Tue, 17 Aug 2010) | 9 lines
   
   fixes no default transport for temp peer creation in chan_sip
   
   (closes issue ASTERISK-16540)
   Reported by: falves11
   Patches:
         issue_17829.rev1.txt uploaded by russell (license 2)
         issue_17829.diff uploaded by dvossel (license 671)
   Tested by: falves11
 ........
................

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

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