Porta1 => OverSip => JSSIP

110 views
Skip to first unread message

abdul raheem

unread,
Dec 14, 2016, 9:12:33 AM12/14/16
to OverSIP, Aamir Saeed, abdul....@code-desk.com
Hi,

I am trying to configure browser calls for our porta1 sip server. As porta1 doesnot support websockets, so we are using oversip.
I have configured the oversip server. and my Jssip also communicates with my oversip through websockets. But it fails to make call. In response it sats 404 I'm here, further reading this error message I found this occurs when you call your self but in my case I am calling another SIP address.
Here are the logs of oversip


Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsFraming> received text frame: FIN=true, RSV1-3=false/false/false, payload_length=1940
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsSipApp> received WS message: type=text, length=1940
Dec 14 19:02:33 abdul oversip[2602]:   INFO: <SipEvents> [user] INVITE from sip:1...@sip1.mysipaddress.com (UA: JsSIP 3.0.0) to sip:3...@sip1.mysipaddress.com via WS 192.168.0.112 : 56452
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <SIP Request 1962481> applying outgoing Outbound support
Dec 14 19:02:33 abdul oversip[2602]:   INFO: <SipEvents> [user] request for myself => 404
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <SIP Request 1962481> replying 404 "Ok, I'm here"
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsFraming> sending text frame: payload_length=303
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsFraming> received text frame: FIN=true, RSV1-3=false/false/false, payload_length=299
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsSipApp> received WS message: type=text, length=299
Dec 14 19:02:33 abdul oversip[2602]:  DEBUG: <WsSipApp> absorving ACK for a stateless final response
Dec 14 19:07:31 abdul oversip[2602]:  DEBUG: <WsFraming> sending keep-alive ping frame
Dec 14 19:07:31 abdul oversip[2602]:  DEBUG: <WsFraming> received pong frame: payload_length=10

abdul raheem

unread,
Dec 14, 2016, 9:22:06 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Also here are the configuration I made to run oversip

NOTICE: <executable> OverSIP 2.0.4 starting...
INFO: <executable> process name: oversip

  core:
    nameservers                     :  127.0.0.1
    syslog_facility                 :  daemon
    syslog_level                    :  debug

  sip:
    sip_udp                         :  yes
    sip_tcp                         :  yes
    sip_tls                         :  yes
    enable_ipv4                     :  yes
    listen_ipv4                     :  192.168.0.112
    advertised_ipv4                 :  null
    enable_ipv6                     :  no
    listen_ipv6                     :  null
    advertised_ipv6                 :  null
    listen_port                     :  5060
    listen_port_tls                 :  5061
    use_tls_tunnel                  :  no
    listen_port_tls_tunnel          :  null
    callback_on_client_tls_handshake:  yes
    local_domains                   :  sip1.mysipaddress.com
    tcp_keepalive_interval          :  30000
    record_route_hostname_tls_ipv4  :  null
    record_route_hostname_tls_ipv6  :  null

  websocket:
    sip_ws                          :  yes
    sip_wss                         :  yes
    enable_ipv4                     :  yes
    listen_ipv4                     :  192.168.0.112
    advertised_ipv4                 :  null
    enable_ipv6                     :  no
    listen_ipv6                     :  null
    advertised_ipv6                 :  null
    listen_port                     :  10080
    listen_port_tls                 :  10444
    use_tls_tunnel                  :  no
    listen_port_tls_tunnel          :  null
    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_20161214-2597-vcmr3v

