Author Topic: Web Service doesn't work  (Read 7737 times)

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Web Service doesn't work
« on: April 14, 2016, 09:54:20 AM »
Hi everyone,
I have a problem with the Web Service. My stategie is very basic with only the bloque Web Service in IRD.
URS found the URL but does not send anything to the network connection (nothing in Wireshark capture).
And TServer route the call to the default target imediatly when it arrive to the block WebService. So URS received a EventRouteUsed(strange) from TServer.

URS log :
11:28:46.674_T_I_006c0280901ce001 [14:0c] EventRouteRequest is received for ts TServer_A4400[A4400] (this dn=3975770)
    _T_I_006c0280901ce001 [14:09] add DN TServer_A4400 3975770 <3975770@A4400> (CDN 71 006c0280901ce001 00000000021c73a0) to the call 1-0000000002145580 truly:11
    _T_I_006c0280901ce001 [14:08] check delayed proc
    _I_I_006c0280901ce001 [14:33] strategy: *0x65*Test webservice (1736585013) is attached to the call
11:28:46.674 Int 20001 interaction 006c0280901ce001 is started
    _I_I_006c0280901ce001 [01:14] current call classification: media=voice(100), service=default(200), segment=default(300)
11:28:46.675_I_I_006c0280901ce001 [09:06] >>>>>>>>>>>>start interp()
    _I_I_006c0280901ce001 [09:04] ASSIGN: __Return(SCRIPT) <- STRING: ""
    _I_I_006c0280901ce001 [07:46] no error mode for this call
    _I_I_006c0280901ce001 [09:04] ASSIGN: __Return(SCRIPT) <- STRING: ""
    _I_I_006c0280901ce001 [09:04] ASSIGN: __DBReturn(SCRIPT) <- STRING: ""
    _I_I_006c0280901ce001 [09:04] ASSIGN: __DBStrReturn(SCRIPT) <- STRING: ""
    _I_I_006c0280901ce001 [09:04] ASSIGN: __TargetVar(SCRIPT) <- STRING: ""
    _I_I_006c0280901ce001 [09:04] ASSIGN: var_URL(LOCAL) <- STRING: "http://dev.vite-ma-hotline.com/api/mairie_de_paris_booking_svi/v17.0/zen/requests/0231313232/has_current_zencalls/?format=json"
    _I_I_006c0280901ce001 [09:04] ASSIGN: __IntVar(LOCAL) <- INTEGER: 5
11:28:46.683_I_I_006c0280901ce001 [07:50] HERE IS XDATA
11:28:46.683_H_I_ [08:10] GET request 1 sent to HTTP Bridge:
URL:    http://dev.vite-ma-hotline.com/api/mairie_de_paris_booking_svi/v17.0/zen/requests/0231313232/has_current_zencalls/?format=json
Headers:
Content:
Authent: 2 test_api mdp_test_api

