{"id":488,"date":"2011-11-29T14:36:08","date_gmt":"2011-11-29T13:36:08","guid":{"rendered":""},"modified":"2018-11-01T00:56:05","modified_gmt":"2018-10-31T23:56:05","slug":"rtp-proxy-kamailio-32-configuration-debian-squeeze","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/rtp-proxy-kamailio-32-configuration-debian-squeeze\/","title":{"rendered":"RTP Proxy with Kamailio 3.2 configuration on Debian Squeeze"},"content":{"rendered":"<p>This guide describes Kamailio 3.2 configuration with RTP Proxy.<\/p>\n<p>Requirements:<\/p>\n<ul>\n<li>\n\t\tKamailio 3.2 (clean install wtih mysql for auth and usrloc in my case)<\/p>\n<ul>\n<li>\n\t\t\t\tfollow guide&nbsp;<a href=\"https:\/\/nil.uniza.sk\/en\/sip\/kamailio\/adding-mysql-support-kamailio-31-debian-lenny\/\">https:\/\/nil.uniza.sk\/sip\/kamailio\/adding-mysql-support-kamailio-31-debian-lenny<\/a><\/p>\n<ul>\n<li>\n\t\t\t\t\t\tthis guide is for Kamailio 3.1, but mysql configuration is the same for Kamailio 3.2<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n\t\tRTP Proxy<\/p>\n<ul>\n<li>\n<pre>\r\n#apt-get install rtpproxy\r\n#\/etc\/init.d\/rtpproxy stop&nbsp;<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Configuration is very easy, because Kamailio 3.2 adds preconfigured parameters and routing logic (all handled within #!ifdef .. #!endif blocks).<\/p>\n<p>We need to add<\/p>\n<pre>\r\n#!define WITH_NAT<\/pre>\n<p>to the defined values section.<\/p>\n<p>Then, in the Route[Registrar] we need to uncomment line &quot;setflag(FLB_NATSIPPING)&quot;:<\/p>\n<p>&nbsp;<\/p>\n<pre>\r\n# uncomment next line to do SIP NAT pinging\r\nsetbflag(FLB_NATSIPPING);<\/pre>\n<p>Setting this flag when REGISTER message arrives will cause Kamailio to send keepalives to the user. This is done using sip OPTION request. Client&#39;s response (i.e. 200 OK) to this request refreshes the NAT translation.<\/p>\n<p>&nbsp;<\/p>\n<p>We can also modify the <em>sipping_from<\/em> parameter of the nathelper module to match out domain:<\/p>\n<pre>\r\nmodparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, &quot;sip:pinger@p3b.sip.uniza.sk&quot;)<\/pre>\n<p>New design of the kamailio.cfg file provides the default routing logic for RTPproxy support. Route[NAT] and Route[RTPPROXY] have been replaced by Route[NATDETECT] and Route[NATMANAGE]. These new routing logic blocks utilize functions provided by the new&nbsp;<em>RTPPROXY<\/em> module (see <a href=\"http:\/\/www.kamailio.org\/docs\/modules\/3.2.x\/modules\/rtpproxy.html\">http:\/\/www.kamailio.org\/docs\/modules\/3.2.x\/modules\/rtpproxy.html<\/a>&nbsp;for documentation).<\/p>\n<p>&nbsp;<\/p>\n<p>All that remains is to run RTPproxy and Kamailio 3.2.<\/p>\n<p>Start RTPproxy by typing following command:<\/p>\n<pre>\r\n$rtpproxy -l &lt;your_public_IP&gt; -s udp:localhost:7722<\/pre>\n<p><strong>*note: you can not run RTPproxy as superuser, switch to non-privileged user before starting RTPproxy server<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Start Kamailio 3.2 by:<\/p>\n<pre>\r\n\/etc\/init.d\/kamailio start<\/pre>\n<p>&nbsp;<\/p>\n<p>If all went well, users behind NAT can now communicate with each other. Kamailio will detect whether they are behind NAT and if they are, their RTP streams will traverse RTPproxy.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>This guide describes Kamailio 3.2 configuration with RTP Proxy.<\/p>\n<p>Requirements:<\/p>","protected":false},"author":449,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[781,771],"tags":[],"class_list":["post-488","post","type-post","status-publish","format-standard","hentry","category-kamailio-en","category-sip-en"],"taxonomy_info":{"category":[{"value":781,"label":"Kamailio"},{"value":771,"label":"SIP"}]},"featured_image_src_large":false,"author_info":{"display_name":"","author_link":"https:\/\/nil.uniza.sk\/en\/author\/"},"comment_info":8,"category_info":[{"term_id":781,"name":"Kamailio","slug":"kamailio-en","term_group":0,"term_taxonomy_id":779,"taxonomy":"category","description":"","parent":771,"count":29,"filter":"raw","cat_ID":781,"category_count":29,"category_description":"","cat_name":"Kamailio","category_nicename":"kamailio-en","category_parent":771},{"term_id":771,"name":"SIP","slug":"sip-en","term_group":0,"term_taxonomy_id":769,"taxonomy":"category","description":"","parent":0,"count":23,"filter":"raw","cat_ID":771,"category_count":23,"category_description":"","cat_name":"SIP","category_nicename":"sip-en","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/449"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=488"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/488\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}