PDA

View Full Version : About Third Party Call Control interface of Quadro



hrant
12-24-2007, 03:07 AM
3pcc (Third Party Call Control) allows third party developers to write their own software applications on PC to manage the calls on Quadro. For example, an MS Outlook plug-in could be created that would initiate a call by clicking on a selected contact in Outlook address book. Another example would be an application that pops up a window every time when a call arrives to Quadro extension, displaying the caller’s details received with the call (for example, in SIP message) as well as the information retrieved from the database on that caller (in other words, the information that is not received with the call but rather retrieved from the company’s local database).
To start managing the calls, first thing the application needs to do is to establish TCP connection with Quadro. As soon as the connection is established, the application gets access to the following call management functions on Quadro (only the main functions are listed below):
·Create call – makes a call on behalf of some virtual extension of Quadro. The remote end of the call is either a local extension on Quadro or any other external user accessible from Quadro
·Transfer call – transfers an active call to another destination
·Join calls – if there are two separate calls created by application with local endpoints on Quadro then this function allows to join these two calls establishing direct connection between the two remote endpoints of the previously established calls
·Play message – plays a wave file (voice message) to the remote endpoint after creating the call
·Inject DTMF – injects DTMF tones to the remote endpoint after creating the call
·DTMF detection – detects the DTMF tones received from the remote endpoint after creating the call
·Accept call – accepts the call received on Quadro extension monitored by application (if the call is accepted by application then the call is being processed in regular way: the extension’s phone will ring and the user may answer the call)
·Reject call – rejects the call received on Quadro extension monitored by application (if the call is rejected by application then the Quadro extension will not receive that call any more)
·Forward call – forwards the call received on Quadro extension monitored by application to another destination
·Subscribe to voice mail – allows the application to get notification from Quadro every time when a new voice massage is recorded in extension’s voice mail box
·Subscribe to CDR - allows the application to get Call Detail Records from Quadro in real time
·Subscribe to Dialog and Presence – allows the application to get notifications from Quadro every time when Dialog or Presence statuses of extension are being changed
Two options are available to applications for getting access to 3pcc functionality on Quadro:
·Via MS ActiveX Control provided by Epygi. This method works for applications built using MS tools (like Visual Basic) and running in MS Windows environment
·Via XML RPC. This method is platform independent and all interface functions can be called by sending a corresponding XML RPC requests to the server running on Quadro.
For more details on 3pcc interface see the documents on Epygi’s WEB site. On the WEB you can find also the source codes of the sample programs using both methods mentioned above. You are free to use that code for writing your own applications. Don’t hesitate to apply to Epygi’s technical support for help on any information regarding 3pcc interface.
Epygi would be very interested to see in this section of the forum the posts from the customers who are already using that interface and have built applications that could be shared by the others.
Also, I would like to inform you that the Epygi’s HotCall application (MS Outlook plug-in you can download from the WEB) is using 3pcc ActiveX control. The next application that Epygi is working on (to be available on the Q1 2008) is the SugarCRM plug-in, controlling the calls to/from Quadro extensions from SugarCRM user interface.

lansmart
01-14-2008, 02:09 PM
Anyone using 3PCC with IIS, specifically IIS 6/7 with dotnet 2

Having trouble figuring out how to interact with the control as only webapp example is for PHP.... ugh.

rwalland
08-26-2008, 04:01 AM
Hi,

I would just like to ask when the SugarCRM plug-in will be avaliable, or is it?

Regards,

hrant
08-26-2008, 09:02 AM
The plug-in for SugarCRM does exist and is going to be published on Epygi's web this week along with the document.

GB
08-28-2008, 12:41 AM
i dont know where is the best place to post this issue. i decided to report here since sugarcrm also works in php. the problem i am facing is that the sample call control application provided with quadro is not working for me. i am interested only in the php application but even the other samples dont work. i am able to create a call successfully, i.e. the phone i called starts ringing (i hear nothing on the headset but since it is a local setup i can hear it ringing on the other side); but when someone picks up, it just dies after about 4 sec. sometimes the call remains on but none of the parties can hear a thing.

is someone else experiencing the same problem or i have any issues with my setup? can this be a problem with codecs?

any reply is appreciated...

GB
08-28-2008, 01:21 AM
sorry, but i forgot to mention that the same setup works fine when i am using softphones (x-lite in this case).

