{"action":"opened","issue":{"url":"https://api.github.com/repos/sipwise/rtpengine/issues/659","repository_url":"https://api.github.com/repos/sipwise/rtpengine","labels_url":"https://api.github.com/repos/sipwise/rtpengine/issues/659/labels{/name}","comments_url":"https://api.github.com/repos/sipwise/rtpengine/issues/659/comments","events_url":"https://api.github.com/repos/sipwise/rtpengine/issues/659/events","html_url":"https://github.com/sipwise/rtpengine/issues/659","id":382119999,"node_id":"MDU6SXNzdWUzODIxMTk5OTk=","number":659,"title":"kamailio+rtpengine: There is audio in one direction and no audio in the other direction","user":{"login":"Sunldon","id":30169891,"node_id":"MDQ6VXNlcjMwMTY5ODkx","avatar_url":"https://avatars0.githubusercontent.com/u/30169891?v=4","gravatar_id":"","url":"https://api.github.com/users/Sunldon","html_url":"https://github.com/Sunldon","followers_url":"https://api.github.com/users/Sunldon/followers","following_url":"https://api.github.com/users/Sunldon/following{/other_user}","gists_url":"https://api.github.com/users/Sunldon/gists{/gist_id}","starred_url":"https://api.github.com/users/Sunldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sunldon/subscriptions","organizations_url":"https://api.github.com/users/Sunldon/orgs","repos_url":"https://api.github.com/users/Sunldon/repos","events_url":"https://api.github.com/users/Sunldon/events{/privacy}","received_events_url":"https://api.github.com/users/Sunldon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-19T09:15:12Z","updated_at":"2018-11-19T09:15:12Z","closed_at":null,"author_association":"NONE","body":"My kamailio version: kamailio 5.1.6 (x86_64/linux) e178b8\r\n\r\nthe kamailio + rtpengine work on the 10.10.200.77, and I use rtpengine as :./rtpengine -n 127.0.0.1:7722 --interface=pub/10.10.200.77 --interface=priv/192.168.200.77\r\n\r\nI have two softphone, one is in 10.10.18.203, two is 192.168.18.45. They have registered successfully in kamailio.\r\n\r\nwhen I start a call from 10.10.18.203(2001@10.10.18.203:63492) to 192.168.18.45(1001@192.168.18.45:5060), it can be acceptable. but the problem is that only one direction has audio, the other direction doesn't have audio.\r\n(2001@10.10.18.203:63492) <-->kamailio+rtpengine<-->(1001@192.168.18.45:5060)\r\n\r\nthe log is that:\r\n\r\nNov 19 16:56:00 localhost /usr/local/sbin/kamailio[45177]: {1 1 INVITE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: 11111111111111111111111111111111111111\r\nNov 19 16:56:00 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Received command 'offer' from 127.0.0.1:35763\r\nNov 19 16:56:00 localhost rtpengine[45092]: NOTICE: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Creating new call\r\nNov 19 16:56:00 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Replying to 'offer' from 127.0.0.1:35763 (elapsed time 0.000240 sec)\r\nNov 19 16:56:00 localhost /usr/local/sbin/kamailio[45198]: {2 1 INVITE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: 222222222222222222222222222222222222222\r\nNov 19 16:56:09 localhost /usr/local/sbin/kamailio[45187]: {2 1 INVITE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: 11111111111111111111111111111111111111\r\nNov 19 16:56:09 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Received command 'answer' from 127.0.0.1:45910\r\nNov 19 16:56:09 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Enabling transcoding engine\r\nNov 19 16:56:09 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Replying to 'answer' from 127.0.0.1:45910 (elapsed time 0.000228 sec)\r\nNov 19 16:56:09 localhost /usr/local/sbin/kamailio[45187]: {2 1 INVITE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} NOTICE: acc [acc.c:281]: acc_log_request(): ACC: transaction answered: timestamp=1542617769;method=INVITE;from_tag=124c1f5f;to_tag=ee68ec09;call_id=OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.;code=200;reason=OK;src_user=2001;src_domain=10.10.200.77;src_ip=10.10.18.203;dst_ouser=1001;dst_user=1001;dst_domain=192.168.18.45\r\nNov 19 16:56:09 localhost /usr/local/sbin/kamailio[45178]: {1 1 ACK OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: setflag flb_natb\r\nNov 19 16:56:09 localhost /usr/local/sbin/kamailio[45178]: {1 1 ACK OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: 222222222222222222222222222222222222222\r\nNov 19 16:56:13 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE. port 30020]: Confirmed peer address as 192.168.18.45:5062\r\nNov 19 16:56:15 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE. port 30021]: Confirmed peer address as 192.168.18.45:5063\r\nNov 19 16:56:17 localhost /usr/local/sbin/kamailio[45179]: {1 2 BYE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: setflag flb_natb\r\nNov 19 16:56:17 localhost /usr/local/sbin/kamailio[45179]: {1 2 BYE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} INFO: <script>: 222222222222222222222222222222222222222\r\nNov 19 16:56:17 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Received command 'delete' from 127.0.0.1:35540\r\nNov 19 16:56:17 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Scheduling deletion of call branch '124c1f5f' (via-branch '') in 30 seconds\r\nNov 19 16:56:17 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Replying to 'delete' from 127.0.0.1:35540 (elapsed time 0.000044 sec)\r\nNov 19 16:56:17 localhost /usr/local/sbin/kamailio[45191]: {2 2 BYE OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.} NOTICE: acc [acc.c:281]: acc_log_request(): ACC: transaction answered: **timestamp=1542617777;method=BYE;from_tag=124c1f5f;to_tag=ee68ec09;call_id=OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.;code=200;reason=OK;src_user=2001;src_domain=10.10.200.77;src_ip=10.10.18.203;dst_ouser=1001;dst_user=1001;dst_domain=192.168.18.45**\r\n\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Call branch '124c1f5f' (via-branch '') deleted, no more branches remaining\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: Final packet stats:\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --- Tag '124c1f5f', created 0:48 ago for branch '', in dialogue with 'ee68ec09'\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: ------ Media #1 (audio over RTP/AVP) using unknown codec\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- **Port  192.168.200.77:30032 <>    10.10.18.203:41298,** SSRC 0, 0 p, 0 b, 0 e, 48 ts\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- **Port  192.168.200.77:30033 <>    10.10.18.203:41299 (RTCP),** SSRC 0, 0 p, 0 b, 0 e, 48 ts\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --- Tag 'ee68ec09', created 0:48 ago for branch '', in dialogue with '124c1f5f'\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: ------ Media #1 (audio over RTP/AVP) using PCMU/8000\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- **Port  192.168.200.77:30020 <>   192.168.18.45:5062 ,** SSRC 46b1c234, 385 p, 66220 b, 0 e, 31 ts\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- **Port  192.168.200.77:30021 <>   192.168.18.45:5063  (RTCP),** SSRC 46b1c234, 4 p, 596 b, 0 e, 31 ts\r\n\r\nI think the problem is ::\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: ------ Media #1 (audio over RTP/AVP) using unknown codec\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- Port  192.168.200.77:30032 <>    10.10.18.203:41298, SSRC 0, 0 p, 0 b, 0 e, 48 ts\r\nNov 19 16:56:48 localhost rtpengine[45092]: INFO: [OGFkZDBjNTU2YzRkZmEwYTk2ZTY2YzgyOWM5ZGY4OWE.]: --------- Port  192.168.200.77:30033 <>    10.10.18.203:41299 (RTCP), SSRC 0, 0 p, 0 b, 0 e, 48 ts\r\n\r\nit should be \"Port  10.10..200.77:30032 <>    10.10.18.203:41298, SSRC 0, 0 p, 0 b, 0 e, 48 ts\", not \"Port  192.168.200.77:30032 <>    10.10.18.203:41298, SSRC 0, 0 p, 0 b, 0 e, 48 ts\".\r\n\r\nAnd my part of kamailio.cfg is as below:\r\nroute[NATMANAGE] {\r\n\r\n      #!ifdef WITH_NAT\r\n        if (is_request()) {\r\n                if(has_totag()) {\r\n                        if(check_route_param(\"nat=yes\")) {\r\n                                xinfo(\"setflag flb_natb\");\r\n                                setbflag(FLB_NATB);\r\n                        }\r\n                }\r\n        }\r\n\r\n        if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;\r\n\r\n        if(nat_uac_test(\"8\")) {\r\n                xinfo(\"11111111111111111111111111111111111111\");\r\n                rtpengine_manage(\"codec-strip-all codec-transcode-PCMA codec-transcode-PCMU codec-transcode-G729\");\r\n        } else {\r\n                xinfo(\"222222222222222222222222222222222222222\");\r\n                rtpengine_manage(\"codec-strip-all codec-transcode-PCMA codec-transcode-PCMU codec-transcode-G729 direction-priv direction-pub\");\r\n        }\r\n\r\n        if (is_request()) {\r\n                if (!has_totag()) {\r\n                        if(t_is_branch_route()) {\r\n                                add_rr_param(\";nat=yes\");\r\n                        }\r\n                }\r\n        }\r\n\r\n        if (is_reply()) {\r\n                if(isbflagset(FLB_NATB)) {\r\n                        if(is_first_hop())\r\n                                set_contact_alias();\r\n                }\r\n        }\r\n      #!endif\r\n\r\n        return;\r\n   }\r\n\r\nI don't know how to correctly rewrite the SDP body.  What's wrong with my configure file?"}}
{"actor":{"display_login":"Sunldon"}}