Vtiger and asterisk integration

I have vtiger 7.1.0 version running on shared host environment. I have asterisk 11.25.3 running on ubuntu x86_64 in AWS lightsail instance (VPS). My inbound and outbound calling from softphones working properly. But not from vtiger. Neither inbound nor outbound calling is working. I put vtiger asterisk connector on my asterisk server. Details of VtigerAsteriskConnector.properties are:

ServerIP   = 13.127.240.181
ServerPort = 8383
StorageDir = /usr/local/VtigerAseriskConnector/storage

//Location where the applications database files will be stored.
AsteriskAppDBPath = /usr/local/VtigerasteriskConnector/storage

// Asterisk Server Details
AsteriskServerIP   = 13.127.240.181
AsteriskServerPort = 5038
AsteriskUsername   = vtiger
AsteriskPassword   = abc@123

// Vtiger CRM URL
VtigerURL = www.vtigerurl.com
VtigerSecretKey = xxxxxxxxxxxxxxxxx

My extensions.conf is

[vtiger_inbound] 
exten => 451236,1,Agi(agi://0.0.0.0/incoming.agi) 
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi) 

[vtiger] 
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

My manager.conf is:

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[vtiger]
secret = abc@123
deny = 0.0.0.0/0.0.0.0
permit = 13.127.240.181/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate

And my PBX manger settings in vtiger crm are:

Vtiger Asterisk App URL: http://13.127.240.181:8383/

Outbound Context: vtiger

Outbound Trunk: gsm222

Vtiger Secret Key: xxxxxxxxxxxx

I got nothing in CLI.

Turn up the logging until you do get something in the CLI. If you still don’t get anything, the requests aren’t reaching Asterisk and you need to look upstream.

Also note that 13.127.240.181/255.255.255.0 is potentially invalid, depending on the exact algorithm used to do the match, but you would still get this logged as an attempted security breach.

When I tried inbound call CLI shows following:

= Using SIP RTP CoS mark 5
       > 0x7f59f6b2c670 -- Strict RTP learning after remote address set to: 103.44.119.75:8008
    -- Executing [451236@vtiger:1] AGI("SIP/gsm222-00000003", "agi://127.0.0.1/incoming.agi") in new stack
       > 0x7f59f6b2c670 -- Strict RTP switching to RTP remote address 103.44.119.75:8008 as source
[Aug 19 11:14:26] WARNING[17916][C-00000003]: channel.c:5362 set_format: Unable to find a codec translation path from (g723) to (ulaw)
[Aug 19 11:14:26] WARNING[17916][C-00000003]: channel.c:5362 set_format: Unable to find a codec translation path from (g723) to (ulaw)
  == Manager 'vtiger' logged on from 172.26.5.19
       > 0x7f59f6b2c670 -- Strict RTP learning complete - Locking on source address 103.44.119.75:8008
    -- <SIP/gsm222-00000003>AGI Script agi://127.0.0.1/incoming.agi completed, returning 4
  == Spawn extension (vtiger, 451236, 1) exited non-zero on 'SIP/gsm222-00000003'

Check the presence of g723 codec module in your asterisk:
cli command: core show translation

Your softphones may support g723, but vTiger SIP agent - does not.
To check it - try to configure asterisk Inbound peer to accept only ulaw codec (allow=ulaw), and test it.

Now I have configured vtiger with asterisk but my outgoing call is ended within 2 seconds. My CLI shows:

  == Manager 'vtiger' logged on from 172.26.5.19
  == Using SIP RTP CoS mark 5
       > 0x7f1e3c017cc0 -- Strict RTP learning after remote address set to: 103.44.119.75:40018
       > Channel SIP/2810-00000000 was answered
    -- Executing [2810@vtiger_outbound:1] AGI("SIP/2810-00000000", "agi://172.26.5.19/incoming.agi") in new stack
  == Manager 'vtiger' logged on from 172.26.5.19
  == Manager 'vtiger' logged off from 172.26.5.19
    -- <SIP/2810-00000000>AGI Script agi://172.26.5.19/incoming.agi completed, returning 4
  == Spawn extension (vtiger_outbound, 2810, 1) exited non-zero on 'SIP/2810-00000000'