davrays
08-28-2008, 09:51 AM
I guess you didn't read the 3pCC documents carefully. 3pCC is a 3-rd party call control. That means the controling application is not a part of the call, so you cannot hear anything on the headset of the PC running 3pcc application. To have normal call connection between two parties, you need to create a call to one party, then create a call to the second party, then join them. Your PC is just the 3-rd party, not participating in the call, but controlling that.

GB
08-29-2008, 02:55 AM
Thanks for the reply dave.

I got your point and then tried to connect to defferent phones usng the sample application that quadro provides. But I am still unable to make a call. The call just wont get created. Is it required that the physical extension of the phones be there to create the call as I am testing using softphones (PortSIP in my case).

Also, does anybody have a simple php script which can create me a call. Just a simple call will do :-).

Thanks again guys.

GB
08-29-2008, 04:17 AM
I have two extensions 311 and 313 on my quadro server. I am using this php code:

<?php
require_once 'XMLCalls_inc.php'
$net = new XMLCalls(<authentication variable>);
$net->Authenticate();

$net->Call('313','pbx:311',null);
?>

This script is supposed to setup a call between 311 and 313 but it isn't. It just keep processing and goes into an infinite loop. 311 and 313 are configured as softphones on different computers.

Any thoughts???

davrays
08-29-2008, 06:11 AM
if 311 and 313 exist on the Quadro, it should be possible to setup such a call (at least the 311 should ring). Maybe if you choose something different than "null" in the last parameter, you can receive events telling you the reason of the failure.
I have practically no knowledge in PHP, so I cannot help much here.
Try to use Join. That function is much more user friendly and could work better for you.
Something like "Join('00', 'pbx:311', '00', 'pbx:313', null)".

GB
09-01-2008, 08:10 AM
I tried to use the sample applications provided by epygi to create a call, but was not successful. Can this mean that there is some configuration issue on the server?

davrays
09-01-2008, 10:49 AM
Something tells me that there can be a problem in the PHP samples provided in the pack...
After more checking I found that there might be incompatibility between the published PHP script and the current 3PCC interface (the script is old).

Can you please try the attached updated files and tell how it goes?
Those are the latest, so if they don't work, probably there should be other problem.

GB
09-01-2008, 11:21 AM
Thanks for the swift responses dave. But the latest scripts dont work as well. What other problem can there be?

One more thing; what shoukd be the exact behavior of the call when I create one using the php sample provided by you. I mean should it call from first then to or vice-versa?

Thanks again for responding. You guys have been really helpful.

davrays
09-01-2008, 11:45 AM
Well, the expected behaviour of the Call(A,B) function is: the B phone will ring, indicating A as caller. After B answers, the user will listen silence. Thats it.
The expected behaviour of the Join(A,B,C,D,null) is: B will ring, indicating A as caller. After B answers, user will hear nothing, but then D will ring, indicating C as caller. After D answers, the B and D will listen to each other.
The expected behaviour of Transfer(A,B,C) is: B will ring, indicating the A as caller. After B answers, the call will be transferred, so B will listen ringback tone, and the C will ring. As soon as C answer, he will talk to B.

All that should have been written in the readme.txt or in the appropriate document, but it is not. Sorry for that. I'll spur on this, so hopefully we'll publish the updated doc soon.

Best regards,
David

P.S. The described bahaviour may seem a bit senless, but please note that those functions are just samples, which developer can use for reference, that is not an actual API, or moreover a ready application. Any meaningful behaviour is supposed to be programmed by user-developer (you in this case :) ), using the PHP sample as a reference code.

GB
09-02-2008, 01:30 AM
Hi David,

I got the part that the functions provided are sample functions but aren't they working functions. I can't get them to behave the way they are supposed to in my case. I was thinking that it might be some configuration issue on the quadro server side. Any suggestions on where I could look?

Thanks

teamnet
09-02-2008, 02:42 AM
Does the sample vb executables work? You have got a valid 3PCC key haven't you?

I haven't used it much other than some initial testing a while back but the sample apps defiiately worked for me.

When you say the scripts don't work - exactly what is the issue? How far does the script get? Does it authenicate?

So many questions, so little time......

GB
09-02-2008, 03:13 AM
None of the sample applications work (including VB). I know I have a valid 3pcc key as I can call using softphones (for the reference, I use PortSIP). When I say the scripts dont work I mean to say that the call is not getting created. This is what happens:

For now, I cannot create a call between any two extensions present on the quadro server. There are different errors on different times. For e.g the error I am getting now is a "Timeout Occurred" error when trying Join('00','pbx:313','00','00919916936554',null), where
00 - attendent extension on quadro
pbx:313 - an extension on quadro to which i am logged in
00919916936554 - is my mobile number.