11:28:46.683_I_I_006c0280901ce001 [09:04] <<<<<<<<<<<<suspend interp(WAIT_HTTP), func:GetHttpRequestInfoTLS timers:00010
11:28:48.001_M_I_ [10:1d] PULSE (calls: 1(1)=0+1-0, targets=0, firsters=0, time=1460626128, mem=0,13083,178,15,192,1,2,0)
11:28:48.001_M_I_ [10:1d] vqs allocation pattern: static=(13 256 128) dynamic=(0 0/1024)
11:28:48.001_M_I_ [10:1d] PULSE no calls, skipped: 0 cpu 1 missed 2 next
11:28:50.001_M_I_ [10:1d] PULSE (calls: 1(1)=1+0-0, targets=0, firsters=0, time=1460626130, mem=0,13083,178,15,192,1,2,0)
11:28:50.001_M_I_ [10:1d] vqs allocation pattern: static=(13 256 128) dynamic=(0 0/1024)
11:28:50.001_M_I_ [10:1d] PULSE no calls, skipped: 0 cpu 2 missed 2 next
received from 65200(TServer_A4400)P12-APP01-DEV:3001(fd=) message EventRouteUsed
AttributeNetworkCallID b7620f577c346300
AttributeCallState 23
AttributeCallType 2
AttributePropagatedCallType 2
AttributeConnID 006c0280901ce001
AttributeCallUUID 'P8HTUIEAKP7JDD9ALMMIPNBS2O000002'
AttributeDNIS '3975770'
AttributeANI 'xxxxx'
AttributeThisDN '3975770'
AttributeThisDNRole 2
AttributeThisQueue '3975770'
AttributeCallID 13436
AttributeThisTrunk 263647
AttributeOtherDN 'xxxxx'
AttributeOtherDNRole 1
AttributeOtherTrunk 263647
AttributeErrorCode 402
AttributeExtensions [185] 00 06 01 00..
'GCTI_SUPERVISED_TRANSFER' 0
'GCTI_GLOB_CID' bin: b7 62 0f 57.. (len=8)
'GCTI_NAT_INDICATIONTYPE' 'Public:National'
'GCTI_NAT_INDICATION' 'xxxxxx'
'BusinessCall' 1
'GCTI_BUSINESS_CALL' 1
AttributeTimeinSecs 1460626131 (11:28:51)
AttributeTimeinuSecs 605000
AttributeEventSequenceNumber 0000000000000118
11:28:51.609_T_I_006c0280901ce001 [14:0c] EventRouteUsed(strange) is received for ts TServer_A4400[A4400] (this dn=3975770)
    _T_I_006c0280901ce001 [14:0a] del DN (TServer_A4400[A4400] 3975770 00000000021c73a0) controlled=0 calluuid=1 cleanup=0(ref.id=0)
    _T_W_006c0280901ce001 [14:0a] there is no DNs for call, delayed selfdestruction(15)
received from 65200(TServer_A4400)P12-APP01-DEV:3001(fd=) message EventDiverted
AttributeNetworkCallID b7620f577c346300
AttributeCallState 20
AttributeCallType 2
AttributePropagatedCallType 2
AttributeConnID 006c0280901ce001
AttributeCallUUID 'P8HTUIEAKP7JDD9ALMMIPNBS2O000002'
AttributeDNIS '3975770'
AttributeANI 'xxxxx'
AttributeThisDN '3975770'
AttributeThisDNRole 2
AttributeThisQueue '3975770'
AttributeCallID 13436
AttributeThisTrunk 263647
AttributeOtherDN 'xxxxx'
AttributeOtherDNRole 1
AttributeOtherTrunk 263647
AttributeErrorCode 402
AttributeExtensions [185] 00 06 01 00..
'GCTI_SUPERVISED_TRANSFER' 0
'GCTI_GLOB_CID' bin: b7 62 0f 57.. (len=8)
'GCTI_NAT_INDICATIONTYPE' 'Public:National'
'GCTI_NAT_INDICATION' '675311716'
'BusinessCall' 1
'GCTI_BUSINESS_CALL' 1
AttributeTimeinSecs 1460626131 (11:28:51)
AttributeTimeinuSecs 607000
AttributeEventSequenceNumber 000000000000011a
11:28:51.619_T_I_006c0280901ce001 [14:0c] EventDiverted is received for ts TServer_A4400[A4400] (this dn=3975770)


