[Home]

Summary:ASTERISK-16811: SRTP enable disable from dialplan
Reporter:Chodorenko Michail (chodorenko)Labels:
Date Opened:2010-10-14 07:17:35Date Closed:2010-10-22 12:24:05
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_srtp
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:variable
secure_bridge_signaling
secure_bridge_media
secure_signaling
secure_media

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

two grandstream GXP-2000 SRTP enable and forced
Asterisk 1.8-rc3

sip.conf
[test] and [test2]
secret=...
host=dynamic
type=friend
encryption=yes

extensions.conf
exten => 8888,1,NOOP(SRTP CALLS)
exten => 8888,n,Set(_SIPSRTP_CRYPTO=enable)
exten => 8888,n,Set(CHANNEL(secure_bridge_signaling)=1)
exten => 8888,n,Set(CHANNEL(secure_bridge_media)=1)
exten => 8888,n,Dial(sip/test2)

Problem:

   -- Executing [8888@default:3] Set("SIP/test2-0000003f", "CHANNEL(secure_bridge_signaling)=1") in new stack
[Oct 14 13:17:29] WARNING[19104]: func_channel.c:491 func_channel_write_real: Unknown or unavailable item requested: 'secure_bridge_signaling'
[Oct 14 13:17:29] NOTICE[19104]: chan_sip.c:4052 sip_setoption: Unknown option: 9
   -- Executing [8888@default:4] Set("SIP/test2-0000003f", "CHANNEL(secure_bridge_media)=1") in new stack
[Oct 14 13:17:29] WARNING[19104]: func_channel.c:491 func_channel_write_real: Unknown or unavailable item requested: 'secure_bridge_media'
[Oct 14 13:17:29] NOTICE[19104]: chan_sip.c:4052 sip_setoption: Unknown option: 9
Comments:By: Chodorenko Michail (chodorenko) 2010-10-14 09:48:32

Dialplan :
exten => 8888,1,NOOP(TEST CALL)
exten => 8888,n,Set(_SIPSRTP_CRYPTO=enable)
exten => 8888,n,Noop(secure_signaling: ${CHANNEL(secure_signaling)})
exten => 8888,n,Noop(secure_media: ${CHANNEL(secure_media)})
exten => 8888,n,Noop(secure_brige_signaling: ${CHANNEL(secure_brige_signaling)})
exten => 8888,n,Noop(secure_brige_media: ${CHANNEL(secure_brige_media)})

exten => 8888,n,Set(CHANNEL(secure_bridge_media)=0)

exten => 8888,n,Noop(secure_signaling: ${CHANNEL(secure_signaling)}).
exten => 8888,n,Noop(secure_media: ${CHANNEL(secure_media)}).
exten => 8888,n,Noop(secure_brige_signaling: ${CHANNEL(secure_brige_signaling)}).
exten => 8888,n,Noop(secure_brige_media: ${CHANNEL(secure_brige_media)}).


exten => 8888,n,DIAL(SIP/test)


cli log:  

-- Executing [8888@default:1] NoOp("SIP/test2-0000005f", "TEST CALL") in new stack
   -- Executing [8888@default:2] Set("SIP/test2-0000005f", "_SIPSRTP_CRYPTO=enable") in new stack
   -- Executing [8888@default:3] NoOp("SIP/test2-0000005f", "secure_signaling: ") in new stack
   -- Executing [8888@default:4] NoOp("SIP/test2-0000005f", "secure_media: 1") in new stack
[Oct 14 17:04:58] WARNING[19465]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'secure_brige_signaling'
   -- Executing [8888@default:5] NoOp("SIP/test2-0000005f", "secure_brige_signaling: ") in new stack
[Oct 14 17:04:58] WARNING[19465]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'secure_brige_media'
   -- Executing [8888@default:6] NoOp("SIP/test2-0000005f", "secure_brige_media: ") in new stack
   -- Executing [8888@default:7] Set("SIP/test2-0000005f", "CHANNEL(secure_bridge_media)=0") in new stack
[Oct 14 17:04:58] NOTICE[19465]: chan_sip.c:4052 sip_setoption: Unknown option: 9
   -- Executing [8888@default:8] NoOp("SIP/test2-0000005f", "secure_signaling: ") in new stack
   -- Executing [8888@default:9] NoOp("SIP/test2-0000005f", "secure_media: 1") in new stack
[Oct 14 17:04:58] WARNING[19465]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'secure_brige_signaling'
   -- Executing [8888@default:10] NoOp("SIP/test2-0000005f", "secure_brige_signaling: ") in new stack