INFO: <TLS> TLS enabled
INFO: <TLS> inspecting CA file 'cacert.pem'...
INFO: <TLS> 'cacert.pem': 153 public certificates found
INFO: <TLS> 'cacert.pem': ignoring 9 expired certificates
INFO: <TLS> 144 public certificates available for TLS validation
NOTICE: <launcher (master)> using Ruby 2.0.0p384 (2014-01-12 revision 0) [x86_64-linux-gnu]
NOTICE: <launcher (master)> using EventMachine-LE 1.1.7
NOTICE: <launcher (master)> starting event reactor...
INFO: <SIP launcher> SIP UDP server listening on IPv4 192.168.0.112:5060
INFO: <SIP launcher> SIP TCP server listening on IPv4 192.168.0.112:5060
INFO: <SIP launcher> SIP TLS server listening on IPv4 192.168.0.112:5061
INFO: <WebSocket launcher> WebSocket WS server listening on IPv4 192.168.0.112:10080 provides 'sip' WS subprotocol
INFO: <WebSocket launcher> WebSocket WSS server listening on IPv4 192.168.0.112:10444 provides 'sip' WS subprotocol
DEBUG: <launcher (master)> calling OverSIP::SystemEvents.on_initialize() method...
DEBUG: <launcher (master)> executing OverSIP::SystemCallbacks.on_started_callbacks...
DEBUG: <launcher (master)> calling OverSIP::SystemEvents.on_started() method...
NOTICE: <launcher (master)> OverSIP 2.0.4 running in background

Iñaki Baz Castillo

unread,
Dec 14, 2016, 9:34:44 AM12/14/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
You are calling sip:1...@sip1.mysipaddress.com but in your conf you have:

> local_domains : sip1.mysipaddress.com

If you set such a domain as "local_domain" then you cannot expect that
oversip will try to route it outside.


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

abdul raheem

unread,
Dec 14, 2016, 9:40:28 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Yes this comes from JSSIP I guess.
In JSSIP I am creating UA like this

var configuration = {
  sockets  : [ socket ],
  uri      : 'sip:123456@sip1.mysipaddress.com',
  password : '123456'
};

I have checked I have added the same sip server address both in oversip and jssip

On Wednesday, December 14, 2016 at 7:34:44 PM UTC+5, Iñaki Baz Castillo wrote:
You are calling  sip...@sip1.mysipaddress.com but in your conf you have:

Iñaki Baz Castillo

unread,
Dec 14, 2016, 9:43:37 AM12/14/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
No. OverSIP is not a SIP registrar so the SIP URI domain of your
JsSIP/phone devices cannot match a local domain in OverSIP.
OverSIP is a proxy, not a SIP server responsible of managing user
accounts/registrations.

Set a different domain for OverSIP and place it in the "sockets"
setting of JsSIP.

2016-12-14 15:40 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Yes this comes from JSSIP I guess.
> In JSSIP I am creating UA like this
>
> var configuration = {
> sockets : [ socket ],
> uri : 'sip:123...@sip1.mysipaddress.com',
> password : '123456'
> };
>
> I have checked I have added the same sip server address both in oversip and
> jssip
>
> On Wednesday, December 14, 2016 at 7:34:44 PM UTC+5, Iñaki Baz Castillo
> wrote:
>>
>> You are calling sip...@sip1.mysipaddress.com but in your conf you have:
>>
>> > local_domains : sip1.mysipaddress.com
>>
>> If you set such a domain as "local_domain" then you cannot expect that
>> oversip will try to route it outside.
>>
>>
>> --
>> Iñaki Baz Castillo
>> <i...@aliax.net>
>
> --
> You received this message because you are subscribed to the Google Groups
> "OverSIP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to oversip+u...@googlegroups.com.
> To post to this group, send email to ove...@googlegroups.com.
> Visit this group at https://groups.google.com/group/oversip.
> For more options, visit https://groups.google.com/d/optout.

abdul raheem

unread,
Dec 14, 2016, 10:04:16 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Well now I set it to null so It automatically pick up the local domain.
I am working on local machine but the sip server is live on some other machine.

Here is the log now. It seems it failed communicating with SIP server

