[SR-Users] Kamailio on AWS

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 26 15:54:52 CET 2013


Hello,

it is still one IP from point of view of signaling (SIP). Do you want to 
provide single IP also for media (RTP)? If you have lot of calls, then 
it can result in a bottleneck for bandwidth as all voice/video streams 
end up on the same server.

Cheers,
Daniel

On 3/26/13 2:16 PM, Felipe Ramos wrote:
> Daniel Thanks a lot for your response, in my case i don't want to 
> provide so many ips to carriers acl because aws elastic ip are not 
> consistent, that is the reason i wanted to proxy everything trough 
> kamailio, here it is my setup
> i wont be doing any registration because of my setup does not required 
> it, on hardware i had kamailio forwarding to freeswitch then 
> distributed to asterisk and finish to a sbcswitch which i will be 
> virtualizing on aws.
>
> again thanks a lot for your advice you're the best.
>
> originador >>>kamailioA >>>>asterisk >> KamilioB>>> Termination
>
> debug=4
> log_stderror=yes
> #!else
> debug=2
> log_stderror=yes
> #!endif
>
> memdbg=5
> memlog=5
>
> log_facility=LOG_LOCAL0
>
> fork=yes
> children=4
>
> auto_aliases=no
>
>
> listen=udp:internal ip:5060 advertise external ip:5060
> mhomed=0
> alias="mysip.com <http://mysip.com>"
> alias="Internal IP:5060"
> alias=Internal IP:5060
> alias=Elastic IP
> alias=Elastic IP:5060
>
> port=5060
>
> enable_tls=no
>
> #tcp_connection_lifetime=3605
>
>
> #!ifdef WITH_SRCPATH
> mpath="modules_k:modules"
> #!else
> mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/"
> mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/"
> #!endif
> loadmodule "tm.so"
> loadmodule "sl.so"
> loadmodule "rr.so"
> loadmodule "maxfwd.so"
> loadmodule "textops.so"
> loadmodule "pv.so"
> loadmodule "dispatcher.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "siputils.so"
> loadmodule "sanity.so"
> loadmodule "ctl.so"
> loadmodule "mi_rpc.so"
> loadmodule "acc.so"
> loadmodule "avpops.so"
> #!ifdef WITH_NAT
> loadmodule "nathelper.so"
> loadmodule "rtpproxy.so"
> #!endif
> loadmodule "xlog.so"
>
> modparam("tm", "failure_reply_mode", 3)
> modparam("tm", "fr_timer", 30000)
> modparam("tm", "fr_inv_timer", 120000)
>
> modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.lst")
>
>
> #!ifdef WITH_NAT
> # ----- rtpproxy params -----
> modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722 
> <http://127.0.0.1:7722>")
>
> # ----- nathelper params -----
> modparam("nathelper", "natping_interval", 30)
> modparam("nathelper", "ping_nated_only", 1)
> modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
> modparam("nathelper", "sipping_from", "sip:pinger at kamailio.org 
> <mailto:sip%3Apinger at kamailio.org>")
>
> # params needed for NAT traversal in other modules
> modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
> modparam("usrloc", "nat_bflag", FLB_NATB)
> #!endif
>
>
>
>  #subst_uri('/^sip:1([23456789][0-9]+)@(.*)$/sip:\1@\2/i');
>
> request_route {
> #checking for loops
>         if (!mf_process_maxfwd_header("10")) {
>                 sl_send_reply("483","Too Many Hops");
>                 exit;
>         }
>
>
>         if (loose_route()) {
>                 if (!t_relay()) {
>                         sl_reply_error();
>                 }
>                 exit;
>         }
>
>         if (is_method("INVITE")) {
>                 record_route();
>                 append_hf("X-Src-IP: $src_ip\r\n");
>         }
>
>
> #i a planning to send it to distpatcher module once i get calls flowing.
>         if(!t_relay_to_udp("ip internal", "5060")) {
>                 sl_reply_error();
>         }
>         exit;
> }
>
> On Tue, Mar 26, 2013 at 5:13 AM, Daniel-Constantin Mierla 
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
>     Hello,
>
>
>     On 3/26/13 2:38 AM, Felipe Ramos wrote:
>>     Can anyone please point me on a configuration example for
>>     kamailio when it is behind NAT, i need to change the contact ip
>>     from internal to external on sdp 
>
>     you should not need that. Kamailio should do record routing,
>     advertising the public IP, so the signaling from the other side is
>     sent to Route headers, not to Contact address.
>
>     Use:
>
>     listen=udp:_internal_ip_:5060 advertise _external_ip_:5060
>
>
>>     and proxy all media from outside to internal asterisk farm.
>     Asterisk has support for external IP, so it can advertise that IP
>     in SDP and the media will go directly to the asterisk. Makes no
>     sense to make a user space forwarding with rtpproxy.
>
>     Cheers,
>     Daniel
>
>>
>>     Please any help will be appreciated.
>>     most of documentation available is when client is behind Nat but
>>     not when Server behind Nat like is the case with Amazon aws vpc
>>     instances.
>>
>>     Again thank you before hand.
>>
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>     sr-users at lists.sip-router.org  <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>     -- 
>     Daniel-Constantin Mierla -http://www.asipto.com
>     http://twitter.com/#!/miconda  <http://twitter.com/#%21/miconda>  -http://www.linkedin.com/in/miconda
>     Kamailio World Conference, April 16-17, 2013, Berlin
>       -http://conference.kamailio.com  -
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130326/7dbd385a/attachment.htm>


More information about the sr-users mailing list