Sorry for late reply. After executing core show translation I got following in my CLI:

 Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  ilbc g726aal2  g722 slin16 testlaw slin12 slin24 slin32 slin44 slin48 slin96 slin192
      gsm     - 15000 15000 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     ulaw 15000     -  9150 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     alaw 15000  9150     - 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     g726 15000 15000 15000     - 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
    adpcm 15000 15000 15000 15000     -  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     slin  6000  6000  6000  6000  6000     -  6000  6000     6000  8250   8000    6000   8000   8000   8000   8000   8000   8000    8000
    lpc10 15000 15000 15000 15000 15000  9000     - 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     ilbc 15000 15000 15000 15000 15000  9000 15000     -    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
 g726aal2 15000 15000 15000 15000 15000  9000 15000 15000        - 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     g722 15600 15600 15600 15600 15600  9600 15600 15600    15600     -   9000   15600  17500  17000  17000  17000  17000  17000   17000
   slin16 14500 14500 14500 14500 14500  8500 14500 14500    14500  6000      -   14500   8500   8000   8000   8000   8000   8000    8000
  testlaw 15000 15000 15000 15000 15000  9000 15000 15000    15000 17250  17000       -  17000  17000  17000  17000  17000  17000   17000
   slin12 14500 14500 14500 14500 14500  8500 14500 14500    14500 14000   8000   14500      -   8000   8000   8000   8000   8000    8000
   slin24 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500      -   8000   8000   8000   8000    8000
   slin32 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500      -   8000   8000   8000    8000
   slin44 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500      -   8000   8000    8000
   slin48 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500      -   8000    8000
   slin96 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500   8500      -    8000
  slin192 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500   8500   8500       -

You do not have adequate logging. IN particular, you probably want SIP debugging enabled.

However, on the surface, it looks like the problem is in your AGI script. Specifically that it returned 4, not 0.

Incidentally, when providing logs were time is of the essence, do not screen scrape them; take them from the log files, which have more complete time stamps.

Sorry for that.

After set debug I got following:

 == Manager 'vtiger' logged on from 172.26.5.19
  == Using SIP RTP CoS mark 5
