{"action":"created","issue":{"url":"https://api.github.com/repos/sipwise/rtpengine/issues/102","labels_url":"https://api.github.com/repos/sipwise/rtpengine/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/sipwise/rtpengine/issues/102/comments","events_url":"https://api.github.com/repos/sipwise/rtpengine/issues/102/events","html_url":"https://github.com/sipwise/rtpengine/issues/102","id":70218592,"number":102,"title":"Aastra + SRTP/RTP no audio after hold","user":{"login":"GGGO","id":1191822,"avatar_url":"https://avatars.githubusercontent.com/u/1191822?v=3","gravatar_id":"","url":"https://api.github.com/users/GGGO","html_url":"https://github.com/GGGO","followers_url":"https://api.github.com/users/GGGO/followers","following_url":"https://api.github.com/users/GGGO/following{/other_user}","gists_url":"https://api.github.com/users/GGGO/gists{/gist_id}","starred_url":"https://api.github.com/users/GGGO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GGGO/subscriptions","organizations_url":"https://api.github.com/users/GGGO/orgs","repos_url":"https://api.github.com/users/GGGO/repos","events_url":"https://api.github.com/users/GGGO/events{/privacy}","received_events_url":"https://api.github.com/users/GGGO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-22T19:49:32Z","updated_at":"2015-04-23T18:56:54Z","closed_at":null,"body":"Hi Richard,\r\n\r\nwe already talked about it, and I would like to create an issue for it.\r\n\r\nAastra ---SRTP---> rtpengine ---RTP---> rtpproxy---RTP--->asterisk\r\n\r\nNote: rtpproxy will be removed soon, but for now I can't.\r\n\r\nThe problem is the following:\r\nA calls B(Aastra), B(Aastra) answers A, \r\nB(Aastra) receives another call from C, B(Aastra) puts on hold A and answers C\r\nB(Aastra) put on hold C and comes back to A\r\nAnd now B(Aastra) can't hear A, but A can hear B(Aastra)\r\n\r\nWhen I listen the call recording in asterisk, I can hear A and B(Aastra), so audio arrive without any problem.\r\n\r\nIt's difficult to reproduce the problem, I could make 10 or more tests without seing it.\r\nIt's happens sometimes for whatever reason.\r\n\r\nBut I've found this https://issues.asterisk.org/jira/browse/ASTERISK-20194, and it appears to be the same problem I have. Matt Jordan resolved it by applying 2 patches. See srtp_patches.diff\r\n\r\nIt seems Aastra change its crypto key, and I think rtpengine doesn't reset the crypto key if the endpoint hasn't change. So rtpengine will use on old crypto key, and Aastra will never success to decrypt the audio.\r\n\r\nstatic void __fill_stream(struct packet_stream *ps, const struct endpoint *epp, unsigned int port_off) {\r\n\tstruct endpoint ep;\r\n\r\n\tep = *epp;\r\n\tep.port += port_off;\r\n\r\n\t/* if the endpoint hasn't changed, we do nothing */\r\n\tif (PS_ISSET(ps, FILLED) && !memcmp(&ps->advertised_endpoint, &ep, sizeof(ep)))\r\n\t\treturn;\r\n\r\n\tps->endpoint = ep;\r\n\tps->advertised_endpoint = ep;\r\n\t/* we reset crypto params whenever the endpoint changes */\r\n\tcrypto_reset(&ps->crypto);\r\n\tdtls_shutdown(ps);\r\n\tPS_SET(ps, FILLED);\r\n}\r\n\r\nMaybe we need to keep the remote crypto key somewhere in the rtpengine session, and if the crypto has changed, we reset it ?"},"comment":{"url":"https://api.github.com/repos/sipwise/rtpengine/issues/comments/95685551","html_url":"https://github.com/sipwise/rtpengine/issues/102#issuecomment-95685551","issue_url":"https://api.github.com/repos/sipwise/rtpengine/issues/102","id":95685551,"user":{"login":"marcantonio","id":942893,"avatar_url":"https://avatars.githubusercontent.com/u/942893?v=3","gravatar_id":"","url":"https://api.github.com/users/marcantonio","html_url":"https://github.com/marcantonio","followers_url":"https://api.github.com/users/marcantonio/followers","following_url":"https://api.github.com/users/marcantonio/following{/other_user}","gists_url":"https://api.github.com/users/marcantonio/gists{/gist_id}","starred_url":"https://api.github.com/users/marcantonio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcantonio/subscriptions","organizations_url":"https://api.github.com/users/marcantonio/orgs","repos_url":"https://api.github.com/users/marcantonio/repos","events_url":"https://api.github.com/users/marcantonio/events{/privacy}","received_events_url":"https://api.github.com/users/marcantonio/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T18:56:54Z","updated_at":"2015-04-23T18:56:54Z","body":"We are also seeing this issue with WebRTC clients and rtpengine."}}