How generate a call to a Cisco IP phone from VB.net application - cisco

I'm in a need of develop an application to get calls to Cisco CUCM extension numbers via VB application. I have Installed the Tapi driver for the computer and now i need to know where to start. Your advice is highly appreciated
Thank You

Take a look at JulMar's ATAPI .net assembly for TAPI 2.x. (http://atapi.codeplex.com/).
It's free and I've used it for Cisco CUCM as well as a many other telephone systems. I don't use VB.net, (so please don't judge my very simplistic code example). My experience is in CTI not VB.
'The extension number of the Cisco Endpoint
Dim deviceNumber As String = "PUTEXTSIONHERE"
' The number you want to call
Dim callNumber As String = "PUTNUMBERTOCALLHERE"
Dim mgr As JulMar.Atapi.TapiManager = New JulMar.Atapi.TapiManager("Test App")
' Now iterate through all the lines -
' and make a call from any address that matches our device number
mgr.Initialize()
For Each line As JulMar.Atapi.TapiLine In mgr.Lines
For Each address As JulMar.Atapi.TapiAddress In line.Addresses
If address.Address = deviceNumber Then
line.Open(JulMar.Atapi.MediaModes.InteractiveVoice)
line.MakeCall(callNumber)
line.Close()
End If
Next
Next
mgr.Shutdown()
If you want to control more than one line (~Handset), you'll need to use the
third-party TAPI TSP (The alternative is First-Party for a single line);
You'll need to ask your Cisco maintainer to configure your Cisco CUCM and depending on the CUCM version. Here's a link for CUCM V11; http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/admin/11_0_1/sysConfig/CUCM_BK_C733E983_00_cucm-system-configuration-guide/configure_cti_applications.pdf
Configure the TSP on your machine for the user that has been created for you and with details of the CUCM;
My example is very simplistic. e.g. It is possible to register an address to more than one line on a CISCO CUCM.

Related

Problem communicating with 3rd party apps via VBA on Mac M1

I have created a VBA add-in for Microsoft Word. Both a Windows and Mac version. The add-in communicates with 3rd party apps.
This has worked fine for years. I'm now struggling making this work for the Mac-version with M1-based macs (Maybe also Big Sur related).
The communication works partly via a dylib written i c, via stdin and stdout.
Secondly some functions use AppleScriptTask.
I can't make either of these two methods work.
AppleScriptTask always return the error:
Run-time error '5'
Invalid procedure call or argument
VBA-code:
s = AppleScriptTask("WMscript.scpt","Test","")
I tried scripts with .scpt, .scptd and .applescript.
Also newly created scriptfiles with simple test.script:
on Test(paramS)
tell application "Finder"
activate
end tell
end Test
The api works in other applications, but I can't open 3rd party apps in it when used from VBA.
I use these special folders for the all the 3rd party files to circumvent sandboxing for both methods:
/Library/Application support/Microsoft/Office365/User Content/Add-ins/
~/Library/Application Scripts/com.microsoft.word/
~/Library/containers/com.microsoft.word/Data/
I also tried the GrantAccessToMultipleFiles(FileArray) function. It always returns 'True' regardless which filenames are sendt in the array. It never prompt the user.
Running:
M1 Mac
Big sur 11.6 (M1)
Microsoft Word for Mac 16.54 (21101001)
Not sure following will help you.
If your third-party application is from unknown developer, then it goes to GateKeeper quarantine. Try to remove quarantine before calling your VBA script, running following script.
set theApp to application id "Avidemux.org" -- EDIT here the bundle ID
set quotedPath to quoted form of (POSIX path of (path to theApp))
do shell script "xattr -rd com.apple.quarantine " & ¬
quotedPath with administrator privileges
You can include the code above to beginning of your VBA script.
The ApplceScriptTask problem was related to an incorrect path, for the script file:
Incorrect: ~/Library/Application Scripts/com.microsoft.word/
Correct: ~/Library/Application Scripts/com.microsoft.Word/
Had to be Uppercase W.

Make one time only activation code to python code, and make updates available?

I'm coding a program to do some action with webdriver and Autoit in python, I want to do two things before I start selling my code:
Add onetime activation code to my software on one PC, like to make the program works only on one pc.
Make my program able to receive updates from the internet once I add to the code some more features or correct some others.
is it possible only with Python? or what is the method statement to do it?
On client side you need use hard-disk serial or/and uuid of partition or Operational System timestamp + something to generate serial code .
On server side , you need a API to store hard disk serial to validate if this is a computer valid . And you client on load check if activaction is valid .
The second question i can't answer .
Regarding the second part of your question:
Create a text file with the latest version of your application and put it on your webserver e.g. http://download.example.com/example-app-version.txt to get and read its value later.
On your python code download and read the text (for Python 3+ use 'import urllib.request' and urllib.request.urlretrieve) when your app runs and compare it against the installed version (if statement).
E.g.
if latestVer > installedVer:
#update
else:
#application continues