TServer log :
+++ Post-event +++
      Type EventRouteRequest
      Devices: <3975770/-> <-/675311716> <-/->
      Calls: 13436/006c0280901ce001/13436.0229adb0/c:2/r:0['34 7c'H] 0/none
      Network ID: b7620f577c346300:0
      Parties: D3975770/3975770.0229b160-0229adb0:1/l:2/r:0/Queued,RtRequest,Destination[c='34 7c'H r='15 00 05 df'H d=dynamicID : '05 df 01 04'H]
      Xxxxxx/xxxxx.0229af60-0229adb0:1/l:1/r:0/Dialing,Origination[c='34 7c'H d=dynamicID : '05 df 01 04'H]
      none
      ANI/DNIS: <xxxxx> <3975770>
      Cause: NewCall/22, Info: 0
      Call type: Inbound/2
      Flags: divert=0 hook=0 postCall=0 active=1 moveAll=1 callType=1 hideOtherPi=0 InternalOther=0
    --- Post-event ---
  --- CIFace::Event ---
11:28:46.659 --- Input ---
-AP[64]-<-528 @11:28:51.4140
-Ap[64]->-528 @11:28:51.4140
11:28:51.605 +++ Input +++
11:28:51.605 DataFromSwitch 21 bytes
0000-000f 00 13 a1 11 02 02 74 99 02 01 23 30 08 58 04 15 |......t...#0.X..|
0010-0014 00 05 df 87 00                                  |.....          |
  Decoded:
aPDU-rose : invoke : {
  invokeID 29849,
  operationValue local : 35,
  argument {
    crossRefIdentifier '15 00 05 df'H,
    errorValue unspecifiedErrors : NULL
  }
}
  -- party is connected
  -- (a4400) rtEnd due to drop
  SetRouteEnd: party 3975770.0229b160-0229adb0:1, cause CallForward
@11:28:51.6050 [0] 8.1.004.09 distribute_event: message EventRouteUsed
AttributeEventSequenceNumber 0000000000000118
AttributeTimeinuSecs 605000
AttributeTimeinSecs 1460626131 (11:28:51)
AttributeExtensions [185] 00 06 01 00..
'GCTI_SUPERVISED_TRANSFER' 0
'GCTI_GLOB_CID' bin: b7 62 0f 57.. (len=8)
'GCTI_NAT_INDICATIONTYPE' 'Public:National'
'GCTI_NAT_INDICATION' 'xxxxx'
'BusinessCall' 1
'GCTI_BUSINESS_CALL' 1
AttributeErrorCode 402
AttributeOtherTrunk 263647
AttributeOtherDNRole 1
AttributeOtherDN 'xxxxx'
AttributeThisTrunk 263647
AttributeCallID 13436
AttributeThisQueue '3975770'
AttributeThisDNRole 2
AttributeThisDN '3975770'
AttributeANI 'xxxxx'
AttributeDNIS '3975770'
AttributeCallUUID 'P8HTUIEAKP7JDD9ALMMIPNBS2O000002'
AttributeConnID 006c0280901ce001
AttributePropagatedCallType 2
AttributeCallType 2
AttributeCallState 23
AttributeNetworkCallID b7620f577c346300
11:28:51.605 Int 04544 Interaction message "EventRouteUsed" generated

Web log:
Debug level set to 'LOW'
04/14/16@11:18:11.795: HTTP Bridge
Version: 8.1.400.09
Genesys Telecommunications Laboratories, Inc., Copyright 1991-2014

Configuration
locale: English_United States.1252
http_port: 82
http_log_file: D:\GCTI\Logs\URS\web_log
http_log_size: 10000
log_buffering: false
log_remove_old_files: 2
verbose: 3
log_hide_private_data: false
soap_client:
soap_retry_attempts: 2
soap_retry_timeout: 5
soap_conn_idle_timeout: 15
http_conn_idle_timeout: 10000
wfm_polling_interval: 15
def_certificate:
def_certificate_key:
def_trusted_ca:
def_client_auth:

