How to configure OverSIP when connecting to SIP server Kamailio?

1,116 views
Skip to first unread message

luoj...@gmail.com

unread,
Jul 2, 2013, 10:14:45 PM7/2/13
to ove...@googlegroups.com
Hi, everyone!

I have installed SIP server Kamailio 4.0.2 and OverSip 1.3.8 on my Ubuntu 12.04 desktop, and run 'servece oversip start' and 'service kamailio start' sucessfully. These two services are on the same PC with IP address 172.16.53.106.
jiada@Ubuntu:~$ sudo service Kamailio start
Starting Kamailio:
loading modules under /usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/
Listening on 
             udp: 127.0.0.1:5060
             udp: 172.16.53.106:5060
             tcp: 127.0.0.1:5060
             tcp: 172.16.53.106:5060
Aliases: 
             tcp: Ubuntu.local:5060
             tcp: localhost:5060
             udp: Ubuntu.local:5060
             udp: localhost:5060
kamailio started.

jiada@Ubuntu:~$ sudo service oversip start
 * Starting OverSIP (oversip)                                                                                                                                                                                                                                                      
 
NOTICE: <executable> OverSIP 1.3.8 starting...
INFO: <executable> master process name: oversip
WARN: <Config> cannot autodiscover local IPv6: Network is unreachable - connect(2) (Errno::ENETUNREACH)
WARN: <Config> disabling IPv6 for SIP
WARN: <Config> cannot autodiscover local IPv6: Network is unreachable - connect(2) (Errno::ENETUNREACH)
WARN: <Config> disabling IPv6 for WebSocket
  core:
    nameservers                     :  null
    syslog_facility                 :  daemon
    syslog_level                    :  debug
  sip:
    sip_udp                         :  no
    sip_tcp                         :  no
    sip_tls                         :  yes
    enable_ipv4                     :  yes
    listen_ipv4                     :  172.16.53.106
    enable_ipv6                     :  no
    listen_ipv6                     :  null
    listen_port                     :  null
    listen_port_tls                 :  5061
    use_tls_tunnel                  :  yes
    listen_port_tls_tunnel          :  5062
    callback_on_client_tls_handshake:  yes
    local_domains                   :  null
    tcp_keepalive_interval          :  300
    record_route_hostname_tls_ipv4  :  null
    record_route_hostname_tls_ipv6  :  null
  websocket:
    sip_ws                          :  yes
    sip_wss                         :  yes
    enable_ipv4                     :  yes
    listen_ipv4                     :  172.16.53.106
    enable_ipv6                     :  no
    listen_ipv6                     :  null
    listen_port                     :  10080
    listen_port_tls                 :  10443
    use_tls_tunnel                  :  yes
    listen_port_tls_tunnel          :  10444
    callback_on_client_tls_handshake:  yes
    max_ws_message_size             :  65536
    max_ws_frame_size               :  65536
    ws_keepalive_interval           :  300
  tls:
    public_cert                     :  /etc/oversip/tls/demo-tls.oversip.net.crt
    private_cert                    :  /etc/oversip/tls/demo-tls.oversip.net.key
    ca_dir                          :  /etc/oversip/tls/ca/
    full_cert                       :  /tmp/oversip_full_cert_20130703-4595-1io8m4z
INFO: <executable> increasing rlimits for 'nofiles'
INFO: <executable> creating Posix Message Queue for communicating master and syslogger processes
INFO: <PosixMQ /oversip_syslogger> queue requires 2004000 bytes
INFO: <PosixMQ /oversip_syslogger> rlimits for 'msgqueue' is 8032000 bytes (>= 2004000), no need to increase it
INFO: <PosixMQ /oversip_syslogger> maxmsg=1000, msgsize=2000
INFO: <TLS> TLS enabled
INFO: <TLS> inspecting CA file 'cacert.pem'...
INFO: <TLS> 'cacert.pem': 158 public certificates found
INFO: <TLS> 158 public certificates available for TLS validation
NOTICE: <launcher (master)> using Ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
NOTICE: <launcher (master)> using EventMachine-LE 1.1.5
NOTICE: <launcher (master)> starting event reactor...
INFO: <SIP launcher> SIP TLS-Tunnel server listening on IPv4 127.0.0.1:5062
INFO: <launcher (master)> spawned stud server (PID 4610) listening on 172.16.53.106 : 5061
INFO: <WebSocket launcher> WebSocket WS server listening on IPv4 172.16.53.106:10080 provides 'sip' WS subprotocol
INFO: <WebSocket launcher> WebSocket WSS_TUNNEL server listening on IPv4 127.0.0.1:10444 provides 'sip' WS subprotocol
INFO: <launcher (master)> spawned stud server (PID 4615) listening on 172.16.53.106 : 10443
NOTICE: <launcher (master)> calling OverSIP::SystemEvents.on_initialize() method...
NOTICE: <SystemEvents> on_initialize() method is not defined
NOTICE: <launcher (master)> executing OverSIP::SystemCallbacks.on_started_callbacks...
NOTICE: <launcher (master)> calling OverSIP::SystemEvents.on_started() method...
NOTICE: <SystemEvents> on_started() method is not defined
NOTICE: <launcher (master)> master process (PID 4600) ready
NOTICE: <launcher (master)> OverSIP 1.3.8 running in background