Receiving Market Data into Excel

My summer project is developing an algorithmic trader that receives market data and trades based off indicators. I pull data from a company called Interactive Brokers using their TWS(Trader workshop station). I have downloaded their Excel API which uses DDE, but cannot get the Excel spreadsheet to properly connect with TWS.
In my excel spreadsheet, I wrote this command into a random cell. I've replaced 'sample123' with my TWS username It is suppose to evaluate to 0 before I make other adjustments but it evaluates to #REF!:
=Ssample123|tik!'id1?req?EUR_CASH_IDEALPRO_USD_~/'
Image of error received
Another issue with the error is it deletes two characters off my username and I am unsure of why.
Ex: username -> Sample123
Outcome -> Sample1
Any suggestions would be greatly appreciated! Thank you and have a nice day.
'sample123' in the example formula is the username that was used to login to TWS. It has to be replaced in your formulas with the actual username you used to login to TWS.
Also, to use the older legacy TWS DDE API you have to be running 32 bit TWS and have the setting "Enable DDE" checked in TWS Global Configuration.
Issues causing the #REF error
There is a newer 'DDE Socket Bridge' TWS API also available in the Latest version of the API which has additional functionality and is compatible with the 64 bit version of TWS.
DDE SocketBridge API
I've had the same problem. Just put twsserver instead

.net core Linux app screw up keypad input

I use PuTTY to connect to my Debian box.
If I have a console.readline I the application I cannot use the keypad to input numbers.
E.g. 1 is received as "Oq" and 2 as "Or"
Not problem using the "normal" number keys.
My .net core code:
Imports System
Module Program
Sub Main(args As String())
Console.Writeline("Please type 1 from numpad:")
Dim str as string = Console.Readline
Console.Writeline("You typed: " & str)
End Sub
End Module
Is it an issue with .net core or PuTTY?
I've tried playing around with the settings in PuTTY (Terminal\Keyboard\Function keys and keypad) but it didn't change anything.
I don't have the problem using the keypad in the shell, only in the .net core app.
If I use a keyboard directly connected to the Debian box I don't have the problem either.
Okay, I tried some different Google search approaches and this time I found something:

How to call telephone number through asterisk trunk from external application talking through prophecy?

Wow, that title was a mouthful...
I'm sure that sounds very confusing at first glance. This is the basis of what I've got going on:
I have:
-a server set up with Asterisk and Voxeo Prophecy running on it.
-Prophecy set up as extension for Asterisk.
-another server running an external application.
The external application generates some two XMLs: one ccxml and one vxml file, for Voxeo to read and execute, which then initiates a call to (up until today) an asterisk extension.
The project is moving along, though, and yesterday I got a SIP Trunk and a DID number in hopes to turn this application into something that can call real people.
The trunk is working on Asterisk, and I've been able to initiate calls through a softphone (X-lite) to my cell phone number. That works just fine.
However, when I try to initiate calls from the external application, it does not go through. I've tried numerous things to try to fix it but it's just not working.
Prior to the trunk/DID business, the working code to call an asterisk extension was as follows:
<createcall>dest="'sip:*Extension here*#*IP Address here*'"
connectionid="myOutBoundConnectionID" timeout="'45s'" callerid="'*Extension here*
#*IP Address here*'"</createcall>
My first thought was that I might need to have a trunk specified for Prophecy as well as for Asterisk, but I'm probably way off base.
The reformatted code that I thought would work was as follows:
<createcall>dest="'tel:*Phone Number here*'" connectionid=
"myOutBoundConnectionID" timeout="'45s'" callerid="'*Phone Number here*
'"</createcall>
...but this does not work at all.
The log files say things like this when I call from my softphone:
-- Executing [*My phone number*#from-internal:1] Macro("SIP/1001-0000007d", "user-
callerid,LIMIT,") in new stack
but when I call from the external application, things are a little different:
-- Executing [*My phone number*#from-sip-external:1] NoOp("SIP/*IP Address:5080-0000007c",
"Received incoming SIP connection from unknown peer to *phone number*") in new stack
Can anyone shed some light on what is happening here? Thanks in advance!
You should make your reformatted create call look something like this:
<createcall>dest="'tel:*Phone Number here*#*IP Address of Asterisk*'" connectionid= "myOutBoundConnectionID" timeout="'45s'" callerid= "'*Prophecy's Asterisk Extension'"</createcall>
Make sure your Asterisk server has an outbound rule to hit 10-digit phone number via your SIP trunk (I assume it does if your softphone calls work.
Depending on your SIP provider, this may result in your outbound calls appearing to come from the Extension number, not whatever external number you want to present. If you wish to present another number, you probably need to get prophecy to register the SIP station it uses, if you haven't already (in Prophecy's config.xml), in fact you may need/have to do this anyway before this will work.

Resources