Asterisk srtp config

Asterisk SRTP config

i installed asterisk with srtp. i have configured sip.conf and extensions.conf like

extensions.conf
main
exten => 600,1,Set(_SIPSRTP=optional)
exten => 600,n,Set(_SIPSRTP_CRYPTO=enable)
exten => 600,n,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,n,Echo ; Do the echo test
exten => 600,n,Playback(demo-echodone) ; Let them know it’s over
exten => 600,n,hangup

exten => 610,1,Set(_SIPSRTP=require)
exten => 610,n,Set(_SIPSRTP_MIKEY=enable)
exten => 610,n,Playback(demo-echotest) ; Let them know what’s going on
exten => 610,n,Echo ; Do the echo test
exten => 610,n,Playback(demo-echodone) ; Let them know it’s over
exten => 610,n,hangup

exten => 700, 1, Set(_SIP_SRTP_SDES=1)
exten => 700, n, Set(_SIPSRTP=optional)
exten => 700, n, Set(_SIPSRTP_CRYPTO=enable)
exten => 700, n, Dial(SIP/700)

exten => 701, 1, Set(_SIP_SRTP_SDES=1)
exten => 701, n, Set(_SIPSRTP=optional)
exten => 701, n, Set(_SIPSRTP_CRYPTO=enable)
exten => 701, n, Dial(SIP/701)

sip.conf

700
type=friend
username=700
context=main
host=dynamic
secret=700
canreinvite=no
nat=yes

701
type=friend
username=701
context=main
host=dynamic
secret=701
canreinvite=no
nat=yes

and i used grandstream GXP2020 telephones. when i dial 600 it is succesful and i am getting my echo but when i dial 700 it says call failed reason code : 603

Is there anybody who can help me.

Well I have not got i to work for $%& yet. I keep getting a ‘[Aug 26 16:54:22] WARNING[27625]: chan_sip.c:7090 process_sdp: Unsupported SDP media type in offer: audio 3000 RTP/SAVP 18 101’ error.

However, I believe 600 is working in your case since you are not sending that to an extension.

700 is defined in your sip.conf and I believe it needs a srtpcapable=yes added to it.

That might get it to work. You should probably have it in the general. If you already have it in the general, then I have no idea why 600 would work and 700 would not.

:unamused:

I just noticed that you posted that a year ago. Probably figured it out already. Nevermind.