It just says error on the browser. I logged in to the quadro server and found this error message under Unsuccessful calls.

On the other hand if I try Join('00','00919916936554','00','00919986206206',n ull), both numbers get connected but none can hear a thing (I mean after picking up).

I tried using Transfer as well but that failed with the same errors.

Any help???

davrays
09-02-2008, 08:49 AM
Well, this is getting even more interesting.. Looks like your problem is on the Quadro side, not the PC application/script.
Lets do the following tow things:

1. First of all make sure you have bought and installed correctly the 3PCC feature key. Running softphone has nothing to do with teh 3PCC interface, as softphone works just like a normal phone, without any usage of 3pcc. Please go to "System"->"Features" page and see if you have "Activated" indicated on the "Support for Third Party Call Control" line in the table.

2. If the key is really activated, please go to the "System"->"Diagnostics"->"Show System Logs"->"View System Logs", enter "extcc.log" on the single editbox on that page, and press "Show Custom Log" (the link near that editbox). This will print the 3pcc log on the browser. Please copy that and paste here, so we can see what happens there.

Thanks,
David

GB
09-02-2008, 09:16 AM
Hi,

I have the 3pcc feature activated.

The extcc.log had these entries:

71499
.188 CCS: ProcessXmlRpcRequest. Processing call... 4714775407792071499
.190 CCS: ProcessXmlRpcRequest. Sending response...
.192 CCS: BuildAndSendXml. Sending data (155 bytes)...
.192
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><string>4714775407792071499</string></value>
</param>
</params>
</methodResponse>


.193 CCS: BuildAndSendXml. Sent...
.194 Call: Create. from: 311, to: 313. display name: . 4714775407792071499
.195 ExtCallControl. CreateCallReceived. from: 311, to:313@:. display name: . 4714775407792071499
.247 ExtCallControl. CallStateChanged. callState: 0. 4714775407792071499
.289 CCS: BuildAndSendXml. Sending data (269 bytes)...
.289
<?xml version="1.0"?>
<methodCall>
<methodName>Services.CallProcessingService.callstatechanged</methodName>
<params>
<param>
<value><string>4714775407792071499</string></value>
</param>
<param>
<value><int>0</int></value>
</param>
</params>
</methodCall>


.290 CCS: BuildAndSendXml. Sent...
.291 CCS: Thread. Entering to select count = 19, timeout = 10.
.292 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.293 CCS: Thread. Entering to select count = 19, timeout = 10.
.752 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.753 CCS: ProcessIncomingXmlRpc. Received data...
.753
<?xml version='1.0'?><methodResponse>
<params>
<param>
<value><string>4714775407792071499</string></value>
</param>
</params>
</methodResponse>
.757 CCS: ProcessXmlRpcResponse. Processing call... 4714775407792071499
.758 CCS: Thread. Entering to select count = 19, timeout = 0.
11:18:29.271 ExtCallControl. CallStateChanged. callState: 6. 4714775407792071499
.295 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.299 CCS: BuildAndSendXml. Sending data (269 bytes)...
.299
<?xml version="1.0"?>
<methodCall>
<methodName>Services.CallProcessingService.callstatechanged</methodName>
<params>
<param>
<value><string>4714775407792071499</string></value>
</param>
<param>
<value><int>6</int></value>
</param>
</params>
</methodCall>


.300 CCS: BuildAndSendXml. Sent...
.301 CCS: Thread. Entering to select count = 19, timeout = 10.
11:18:39.242 CCS: Thread. Leaving from select. ret = 0, sockerror 17.
.244 CCS: Request failed... 4714775407792071499
.244 Call: Delete. (C:2) 4714775407792071499
.245 CCS: Thread. Entering to select count = 19, timeout = 0.
11:19:01.950 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.951 CCS: Create. (C:19)
.952 CCS: Thread. Entering to select count = 20, timeout = 0.
.968 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.969 CCS: ProcessIncomingXmlRpc. Received data...
.970
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>Services.CallProcessingService.authenticate</methodName>
<params>
<param>
<value>
<string>admin</string>
</value>
</param>
<param>
<value>
<string>931978</string>
</value>
</param>
</params>
</methodCall>

