Im using the module RTPengine. im having issues when ever i try to do a call using SRTP im using microsip i have checked the SDP everything ok. But when ever i place the call it gets rejected. if i disable SRTP then the calls work
if (!rtpengine_offer("replace-origin replace-session-connection ICE=force RTP/SAVP RTP/AVP")) {
I only need to encrypt client -> proxy from proxy -> asterisk should be plain rtp i hope someone can help me out thank you.
The log in rtpengine shows this [1731055305.417896] ERR: [2a721ebf2c73414ab8e739d7bde912f9//1 port 14124]: [srtp] SRTP output wanted, but no crypto suite was negotiated
Hi,
how does sdp look like from client to kamailio and from kamailio to asterisk and backwards? I did the same and it works. Homer is very useful tool to analyze sip traffic, it helped me a lot to diagnose problems like this.
Peter
Feladó: Sajid Khan via sr-users sr-users@lists.kamailio.org Dátum: péntek, 2024. november 8. 12:42 Címzett: sr-users@lists.kamailio.org sr-users@lists.kamailio.org Másolatot kap: Sajid Khan khanasajidka85@gmail.com Tárgy: [SR-Users] Not able to use SRTP - from client to proxy Im using the module RTPengine. im having issues when ever i try to do a call using SRTP im using microsip i have checked the SDP everything ok. But when ever i place the call it gets rejected. if i disable SRTP then the calls work if (!rtpengine_offer("replace-origin replace-session-connection ICE=force RTP/SAVP RTP/AVP")) {
I only need to encrypt client -> proxy from proxy -> asterisk should be plain rtp i hope someone can help me out thank you.
The log in rtpengine shows this [1731055305.417896] ERR: [2a721ebf2c73414ab8e739d7bde912f9//1 port 14124]: [srtp] SRTP output wanted, but no crypto suite was negotiated
On more thing, i need to call rtpengine_answer also paired with rtpengine_offer, since no rtpengine_manage is used in this case. And the srtp should be switched on from proxy to client also, so i need to detect that the offer or answer comes from asterisk or goes towards asterisk and use RTP/SAVP or RTP/AVP paremeters in rtpengine_offer or answer. Rtpengine should made RTP->SRTP and SRTP->RTP switching also.
Dr. Barabás Péter egyéni vállalkozó, okleveles informatikus mérnök
Feladó: Péter Dr. Barabás dr.peter.barabas@gmail.com Dátum: péntek, 2024. november 8. 13:04 Címzett: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Másolatot kap: Sajid Khan khanasajidka85@gmail.com Tárgy: RE: [SR-Users] Not able to use SRTP - from client to proxy Hi,
how does sdp look like from client to kamailio and from kamailio to asterisk and backwards? I did the same and it works. Homer is very useful tool to analyze sip traffic, it helped me a lot to diagnose problems like this.
Peter
Feladó: Sajid Khan via sr-users sr-users@lists.kamailio.org Dátum: péntek, 2024. november 8. 12:42 Címzett: sr-users@lists.kamailio.org sr-users@lists.kamailio.org Másolatot kap: Sajid Khan khanasajidka85@gmail.com Tárgy: [SR-Users] Not able to use SRTP - from client to proxy Im using the module RTPengine. im having issues when ever i try to do a call using SRTP im using microsip i have checked the SDP everything ok. But when ever i place the call it gets rejected. if i disable SRTP then the calls work if (!rtpengine_offer("replace-origin replace-session-connection ICE=force RTP/SAVP RTP/AVP")) {
I only need to encrypt client -> proxy from proxy -> asterisk should be plain rtp i hope someone can help me out thank you.
The log in rtpengine shows this [1731055305.417896] ERR: [2a721ebf2c73414ab8e739d7bde912f9//1 port 14124]: [srtp] SRTP output wanted, but no crypto suite was negotiated
v=0 o=- 3940068289 3940068289 IN IP4 10.211.55.4 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4000 RTP/SAVP 8 0 101 c=IN IP4 10.211.55.4 b=TIAS:64000 a=rtcp:4001 IN IP4 10.211.55.4 a=sendrecv a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ssrc:456947851 cname:3b02129c45c402d7 a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:4k0KSFHjmiySr1Wbwx3Ld7fL27Jit3qbF2PG0VXg a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:3OS1plXz0Vn8S0psAbCPdBXRjB31oA0bvZPPF0wF
Asterisk -> Kamailio
2024/11/08 14:29:30.425896 XX -> XX SIP/2.0 401 Unauthorized Call-ID: d43fe0X From: "XXX3" sip:10817@XX;tag=d70a113556394cde89a94ae5de8877c2 To: sip:XXXX@XXX;tag=z9hG4bKebf4.b13b9b496793da6d70decd9bc6df170d.0 CSeq: 17644 INVITE WWW-Authenticate: Digest realm="asterisk",nonce="1731076221/5c44d062c5e2eee1d666es2d2882eb06e",opaque="054b171732bc9a79",algorithm=MD5,qop="auth" Content-Length: 0 Via: SIP/2.0/UDP 10.211.55.4:64058;rport=30177;received=XXXX;branch=z9hG4bKPjf722X642729d6b814c0f8fba03
After this i get rejected from asterisk request timeout
onreply_route
# If the response contains SDP, engage RTP handling if (has_body("application/sdp")) { rtpengine_answer("replace-origin replace-session-connection RTP/AVP ICE=force"); }
invite if (has_body("application/sdp")) { # Engage RTPProxy for media handling if (!rtpengine_offer("replace-origin replace-session-connection ICE=force RTP/SAVP RTP/AVP")) { xlog("L_ERR", "RTPProxy failed to manage media for INVITE from client IP $si\n"); send_reply("500", "Internal Server Error"); exit; } else { xlog("L_INFO", "RTPProxy managed media for INVITE. SDP rewritten.\n"); } }
On 08/11/2024 06.41, Sajid Khan via sr-users wrote:
Im using the module RTPengine. im having issues when ever i try to do a call using SRTP im using microsip i have checked the SDP everything ok. But when ever i place the call it gets rejected. if i disable SRTP then the calls work
if (!rtpengine_offer("replace-origin replace-session-connection ICE=force RTP/SAVP RTP/AVP")) {
Putting `RTP/SAVP RTP/AVP` into the offer flags is a bit of an oxymoron. Only one protocol can be set at a time. You set the protocol that ought to be used towards the client that will receive the offer (i.e. the outgoing SDP). In the answer you generally don't need to specify the protocol as the protocols are known already.
Cheers