Dec 14 19:58:12 abdul oversip[2275]:  DEBUG: <RFC3263 8677302> DNS SRV error resolving domain 'sip1.xxxx.com', service 'sips' and protocol 'tcp': dns_error_tempfail
Dec 14 19:58:14 abdul oversip[2275]:  DEBUG: <RFC3263 1656014> DNS SRV error resolving domain 'sip1.xxxx.com', service 'sips' and protocol 'tcp': dns_error_tempfail
Dec 14 19:58:40 abdul oversip[2275]:  DEBUG: <RFC3263 8677302> DNS SRV error resolving domain 'sip1.xxxx.com', service 'sip' and protocol 'tcp': dns_error_tempfail
Dec 14 19:58:42 abdul oversip[2275]:  DEBUG: <RFC3263 1656014> DNS SRV error resolving domain 'sip1.xxxx.com', service 'sip' and protocol 'tcp': dns_error_tempfail
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <WsFraming> received close frame: status=963, reason=""
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <WsFraming> sending close frame: status=nil, reason=nil
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <SIP WS IPv4 server> connection from 192.168.0.112:52860 remotely closed
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <SIP WS IPv4 server> connection opened from 192.168.0.112:52940
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <SIP WS IPv4 server> running OverSIP::WebSocketEvents.on_connection()...
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <HTTP WS Request> replying 101 "Switching Protocols"
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <WsFraming> received text frame: FIN=true, RSV1-3=false/false/false, payload_length=578
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <WsSipApp> received WS message: type=text, length=578
Dec 14 19:58:56 abdul oversip[2275]:   INFO: <SipEvents> [user] REGISTER from sip:1...@sip1.xxxx.com (UA: JsSIP 3.0.0) to sip:3...@sip1.xxxx.com via WS 192.168.0.112 : 52940
Dec 14 19:58:56 abdul oversip[2275]:  DEBUG: <SIP Request 6059678> applying outgoing Outbound support
Dec 14 19:58:58 abdul oversip[2275]:  DEBUG: <WsFraming> received text frame: FIN=true, RSV1-3=false/false/false, payload_length=1944
Dec 14 19:58:58 abdul oversip[2275]:  DEBUG: <WsSipApp> received WS message: type=text, length=1944
Dec 14 19:58:58 abdul oversip[2275]:   INFO: <SipEvents> [user] INVITE from sip:1...@sip1.xxxx.com (UA: JsSIP 3.0.0) to sip:3...@sip1.xxxx.com via WS 192.168.0.112 : 52940
Dec 14 19:58:58 abdul oversip[2275]:  DEBUG: <SIP Request 7724105> applying outgoing Outbound support
Dec 14 19:58:58 abdul oversip[2275]:  DEBUG: <SIP Request 7724105> replying 100 "Trying"
Dec 14 19:58:58 abdul oversip[2275]:  DEBUG: <WsFraming> sending text frame: payload_length=275
Dec 14 19:59:01 abdul oversip[2275]:  DEBUG: <NIST 6059678> no final response within 5 seconds => 100
Dec 14 19:59:01 abdul oversip[2275]:  DEBUG: <SIP Request 6059678> replying 100 "I'm alive"
Dec 14 19:59:01 abdul oversip[2275]:  DEBUG: <WsFraming> sending text frame: payload_length=279

and my JSSIP UA configuration

var socket = new JsSIP.WebSocketInterface('ws://192.168.0.112:10080');
var configuration = {
  sockets  : [ socket ],
  uri      : 'sip:1...@sip1.xxxx.com',
  password : '123'
};

On Wednesday, December 14, 2016 at 7:43:37 PM UTC+5, Iñaki Baz Castillo wrote:
No. OverSIP is not a SIP registrar so the SIP URI domain of your
JsSIP/phone devices cannot match a local domain in OverSIP.
OverSIP is a proxy, not a SIP server responsible of managing user
accounts/registrations.

Set a different domain for OverSIP and place it in the "sockets"
setting of JsSIP.