.975 CCS: ProcessXmlRpcRequest
.980 Call: Create. (C:3) 0
.980 Call: AuthenticateCB. admin
.981 CCS: Authenticate:
11:19:02.023 CCS: Authenticate. Sending authenticate response...
.026 CCS: BuildAndSendXml. Sending data (206 bytes)...
.026
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
<param>
<value><string>Authenticated.</string></value>
</param>
</params>
</methodResponse>


.027 CCS: BuildAndSendXml. Sent...
.028 Call: Delete. (C:2) 0
.029 CCS: Thread. Entering to select count = 20, timeout = 0.
.303 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.304 CCS: ProcessIncomingXmlRpc. Received data...
.305
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>Services.CallProcessingService.createcall</methodName>
<params>
<param>
<value>
<string>7088820024538853130</string>
</value>
</param>
<param>
<value>
<string>311</string>
</value>
</param>
<param>
<value>
<string>pbx:313</string>
</value>
</param>
</params>
</methodCall>

.312 CCS: ProcessXmlRpcRequest
.312 Call: Create. (C:3) 7088820024538853130
.313 CCS: ProcessXmlRpcRequest. Processing call... 7088820024538853130
.315 CCS: ProcessXmlRpcRequest. Sending response...
.316 CCS: BuildAndSendXml. Sending data (155 bytes)...
.317
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><string>7088820024538853130</string></value>
</param>
</params>
</methodResponse>


.318 CCS: BuildAndSendXml. Sent...
.319 Call: Create. from: 311, to: 313. display name: . 7088820024538853130
.320 ExtCallControl. CreateCallReceived. from: 311, to:313@:. display name: . 7088820024538853130
.344 ExtCallControl. CallStateChanged. callState: 0. 7088820024538853130
.415 CCS: BuildAndSendXml. Sending data (269 bytes)...
.416
<?xml version="1.0"?>
<methodCall>
<methodName>Services.CallProcessingService.callstatechanged</methodName>
<params>
<param>
<value><string>7088820024538853130</string></value>
</param>
<param>
<value><int>0</int></value>
</param>
</params>
</methodCall>


.416 CCS: BuildAndSendXml. Sent...
.417 CCS: Thread. Entering to select count = 20, timeout = 10.
.418 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.419 CCS: Thread. Entering to select count = 20, timeout = 10.
.915 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.917 CCS: ProcessIncomingXmlRpc. Received data...
.917
<?xml version='1.0'?><methodResponse>
<params>
<param>
<value><string>7088820024538853130</string></value>
</param>
</params>
</methodResponse>
.921 CCS: ProcessXmlRpcResponse. Processing call... 7088820024538853130
.922 CCS: Thread. Entering to select count = 20, timeout = 0.
11:19:07.391 ExtCallControl. CallStateChanged. callState: 6. 7088820024538853130
.416 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.419 CCS: BuildAndSendXml. Sending data (269 bytes)...
.420
<?xml version="1.0"?>
<methodCall>
<methodName>Services.CallProcessingService.callstatechanged</methodName>
<params>
<param>
<value><string>7088820024538853130</string></value>
</param>
<param>
<value><int>6</int></value>
</param>
</params>
</methodCall>