Audio is at 11674
Adding codec 100004 (alaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding codec 100001 (g723) to SDP
Reliably Transmitting (no NAT) to 103.44.119.75:5060:
INVITE sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184 SIP/2.0
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK12889de1
Max-Forwards: 70
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
Contact: <sip:7798600238@13.127.240.181:5060>
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.25.3
Date: Wed, 22 Aug 2018 09:48:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 249

v=0
o=root 682238257 682238257 IN IP4 13.127.240.181
s=Asterisk PBX 11.25.3
c=IN IP4 13.127.240.181
t=0 0
m=audio 11674 RTP/AVP 8 3 4
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=ptime:20
a=sendrecv

---
Retransmitting #1 (no NAT) to 103.44.119.75:5060:
INVITE sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184 SIP/2.0
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK12889de1
Max-Forwards: 70
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
Contact: <sip:7798600238@13.127.240.181:5060>
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.25.3
Date: Wed, 22 Aug 2018 09:48:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 249

v=0
o=root 682238257 682238257 IN IP4 13.127.240.181
s=Asterisk PBX 11.25.3
c=IN IP4 13.127.240.181
t=0 0
m=audio 11674 RTP/AVP 8 3 4
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:103.44.119.75:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK12889de1
Contact: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 INVITE
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
list_route: hop: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>

<--- SIP read from UDP:103.44.119.75:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK12889de1
Contact: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 INVITE
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
list_route: hop: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>

<--- SIP read from UDP:103.44.119.75:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK12889de1
Contact: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 177

v=0
o=3cxVCE 204593685 85859475 IN IP4 103.44.119.75
s=3cxVCE Audio Call
c=IN IP4 103.44.119.75
t=0 0
m=audio 40046 RTP/AVP 8 3
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
<------------->
--- (12 headers 8 lines) ---
Found RTP audio format 8
Found RTP audio format 3
Found audio description format PCMA for ID 8
Found audio description format GSM for ID 3
Capabilities: us - (g723|gsm|alaw), peer - audio=(gsm|alaw)/video=(nothing)/text=(nothing), combined - (gsm|alaw)
Non-codec capabilities (dtmf): us - 0x0 (nothing), peer - 0x0 (nothing), combined - 0x0 (nothing)
       > 0x7fc22c021dc0 -- Strict RTP learning after remote address set to: 103.44.119.75:40046
Peer audio RTP is at port 103.44.119.75:40046
list_route: hop: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
set_destination: Parsing <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184> for address/port to send to
set_destination: set destination to 103.44.119.75:5060
Transmitting (no NAT) to 103.44.119.75:5060:
ACK sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184 SIP/2.0
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK54c7592a
Max-Forwards: 70
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
Contact: <sip:7798600238@13.127.240.181:5060>
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.25.3
Content-Length: 0


---
       > Channel SIP/2810-00000001 was answered
    -- Executing [2810@vtiger_outbound:1] AGI("SIP/2810-00000001", "agi://0.0.0.0/incoming.agi") in new stack
  == Manager 'vtiger' logged on from 172.26.5.19
       > 0x7fc22c021dc0 -- Strict RTP switching to RTP remote address 103.44.119.75:40046 as source
       > 0x7fc22c021dc0 -- Strict RTP learning complete - Locking on source address 103.44.119.75:40046
  == Manager 'vtiger' logged off from 172.26.5.19
    -- <SIP/2810-00000001>AGI Script agi://0.0.0.0/incoming.agi completed, returning 4
  == Spawn extension (vtiger_outbound, 2810, 1) exited non-zero on 'SIP/2810-00000001'
Scheduling destruction of SIP dialog '2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060' in 6848 ms (Method: INVITE)
set_destination: Parsing <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184> for address/port to send to
set_destination: set destination to 103.44.119.75:5060
Reliably Transmitting (no NAT) to 103.44.119.75:5060:
BYE sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184 SIP/2.0
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK02d9692a
Max-Forwards: 70
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 103 BYE
User-Agent: Asterisk PBX 11.25.3
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:103.44.119.75:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 13.127.240.181:5060;branch=z9hG4bK02d9692a
Contact: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>
To: <sip:2810@103.44.119.75:5060;transport=UDP;rinstance=473283b32db66184>;tag=f57cf307
From: <sip:7798600238@13.127.240.181>;tag=as1c664084
Call-ID: 2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060
CSeq: 103 BYE
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '2f51809a2bf7167a1d829bd71c48a746@13.127.240.181:5060' Method: INVITE

<--- SIP read from UDP:103.44.119.75:54619 --->


<------------->
Really destroying SIP dialog 'kYA6aBjsQL-Y4KJrHsfrMA..' Method: REGISTER
Really destroying SIP dialog 'ZjA0NzlhZTRkNWNhYmQ5OGY5ZGQzNDQ5MThiNjFmZGU.' Method: REGISTER

<--- SIP read from UDP:103.44.119.75:5060 --->
INVITE sip:quit@13.127.240.181:5060 SIP/2.0
Via: SIP/2.0/UDP 103.44.119.75:5060;branch=z9hG4bK-d8754z-6012d86acf062c21-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:2810@103.44.119.75:5060;transport=UDP>
To: <sip:quit@13.127.240.181:5060>
From: "2810"<sip:2810@13.127.240.181:5060>;tag=7d383d25
Call-ID: ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 406

v=0
o=3cxVCE 26652855 230542875 IN IP4 103.44.119.75
s=3cxVCE Audio Call
c=IN IP4 103.44.119.75
t=0 0
m=audio 40048 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
m=video 40010 RTP/AVP 34
c=IN IP4 103.44.119.75
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=1;CIF=1;SQCIF=1;CIF4=1
a=sendrecv
<------------->
--- (13 headers 18 lines) ---
Sending to 103.44.119.75:5060 (no NAT)
Sending to 103.44.119.75:5060 (no NAT)
Using INVITE request as basis request - ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.
Found peer '2810' for '2810' from 103.44.119.75:5060
  == Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format GSM for ID 3
Found audio description format telephone-event for ID 101
Found RTP video format 34
Found video description format H263 for ID 34
Capabilities: us - (g723|gsm|alaw), peer - audio=(gsm|ulaw|alaw)/video=(h263)/text=(nothing), combined - (gsm|alaw)
Non-codec capabilities (dtmf): us - 0x0 (nothing), peer - 0x1 (telephone-event|), combined - 0x0 (nothing)
       > 0x7fc24c067c10 -- Strict RTP learning after remote address set to: 103.44.119.75:40048
Peer audio RTP is at port 103.44.119.75:40048
Looking for quit in default (domain 13.127.240.181)

<--- Reliably Transmitting (no NAT) to 103.44.119.75:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 103.44.119.75:5060;branch=z9hG4bK-d8754z-6012d86acf062c21-1---d8754z-;received=103.44.119.75;rport=5060
From: "2810"<sip:2810@13.127.240.181:5060>;tag=7d383d25
To: <sip:quit@13.127.240.181:5060>;tag=as6a43ab9b
Call-ID: ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
[Aug 22 09:48:29] NOTICE[12505][C-00000002]: chan_sip.c:25902 handle_request_invite: Call from '2810' (103.44.119.75:5060) to extension 'quit' rejected because extension not found in context 'default'.
Scheduling destruction of SIP dialog 'ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.' in 6848 ms (Method: INVITE)

<--- SIP read from UDP:103.44.119.75:5060 --->
ACK sip:quit@13.127.240.181:5060 SIP/2.0
Via: SIP/2.0/UDP 103.44.119.75:5060;branch=z9hG4bK-d8754z-6012d86acf062c21-1---d8754z-;rport
Max-Forwards: 70
To: <sip:quit@13.127.240.181:5060>;tag=as6a43ab9b
From: "2810"<sip:2810@13.127.240.181:5060>;tag=7d383d25
Call-ID: ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog 'ZWFkNWY1ZTRkZTRkNjMwNGU2MGVmYjY5ODQzNTAzY2M.' Method: ACK

I would say the AGI script definitely requested a hangup by returning non-zero.

What should I do now?

Confirm the AGI script is running and the return code is not the result of failing to launch it. If it is failing to launch, check the usual suspects like permissions, path, and correct location.

As you said I check my agi-bin folder. It’s path is /var/lib/asterisk/agi-bin and in that folder there is no files. The folder is empty. I don’t know how to check AGI script running or not.

Looking more closely, you are using the FastAGI syntax, so you need to have started an AGI server.

It appears to me that you cannot be the designer of this AGI, so you need to contact the designer to find our how it is really supposed to work.

(If you had been using the local script syntax, and there was only a relative file name, and nothing in the agi-bin directory, it would have been obvious why it was failing, but, as AGI is always a local customisation, we would not have been able to tell you what to put there.)

Hey I forgot to tell you that I have vtiger asterisk connector. So when I run agi.sh I got following while outbound call.

Aug 23, 2018 5:53:18 AM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Listening on *:4573.
Aug 23, 2018 5:53:39 AM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Received connection from /13.127.240.181
Aug 23, 2018 5:53:39 AM org.asteriskjava.fastagi.AbstractAgiServer getPool
INFO: Thread pool started.
Aug 23, 2018 5:53:39 AM org.asteriskjava.fastagi.ResourceBundleMappingStrategy loadResourceBundle
INFO: Added mapping for 'incoming.agi' to class com.vtiger.apps.asterisk.agi.actions.IncomingCall
Aug 23, 2018 5:53:39 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript
INFO: Begin AgiScript com.vtiger.apps.asterisk.agi.actions.IncomingCall on Asterisk-Java DaemonPool-1-thread-1
Aug 23, 2018 5:53:39 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Asterisk Login Successfull
Aug 23, 2018 5:53:39 AM org.asteriskjava.manager.internal.ManagerConnectionImpl connect
INFO: Connecting to 172.26.5.19:5038
Aug 23, 2018 5:53:39 AM org.asteriskjava.manager.internal.ManagerConnectionImpl setProtocolIdentifier
INFO: Connected via Asterisk Call Manager/1.3
Aug 23, 2018 5:53:39 AM org.asteriskjava.manager.internal.ManagerConnectionImpl setProtocolIdentifier
WARNING: Unsupported protocol version 'Asterisk Call Manager/1.3'. Use at your own risk.
Aug 23, 2018 5:53:39 AM org.asteriskjava.manager.internal.EventBuilderImpl buildEvent
INFO: No event class registered for event type 'fullybooted', attributes: {privilege=system,all, event=FullyBooted, status=Fully Booted}. Please report at http://jira.reucon.org/browse/AJ
Aug 23, 2018 5:53:39 AM org.asteriskjava.manager.internal.ManagerConnectionImpl doLogin
INFO: Successfully logged in
Aug 23, 2018 5:53:41 AM org.asteriskjava.manager.internal.ManagerConnectionImpl doLogin
INFO: Determined Asterisk version: Asterisk 1.6
Aug 23, 2018 5:53:41 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: org.asteriskjava.manager.event.ConnectEvent[dateReceived='Thu Aug 23 05:53:41 UTC 2018',server=null,protocolidentifier='Asterisk Call Manager/1.3',sequencenumber=null,timestamp=null,systemHashcode=863596444]
Aug 23, 2018 5:53:41 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Sending HTTP request to webapp
Aug 23, 2018 5:53:42 AM org.asteriskjava.manager.internal.AbstractBuilder setAttributes
WARNING: Unable to set property 'connectedlinename' to '<unknown>' on org.asteriskjava.manager.event.StatusEvent: no setter. Please report at http://jira.reucon.org/browse/AJ
Aug 23, 2018 5:53:42 AM org.asteriskjava.manager.internal.AbstractBuilder setAttributes
WARNING: Unable to set property 'connectedlinenum' to '7798600238' on org.asteriskjava.manager.event.StatusEvent: no setter. Please report at http://jira.reucon.org/browse/AJ
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: org.asteriskjava.manager.event.StatusEvent[dateReceived='Thu Aug 23 05:53:42 UTC 2018',privilege='Call',server=null,calleridname=null,extension='7010',link=null,channel='SIP/7010-00000003',seconds='10',calleridnum='7798600238',context='vtiger_inbound',actionid=null,callerid='7798600238',state='Up',uniqueid='1535003612.3',channelstatedesc='Up',timestamp=null,variables=null,internalactionid='2062770836_6',bridgedchannel=null,priority='1',sequencenumber=null,channelstate='6',bridgeduniqueid=null,accountcode=null,account=null,systemHashcode=177010132]
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Started Manager Event
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Sending HTTP request to webapp
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Sending HTTP request to webapp
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: org.asteriskjava.manager.event.StatusCompleteEvent[dateReceived='Thu Aug 23 05:53:42 UTC 2018',server=null,internalactionid='2062770836_6',sequencenumber=null,actionid=null,items='1',timestamp=null,systemHashcode=1999348286]
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Sending HTTP request to webapp
[Fatal Error] :1:1: Premature end of file.
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.c a
SEVERE: null
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
        at com.vtiger.apps.asterisk.agi.b.c.a(SourceFile:48)
        at com.vtiger.apps.asterisk.agi.actions.IncomingCall.process(SourceFile:55)
        at com.vtiger.apps.asterisk.agi.actions.IncomingCall.service(SourceFile:26)
        at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:144)
        at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Aug 23, 2018 5:53:42 AM org.asteriskjava.manager.internal.EventBuilderImpl buildEvent
INFO: No event class registered for event type 'softhanguprequest', attributes: {channel=SIP/7010-00000003, cause=32, privilege=call,all, event=SoftHangupRequest, uniqueid=1535003612.3}. Please report at http://jira.reucon.org/browse/AJ
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
SEVERE: Failed to authenticate Vtiger Secret Key
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Logging off from Asterisk
Aug 23, 2018 5:53:42 AM org.asteriskjava.manager.internal.ManagerReaderImpl run
INFO: Terminating reader thread: No more lines available: null
Aug 23, 2018 5:53:42 AM org.asteriskjava.manager.internal.ManagerConnectionImpl disconnect
INFO: Closing socket.
Aug 23, 2018 5:53:42 AM com.vtiger.apps.asterisk.agi.b.b log
INFO: Exiting from agi script
Aug 23, 2018 5:53:42 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript
INFO: End AgiScript com.vtiger.apps.asterisk.agi.actions.IncomingCall on Asterisk-Java DaemonPool-1-thread-1

Consult the author of that script. It looks like it was given some bad XML.

Problem solved after speaking with vtiger support.

HI , excuse me can you post your solution or tell us what produce do you have to do , to fix the problem , do you have to fix in modules on vtiger?

hi there any update?