Besides, I have created 2 accounts in Kamailio to test, Kamailio works fine because i have tested these two accounts by using sofephone X-lite to communicate with each other.
I also download JsSIP API jssip-0.3.0.js, write a html page for connecting to oversip, open this page on another pc 172.16.53.2. it seems works fine too, because i checked the output of "netstat -anp | grep oversip", it shows the flowing result: 

tcp        0      0 172.16.53.106:10080     172.16.53.2:3299        ESTABLISHED 4600/oversip 
 
Could anyone tell me how to configure OverSIP to convert and redirect my Sip/websocket request to the SIP server Kamailio?
Many thanks to you all!
  

Iñaki Baz Castillo

unread,
Jul 3, 2013, 8:21:58 AM7/3/13
to ove...@googlegroups.com
2013/7/3 <luoj...@gmail.com>:
> Could anyone tell me how to configure OverSIP to convert and redirect my
> Sip/websocket request to the SIP server Kamailio?

Hi, what is the exact issue in the OverSIP documentation?

In your case OverSIP acts as an Outbound proxy. So let's assume:

JsSIP --- OverSIP (oversip.domain.com) --- Kamailio (domain.com)


- Configure JsSIP with ws_servers: "ws://oversip.domain.com" and user
"sip:NA...@domain.com".

- Configure "local_domains: oversip.domain.com" in oversip.conf.

- Period.

Of course you can force that OverSIP sends all the traffic from JsSIP
to Kamailio by calling Proxy#route() with the appropriate arguments:

http://oversip.net/documentation/1.3.x/api/sip/proxy/


--
Iñaki Baz Castillo
<i...@aliax.net>

luoj...@gmail.com

unread,
Jul 10, 2013, 5:23:20 AM7/10/13
to ove...@googlegroups.com
Thanks for your reply, sir !!

I have not set any domain name for my oversip and kamailio, and they are all installed in the same ubuntu virtual machine. Is that matters? Can i just set like this:

JsSIP --- OverSIP (172.16.53.106) --- Kamailio (172.16.53.106) 


- Configure JsSIP with ws_servers: "ws://172.16.53.106:10080" and user 
"sip:...@172.16.53.106". 

- Configure "local_domains: 172.16.53.106" in oversip.conf. 

Is that Ok?



在 2013年7月3日星期三UTC+8下午8时21分58秒,Iñaki Baz Castillo写道:
2013/7/3  <luoj...@gmail.com>:
> Could anyone tell me how to configure OverSIP to convert and redirect my
> Sip/websocket request to the SIP server Kamailio?

Hi, what is the exact issue in the OverSIP documentation?

In your case OverSIP acts as an Outbound proxy. So let's assume:

JsSIP --- OverSIP (oversip.domain.com) --- Kamailio (domain.com)


- Configure JsSIP with ws_servers: "ws://oversip.domain.com" and user

luoj...@gmail.com

unread,
Jul 10, 2013, 5:23:33 AM7/10/13
to ove...@googlegroups.com
Thanks for your reply, sir !!

I have not set any domain name for my oversip and kamailio, and they are all installed in the same ubuntu virtual machine. Is that matters? Can i just set like this:

JsSIP --- OverSIP (172.16.53.106) --- Kamailio (172.16.53.106) 


- Configure JsSIP with ws_servers: "ws://172.16.53.106:10080" and user 
"sip:...@172.16.53.106". 

- Configure "local_domains: 172.16.53.106" in oversip.conf. 

Is that Ok?



在 2013年7月3日星期三UTC+8下午8时21分58秒,Iñaki Baz Castillo写道:
2013/7/3  <luoj...@gmail.com>:
> Could anyone tell me how to configure OverSIP to convert and redirect my
> Sip/websocket request to the SIP server Kamailio?

Hi, what is the exact issue in the OverSIP documentation?

In your case OverSIP acts as an Outbound proxy. So let's assume:

JsSIP --- OverSIP (oversip.domain.com) --- Kamailio (domain.com)


- Configure JsSIP with ws_servers: "ws://oversip.domain.com" and user

Iñaki Baz Castillo

unread,
Jul 10, 2013, 11:10:29 AM7/10/13
to ove...@googlegroups.com
2013/7/10 <luoj...@gmail.com>:
> Thanks for your reply, sir !!
>
> I have not set any domain name for my oversip and kamailio, and they are all
> installed in the same ubuntu virtual machine. Is that matters? Can i just
> set like this:
>
> JsSIP --- OverSIP (172.16.53.106) --- Kamailio (172.16.53.106)
>
>
> - Configure JsSIP with ws_servers: "ws://172.16.53.106:10080" and user
> "sip:...@172.16.53.106".
>
> - Configure "local_domains: 172.16.53.106" in oversip.conf.
>
> Is that Ok?


Yes, but you don't need to set "local_domain" unless the client uses a
domain/hostname instead of an IP.
Reply all
Reply to author
Forward
0 new messages