04/14/16@11:18:11.797: Server opened on socket 296
04/14/16@11:18:12.520: [WFM] Thread 300 activated
04/14/16@11:18:12.521: Client connected. Socket 312
04/14/16@11:28:46.683: Ref 1. GetHttpRequestInfo request received
04/14/16@11:28:46.683: [HTTP Handler Pool 0000000000f45e30] R(0), H(0), I(0), B(0), C(0)
04/14/16@11:28:46.683: [HTTP Response 0000000001026358] Created
04/14/16@11:28:46.683: [HTTP Client 0000000001026330] Created
04/14/16@11:28:46.683: [SOAP Client 00000000010262a8] Created
04/14/16@11:28:46.683: [HTTP Handler 0000000001026230] Created
04/14/16@11:28:46.683: [HTTP Handler Pool 0000000000f45e30] Handler 0000000001026230 created. Total handlers: 1
04/14/16@11:28:46.683: [HTTP Handler 0000000001026230] Processing request. Ref 1
04/14/16@11:28:46.683: [HTTP Handler 0000000001026230] State 'Busy'
04/14/16@11:28:46.683: [HTTP Handler 0000000001026230] Ref 1. Attempting to contact Web Server
HTTP Method: GET
URL: http://dev.vite-ma-hotline.com/api/mairie_de_paris_booking_svi/v17.0/zen/requests/0231313232/has_current_zencalls/?format=json
HTTP Auth: Basic
04/14/16@11:28:46.683: [HTTP Client 0000000001026330] Connecting to http://dev.vite-ma-hotline.com/api/mairie_de_paris_booking_svi/v17.0/zen/requests/0231313232/has_current_zencalls/?format=json
04/14/16@11:29:07.682: [HTTP Client 0000000001026330] Connection exception on socket 304
04/14/16@11:29:07.682: [HTTP Client 0000000001026330] Socket 304 closed
04/14/16@11:29:07.682: Ref 1. Response with event type 6 (status 0) sent to client
04/14/16@11:29:07.682: [HTTP Handler 0000000001026230] State 'Idle'


Somebody can help, please.
Thanks.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Web Service doesn't work
« Reply #1 on: April 14, 2016, 11:42:37 AM »
Did you configure the "web" section on URS application object?

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #2 on: April 14, 2016, 12:34:37 PM »
Yes, that's why we have the Web log.
[web]
http_conn_idle_timeout = 10000
http_log_file = D:\GCTI\Logs\URS\web_log
http_log_size = 10000
http_port = 82
log_remove_old_files = 2
verbose = 3


Offline Fra

  • Hero Member
  • *****
  • Posts: 856
  • Karma: -3
Re: Web Service doesn't work
« Reply #3 on: April 14, 2016, 01:00:51 PM »
04/14/16@11:29:07.682: [HTTP Client 0000000001026330] Connection exception on socket 304
04/14/16@11:29:07.682: [HTTP Client 0000000001026330] Socket 304 closed

Double check that you can access that web server from that same host.


Fra

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #4 on: April 14, 2016, 01:26:13 PM »
I have no problem when I try the HTTP GET in a web browser (Firefox or Chrome for exemple).
I repeat that I didn't see any GET request sent by URS in the Wireshark Capture.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7640
  • Karma: 56330
Re: Web Service doesn't work
« Reply #5 on: April 14, 2016, 03:59:40 PM »
Question, did you restart URS after enabling the HTTP interface?
Nothing blocking that 82 port?
Can you post URS start logs to see the initialization of the HTTP bridge?

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Web Service doesn't work
« Reply #6 on: April 14, 2016, 04:28:04 PM »
Can not be any GET yet - http_bridge fail to connect to web server by provided URL from host it is running on.
Created the simple strategy going to the same URL with the same credential - URS/http_bridge connect with no problems:

[code]
04/14/16@09:23:03.860: [HTTP Handler 03468b80] Ref 3. Attempting to contact Web
Server
        HTTP Method:    GET
        URL:            http://dev.vite-ma-hotline.com/api/mairie_de_paris_booki
ng_svi/v17.0/zen/requests/0231313232/has_current_zencalls/?format=json
        HTTP Auth:      Basic