.421 CCS: BuildAndSendXml. Sent...
.422 CCS: Thread. Entering to select count = 20, timeout = 10.
11:19:17.363 CCS: Thread. Leaving from select. ret = 0, sockerror 17.
.365 CCS: Request failed... 7088820024538853130
.365 Call: Delete. (C:2) 7088820024538853130
.366 CCS: Thread. Entering to select count = 20, timeout = 0.
14:58:36.279 CCS: Thread. Leaving from select. ret = 1, sockerror 17.
.280 CCS: Thread. recv ret: -1, rcverr: 110
.281 CCS: Delete. (C:19)
.282 CCS: Thread. Entering to select count = 19, timeout = 0.
14:59:26.566 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.567 CCS: Thread. recv ret: -1, rcverr: 110
.568 CCS: Delete. (C:18)
.569 CCS: Thread. Entering to select count = 18, timeout = 0.
15:05:07.575 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.576 CCS: Thread. recv ret: -1, rcverr: 110
.577 CCS: Delete. (C:17)
.578 CCS: Thread. Entering to select count = 17, timeout = 0.
15:05:37.031 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.032 CCS: Thread. recv ret: -1, rcverr: 110
.033 CCS: Delete. (C:16)
.034 CCS: Thread. Entering to select count = 16, timeout = 0.
15:05:41.150 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.151 CCS: Thread. recv ret: -1, rcverr: 110
.152 CCS: Delete. (C:15)
.152 CCS: Thread. Entering to select count = 15, timeout = 0.
15:24:23.886 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.887 CCS: Thread. recv ret: -1, rcverr: 110
.888 Call: Close. 2435157199714478615
.889 ExtCallControl. CloseCallReceived. 2435157199714478615
.890 Call: Delete. (C:1) 2435157199714478615
.890 Call: Close. 1796824763505926872
.891 ExtCallControl. CloseCallReceived. 1796824763505926872
.891 Call: Delete. (C:0) 1796824763505926872
.892 CCS: Delete. (C:14)
.893 CCS: Thread. Entering to select count = 14, timeout = 0.
15:27:15.888 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.889 CCS: Thread. recv ret: -1, rcverr: 110
.890 CCS: Delete. (C:13)
.891 CCS: Thread. Entering to select count = 13, timeout = 0.
15:28:16.233 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.234 CCS: Thread. recv ret: -1, rcverr: 110
.235 CCS: Delete. (C:12)
.235 CCS: Thread. Entering to select count = 12, timeout = 0.
15:28:54.384 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.385 CCS: Thread. recv ret: -1, rcverr: 110
.386 CCS: Delete. (C:11)
.387 CCS: Thread. Entering to select count = 11, timeout = 0.
02 Sep 2008 <---- Date ----<<<
15:31:20.321 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.323 CCS: Thread. recv ret: -1, rcverr: 110
.323 CCS: Delete. (C:10)
.324 CCS: Thread. Entering to select count = 10, timeout = 0.
16:00:33.535 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.536 CCS: Thread. recv ret: -1, rcverr: 110
.537 CCS: Delete. (C:9)
.538 CCS: Thread. Entering to select count = 9, timeout = 0.
16:12:21.249 CCS: Thread. Leaving from select. ret = 1, sockerror 110.
.250 CCS: Thread. recv ret: -1, rcverr: 110
.251 CCS: Delete. (C:8)
.252 CCS: Thread. Entering to select count = 8, timeout = 0.

davrays
09-02-2008, 09:51 AM
Unfortunately this info wasn't enough... I would need more logs here. To have them correspond to each other can you please
1. Make a fresh call (e.g. Call('311','pbx:313') - the same as you did before)
2. Take the Call Controling log (the same as cm.log)
3. Take the extcc.log
4. Take the spmgagent.log
5. Take the SIP User Agent logs (the same as sip_ua.log)
6. Zip them and attach here.

This will give enough information to understand what is happening. It looks like the ext 313 does not answer anything, but to find the reason, we would need more logs. Actually this looks like a TSS question (as it gets a bit complex and needs logs to understand), but lets try to understand here first, before refering to TSS.

GB
09-02-2008, 10:13 AM
I carried out the test call as suggested by you and the logs you asked for are attached here. Thanks for all the help.

davrays
09-03-2008, 04:21 AM
Ok, the diagnosis is the folowing:
we can see (both from these logs and from logs you sent to Yervand) that your phone at extension 313 ("phone2") is not answering to our INVITE message at all. So the call atempt to that phone is timed out.
Also we can guess, that this phone is located behind a Symmetrical and "very secure" NAT, as the IP address/SIP port of the phone are constantly changing.
And the most probably problem is that the firewall (which is that phone located behind) blocks the incoming requests, while it passes through the outgoing registration attempts from that phone.
So, as often is said: "please check your network configuration" :)
Or better make your experiments with phones located in the same subnet as Quadro LAN or WAN (as you prefer), not to create additional problems for yourself.

Best regards,
David

GB
09-08-2008, 03:13 AM
Hi David,

Sometimes, after several requests, we lose port 4849 connection and we need to reboot Quadro.

What do we need to check in order to have a persistent (at least a request every 3 sec) connection between our software (vtiger) and Quadro through 3pcc ? Such connection is required to catch incoming calls.

Regards.

davrays
09-08-2008, 12:19 PM
So I guess, the old problems are solved now, as you are asking new questions ;)
Nice to hear that :)

Losing connection is not a common problem. I think it worth to collect the logs after you lose the connection, and send them to Yervand (you know his mail somehow :)
I'll also look at them, and probable we can tell you the reason.

DarraghHogan
02-10-2010, 03:41 PM
How did you guys impliment with Vtiger? We run the same software here. Were looking to make a connection between the PBX and Vtiger.

GB
02-11-2010, 01:06 AM
The indian vtiger team did a script for me for the Vtiger 5.04.

If you are using this version, you could use this integration script.

Let me know.

Best regards.