Call with phparia

Hi guys,
I would to thanks all in advance. I am new to asterisk, I want dial phone number via php code.
By Running phpari example. I get following errors,

[2017-05-03 15:24:03] ERROR[61807]: res_http_websocket.c:519 ws_safe_read: Error reading from web socket: Connection reset by peer
[2017-05-03 15:24:03] WARNING[61807]: ari/ari_websockets.c:128 ast_ari_websocket_session_read: WebSocket read error: Connection reset by peer
[2017-05-03 15:24:05] WARNING[2206]: chan_sip.c:4071 retrans_pkt: Retransmission timeout reached on transmission 3b41ff0a67aa028d27245b5f62bae180@192.168.1.138:5160 for seqno 102 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response

I havent use such class (phparia), but it is clear there is websocket issue, Also there is some kind of firewall or NAT issue. If you want to dial numbers from PHP and you are new with Asterisk , I suggest you try AMI and Originate Action