[Oct 14 17:04:58] WARNING[19465]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'secure_brige_media'
   -- Executing [8888@default:11] NoOp("SIP/test2-0000005f", "secure_brige_media: ") in new stack
   -- Executing [8888@default:12] Dial("SIP/test2-0000005f", "SIP/test") in new stack
 == Using SIP RTP CoS mark 5
   -- Called test
   -- SIP/test-00000060 is ringing
 == Spawn extension (default, 8888, 12) exited non-zero on 'SIP/test2-0000005f'

By: Chodorenko Michail (chodorenko) 2010-10-14 09:53:49

TOTAL :
1. if set CHANNEL(secure_bridge_media)=0 i retrive error chan_sip.c:4052 sip_setoption: Unknown option: 9
and call to remote party go not encrypted

2. Variable secure_media is 1 and before and after change secure_bridge_media

3. Secure_brige_media, secure_brige_signaling - Unknown or unavailable item requested

4. Change value of secure_bridge_media is error chan_sip.c:4052 sip_setoption: Unknown option: 9

Why ?



By: Walter Doekes (wdoekes) 2010-10-19 05:32:39

3: s/secure_brige_/secure_bridge_/

4: ast_channel_setoption calls AST_OPTION_CHANNEL_WRITE.. perhaps that should be AST_OPTION_SECURE_SIGNALING in the secure_.._signaling case

By: Chodorenko Michail (chodorenko) 2010-10-19 06:56:37

I have tried it in rc5 and its still present

By: Terry Wilson (twilson) 2010-10-19 11:04:12

1) _SIPSRTP_CRYPTO is no longer used.
2) You are misspelling "bridge" as "brige", that is why you are getting the error.

By: Terry Wilson (twilson) 2010-10-19 11:06:43

Closing due to the error being a misspelling in the dialplan.

By: Chodorenko Michail (chodorenko) 2010-10-19 13:24:02

Yes , misspelling is my Bug , also i not retrieve answer on all bugs

1.1     -- Executing [8888@default:7] Set("SIP/test2-0000005f", "CHANNEL(secure_bridge_media)=0") in new stack
[Oct 14 17:04:58] NOTICE[19465]: chan_sip.c:4052 sip_setoption: Unknown option: 9

Why ? its example of secure-call.tex

2.2 Variable secure_media is 1 and before and after change secure_bridge_media
Please note that the call after "CHANNEL(secure_bridge_media)=0" go unencrypted Although the appointment of a variable passed with error

new
5. quote=>twilson > _SIPSRTP_CRYPTO is no longer used.
in res_srtp.c header present indication of the need to use, please correct this and give link to manual in code
6. "sip show peer NAME" do not report capability peer of encryption and setting encryption

Please Sorry me by Spell error in configs in previous report

By: Terry Wilson (twilson) 2010-10-19 14:08:51

1.1 The "Unknown option: 9" log message shows up with any CHANNEL() write to a SIP channel. I think there are other bugs open about this, and someone else is working on it. The log message will most like just be deleted. It doesn't affect any function so can be safely ignored for now.

2.2 See 1.1

5. Documentation for SRTP is in secure-call.tex. I'll go ahead and clean up the source. The original patch was changed many times and the comment is from a previous version.

6. I'll go ahead and add that too.

By: Digium Subversion (svnbot) 2010-10-19 14:27:33

Repository: asterisk
Revision: 292309

U   branches/1.8/channels/chan_sip.c
U   branches/1.8/res/res_srtp.c

------------------------------------------------------------------------
r292309 | twilson | 2010-10-19 14:27:33 -0500 (Tue, 19 Oct 2010) | 10 lines

Add sip show peer info about crypto and remove dated comment

This patch adds information about the encryption setting to 'sip show
peers' and removes an out-of-date comment from res_srtp.c and instead
directs users to the proper documentation.

(closes issue ASTERISK-16811)
Reported by: chodorenko


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

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

By: Digium Subversion (svnbot) 2010-10-19 14:35:25

Repository: asterisk
Revision: 292310

_U  trunk/
U   trunk/channels/chan_sip.c
U   trunk/res/res_srtp.c

------------------------------------------------------------------------
r292310 | twilson | 2010-10-19 14:35:24 -0500 (Tue, 19 Oct 2010) | 16 lines

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

........
 r292309 | twilson | 2010-10-19 12:27:32 -0700 (Tue, 19 Oct 2010) | 10 lines
 
 Add sip show peer info about crypto and remove dated comment
 
 This patch adds information about the encryption setting to 'sip show
 peers' and removes an out-of-date comment from res_srtp.c and instead
 directs users to the proper documentation.
 
 (closes issue ASTERISK-16811)
 Reported by: chodorenko
........

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

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