04/14/16@09:23:03.882: [HTTP Client 03468c2c] Connecting to host dev.vite-ma-hot
line.com, port 80
04/14/16@09:23:03.894: [HTTP Client 03468c2c] Connected on socket 712
04/14/16@09:23:03.903: [HTTP Client 03468c2c] Request sent:
GET /api/mairie_de_paris_booking_svi/v17.0/zen/requests/0231313232/has_current_z
encalls/?format=json HTTP/1.1
Host: dev.vite-ma-hotline.com
User-Agent: gSOAP/2.7
Connection: keep-alive
Authorization: Basic dGVzdF9hcGk6bWRwX3Rlc3RfYXBp


04/14/16@09:23:04.323: [HTTP Client 03468c2c] Received 272 bytes from server on
socket 712:
HTTP/1.1 200 OK
Server: nginx/1.6.0
Date: Thu, 14 Apr 2016 16:23:04 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
Allow: OPTIONS, GET
Set-Cookie: SERVERID=frontend1; path=/

1f

04/14/16@09:23:04.363: [HTTP Response 03468c40] Chunked transfer encoding
04/14/16@09:23:04.371: [HTTP Client 03468c2c] Received 38 bytes from server on s
ocket 712:
{"has_current_zencalls": false}
0


04/14/16@09:23:04.386: [HTTP Client 03468c2c] Response received
[/code]

Have impression that something is wrong (with networking) on host where URS/bridge runs 

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Web Service doesn't work
« Reply #7 on: April 14, 2016, 05:17:14 PM »
Check on the Wireshark capture that you made, if there is a TCP SYN packet sent to the IP Address of dev.vitema-hotline.com on port 80. If not, there might be something on the operating system (Windows Firewall / iptables?). If it does have, check if there is a reply with the RST flag. If it does, the server is actively refusing (firewall on server?)

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #8 on: April 14, 2016, 06:07:36 PM »
cavagnaro : yes, URS already restarted.

hsujdik: The server sent a TCP SYN to the web server on port 80 but didn't have the reply with RST flag. So it sent again 2 times the TCP Retransmission to the same IP address.

About port 82 in the session web of URS's option, can I change it to another one? Is it configured somewhere ? I did do the test with the firewall disabled but had the same problem.

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #9 on: April 14, 2016, 06:27:34 PM »
I double checked I may be the problem come from the proxy. In the Wireshark Capture, when I tried the web service with a web browser, the GET is sent to the proxy (local IP address). But when I make a call, the TCP SYN is sent to the public IP address of the web server. In the Web Service block, I checked the "Use a proxy server" in the Security Tab but I have impression that didn't change anything.

Someone already have the URS works with the web service via a web proxy?

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #10 on: April 14, 2016, 06:33:02 PM »
Me again. In the IRD Release Note, I found that for the last version of IRD :

New in This Release
This is a hot fix for this product. This release contains the following new features or functionality:
- Security parameters of the Web Service object are extended to include Proxy Server parameters—Host and Port—to enable execution of Web requests through HTTP Proxy Server. New parameters are supported by URS version 8.1.400.16 or later. (IRD-3273)

I have actually URS version 8.1.400.09. I will try the lastest version of URS and let you know later.
Thanks.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7640
  • Karma: 56330
Re: Web Service doesn't work
« Reply #11 on: April 14, 2016, 07:11:40 PM »
So you have a Proxy?

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #12 on: April 14, 2016, 07:22:33 PM »
Yes, I forgot to tell this.
« Last Edit: April 14, 2016, 07:24:16 PM by letuan »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7640
  • Karma: 56330
Re: Web Service doesn't work
« Reply #13 on: April 14, 2016, 07:29:34 PM »
lol those "little" details ;)

Offline letuan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Web Service doesn't work
« Reply #14 on: April 15, 2016, 08:58:34 AM »
LOL, it was that "little details".
It works well now with the URS version 8.1.400.25.

Thank you everyone.