2016-12-14 15:40 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Yes this comes from JSSIP I guess.
> In JSSIP I am creating UA like this
>
> var configuration = {
>   sockets  : [ socket ],
>   uri      : 'sip:1...@sip1.mysipaddress.com',

Iñaki Baz Castillo

unread,
Dec 14, 2016, 10:08:27 AM12/14/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
2016-12-14 16:04 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Dec 14 19:58:58 abdul oversip[2275]: INFO: <SipEvents> [user] INVITE from
> sip:1...@sip1.xxxx.com (UA: JsSIP 3.0.0) to sip:3...@sip1.xxxx.com via WS
> 192.168.0.112 : 52940
> Dec 14 19:58:58 abdul oversip[2275]: DEBUG: <SIP Request 7724105> applying
> outgoing Outbound support
> Dec 14 19:58:58 abdul oversip[2275]: DEBUG: <SIP Request 7724105> replying
> 100 "Trying"
> Dec 14 19:58:58 abdul oversip[2275]: DEBUG: <WsFraming> sending text frame:
> payload_length=275
> Dec 14 19:59:01 abdul oversip[2275]: DEBUG: <NIST 6059678> no final
> response within 5 seconds => 100

Sorry, I don't know. You should check whether your OverSIP server can
reach your SIP registrar at sip1.xxxx.com or not.

abdul raheem

unread,
Dec 14, 2016, 10:10:13 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
and the name server I am using is 127.0.0.1


On Wednesday, December 14, 2016 at 7:43:37 PM UTC+5, Iñaki Baz Castillo wrote:
No. OverSIP is not a SIP registrar so the SIP URI domain of your
JsSIP/phone devices cannot match a local domain in OverSIP.
OverSIP is a proxy, not a SIP server responsible of managing user
accounts/registrations.

Set a different domain for OverSIP and place it in the "sockets"
setting of JsSIP.

2016-12-14 15:40 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Yes this comes from JSSIP I guess.
> In JSSIP I am creating UA like this
>
> var configuration = {
>   sockets  : [ socket ],
>   uri      : 'sip:1...@sip1.mysipaddress.com',

abdul raheem

unread,
Dec 14, 2016, 10:17:35 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
How I can do that?


On Wednesday, December 14, 2016 at 8:08:27 PM UTC+5, Iñaki Baz Castillo wrote:
2016-12-14 16:04 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Dec 14 19:58:58 abdul oversip[2275]:   INFO: <SipEvents> [user] INVITE from
> sip...@sip1.xxxx.com (UA: JsSIP 3.0.0) to sip...@sip1.xxxx.com via WS

abdul raheem

unread,
Dec 14, 2016, 10:26:35 AM12/14/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Can you please let us know one more thing
Any special requirements from SIP server side in order for OverSIP to work with our SIP Server.
We are using Portaone

Thanks

On Wednesday, December 14, 2016 at 7:12:33 PM UTC+5, abdul raheem wrote:

Iñaki Baz Castillo

unread,
Dec 14, 2016, 11:08:02 AM12/14/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
2016-12-14 16:26 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Any special requirements from SIP server side in order for OverSIP to work
> with our SIP Server.

http://oversip.net/documentation/2.0.x/api/built_in_modules/outbound_mangling/
http://oversip.net/documentation/faq/running_oversip_behind_nat/

Also, if you run OverSIP in a private IP I cannot guarantee that it
will be able to connect with your SIP server (that depends on your SIP
server).


> We are using Portaone

No idea, sorry.

abdul raheem

unread,
Dec 15, 2016, 5:32:47 AM12/15/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Hi, 

Thanks you for your help.
It does the ringing now.
But when I pick the call from other end it disconnects with the error code 

"SIP/2.0 500 Disconnected
Via: SIP/2.0/WS 4roafv51ape7.invalid;branch=z9hG4bK5286957
Record-Route: <sip:78.40.244.5:5060;transport=udp;lr>
Record-Route: <sip:122.129.78.153:5060;transport=udp;ovid=958fbc6b;lr>
Record-Route: <sip:185df...@122.129.78.153:10080;transport=ws;ovid=958fbc6b;lr>
To: <sip:1...@sip1.mysipaddress.com>;tag=ia3nhuixivud3tme.i
From: <sip:3...@sip1.mysipaddress.com>;tag=r08f4arrhq
Call-ID: v6dv91j62i160ldqj9ta
CSeq: 2987 INVITE
Allow: INVITE, ACK, BYE, CANCEL, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS, UPDATE
Server: Sippy
Portasip-3264-Action: none 1
Content-Length: 0

"

* Also oversip will only make calls to the other sip extension not to landline or mobile numbers ?

Iñaki Baz Castillo

unread,
Dec 15, 2016, 5:46:24 AM12/15/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
2016-12-15 11:32 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> But when I pick the call from other end it disconnects with the error code
>
> "SIP/2.0 500 Disconnected

I am not the owner of your Portaone SIP server. You may want to check
what happens in there.


> * Also oversip will only make calls to the other sip extension not to
> landline or mobile numbers ?

OverSIP is a SIP proxy, this is, something that routes SIP messages.

abdul raheem

unread,
Dec 15, 2016, 6:14:53 AM12/15/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
So this is something from SIP server?
Not from oversip?
But with voip phones I am able to make calls and they dont disconnect?

Iñaki Baz Castillo

unread,
Dec 15, 2016, 6:41:24 AM12/15/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
2016-12-15 12:14 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> So this is something from SIP server?

Logs at your SIP server should tell you that.

> Not from oversip?

Logs at OverSIP should tell you that.

> But with voip phones I am able to make calls and they dont disconnect?

Congrats. Now the magic question:


Did you know that OverISP is a *SIP PROXY* (not a media proxy) between
your SIP WebSocket client (JsSIP) and your SIP server (Portaone)?

Did you know that, in order to connect JsSIP (or any SIP WebRTC
client) with your SIP server, your SIP server MUST implement WebRTC at
media plane (because OverSIP is not a "plain RTP to WebRTC gateway"?

abdul raheem

unread,
Dec 15, 2016, 7:29:30 AM12/15/16
to OverSIP, aamir...@wave-tel.com, abdul....@code-desk.com
Well I do not have access to see my sip server logs right now.
But this is what is see in my oversip log

Dec 15 17:14:18 abdul oversip[2927]:  DEBUG: <NICT ee5ab0f6d91ebb997cada5cdbcbabbd9020b7f04> timer K expires, transaction terminated
Dec 15 17:14:18 abdul oversip[2927]:  DEBUG: <NICT 5c53f316d91ebb997cada5cdbcbabbd9020b7f04> timer K expires, transaction terminated
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <ICT 6ce98bbb2882c475a79333a4e4ac4c772e130518> sending ACK for [3456]XX response
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <Proxy proxy_out 6982436> received response 500
Dec 15 17:14:22 abdul oversip[2927]:   INFO: <SipEvents> [user] on_failure_response: 500 'Disconnected'
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <SIP Request 6982436> forwarding response 500 "Disconnected"
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <WsFraming> sending text frame: payload_length=627
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <WsFraming> received text frame: FIN=true, RSV1-3=false/false/false, payload_length=300
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <WsSipApp> received WS message: type=text, length=300
Dec 15 17:14:22 abdul oversip[2927]:  DEBUG: <IST 6982436> ACK received during completed state, now confirmed

is says timer K expires, transaction terminated what does this means ?

Regarding your questions

1) Honestly before yesterday I did not know what It actually does because it was not installing on my machine (it took me more time to install it then to configure and make it running, the ruby and gem dependencies). Now I know a bit about it and the proxy thing and it communicate with sip server through tcp and udp.

2)While reading the questions posted by others yesterday I read you comment on some one else question that (Does you switch boad implement web rtc (this is ICE, DTLS etc) so from there I came to know that.

Iñaki Baz Castillo

unread,
Dec 15, 2016, 7:50:05 AM12/15/16
to oversip, aamir...@wave-tel.com, abdul....@code-desk.com
2016-12-15 13:29 GMT+01:00 abdul raheem <raheemj...@gmail.com>:
> Well I do not have access to see my sip server logs right now.

Well, the fact that you cannot check your own server does not mean
that the problem is in OverSIP.


> But this is what is see in my oversip log

> Dec 15 17:14:22 abdul oversip[2927]: DEBUG: <Proxy proxy_out 6982436>
> received response 500

^^^ This is what you should focus on.



> is says timer K expires, transaction terminated what does this means ?

I spent various years learning about SIP protocol, including RFC 3261
and many other specs. I'm not a free teacher, sorry.


> Regarding your questions
>
> 1) Honestly before yesterday I did not know what It actually does because it
> was not installing on my machine (it took me more time to install it then to
> configure and make it running, the ruby and gem dependencies). Now I know a
> bit about it and the proxy thing and it communicate with sip server through
> tcp and udp.
>
> 2)While reading the questions posted by others yesterday I read you comment
> on some one else question that (Does you switch boad implement web rtc (this
> is ICE, DTLS etc) so from there I came to know that.

http://oversip.net provides complete documentation regarding what
OverSIP is, what it is not and what it includes. No, it is not a
WebRTC gateway as stated before.
Reply all
Reply to author
Forward
0 new messages