execute SIP call to deskphone .net - c#

Need to build a simple c# app that takes command line args and then sends/makes a call to a deskphone which is SIP based so that the desktop phone dials the number
The application that does this is frSIP free app but this is for android, I need to make a simple desktop version. The format is (I think)
"sip:" + username + "#" + domain
I also want to replace the "callto" in skype to use this app instead. How do I change the windows registry to override this callto function programatically?
I just want the desk phone to dial the number

In your registry under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\skype.callto\ there are a few different options to help you play with that.
You can probably replace the Skyp.exe value inside HKEY_LOCAL_MACHINE\SOFTWARE\Classes\skype.callto\shell\open\command to your own .exe file. Just be sure to accept the same parameter input as Skype does when a link is clicked.

Related

How to open whatsapp desktop instead of web using C#

I need C# code to open the WhatsApp desktop application instead of open WhatsApp on the web.
I tried
Process.Start("https://web.whatsapp.com/send?phone=" + textBox1.Text);
but it opens WhatsApp on the web, instead of the WhatsApp Desktop application.
I want to open this link in desktop WhatsApp application
The desktop version of WhatsApp can be found in %LocalAppData%\WhatsApp\Whatsapp.exe.
You get the environment variable with
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Use Path.Combine() to get the backslashes right when combining multiple paths.
Note that the executable above likely just starts another version of WhatsApp.exe. The latest version seems to be in the default key of the Registry at
HKEY_CLASSES_ROOT\whatsapp\shell\open\command
Starting point for an implementation: Registry.ClassesRoot.
Try using the whatsapp protocol:
var process = $"whatsapp://send?phone={textBox1.Text}";
Process.Start(process);
You can append the text argument to send a text:
whatsapp://send?phone=5555555555&text=hello

Check if Windows.System.Launcher.LaunchUriAsync was handled

I try to solve problem with the Windows Phone Launcher.
I have application and I would like to call another application using the uri and pass it some data. And I would like to know if the second application started. If the application was not started I would like to do some fallback.
Example:
bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("secondApp://data/123", UriKind.RelativeOrAbsolute));
if (!result)
{
// Opps. The second application is not installed.
ShowToast("Oops. The applications is not installed.");
UseInternalTinyFunctionalityInstead();
}
But the result is always true. Even though the second application is not installed. And additionally the windows message box is displayed "Search for app in the Store? You need to install an app for this task. Would you like to search for one in the Store? yes, no".
Is it possible to check if the second application was started/ is installed?
Is it possible NOT to display this dialog?
Thank you.
Myth Rush

How can we implement incoming call in windows phone 8?

I want to make a fake incoming call in windows phone 8. As we can compose a call can i do the same with incoming call.
For Making a call i am using following code:
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "8920383839";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
You can't directly make a phone call (real & fake) in Windows Phone.However , if your app has ID_CAP_PHONEDIALER capability , you can show a popup for user to call the number you provided in your code.
In addition , there's no way to catch incoming calls.It's not permitted via Windows Phone API's.
You can create a fresh XAML page that strecthes to the screen and put some XAML controls inside it to get a fake incoming call screen , play a ringtone and achieve what you want.However , I doubt that application will go through Store :)

Windows Phone - link to the publisher in the app store

I have created several windows phone apps and I would like to link to my publisher's page to show all of the apps that I publish. Note that I am developing my app for Windows Phone 7.x and up using C# and XAML.
UPDATE
What I would like to do is show the following publisher page: From within Windows Phone, navigate to the Windows Phone store, then select any app, then select the "more from <Publisher>" link. This displays a nice mobile view of all of that publisher's apps. But I can't figure out how to bring up that publisher page directly from within my app. Any help would be appreciated!
Option 1) Link directly to the URL for my publishers page (using a WebBrowserTask)
Issue) All links to the store seem to require the en-US language embedded in the URL. I'm concerned about what will happen to users in other countries/languages.
Example: http:/www.windowsphone.com/en-US/store/publishers?publisherId=Microsoft%2BCorporation
Is there a language independent way to link to a publisher in the store?
Option 2) Use the MarketplaceDetailTask to link to the publisher
Issue) From what I've seen, this can only be used to link to an app. I tried using my publisher GUID and got: Marketplace Error - We're sorry, but we can't complete your request right now.
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.ContentIdentifier = <My Publisher GUID>;
marketplaceDetailTask.Show();
Option 3) Use the MarketplaceSearchTask to link to the publisher
Issue) This allows searching the store with any string. The problem is, when I put my publisher name in the search string, other apps are shown in addition to mine. My publisher name includes a common word and any app with that word shows up.
MarketplaceSearchTask searchTask = new MarketplaceSearchTask();
searchTask.ContentType = MarketplaceContentType.Applications;
searchTask.SearchTerms = "<My Publisher Name>";
searchTask.Show();
Any thoughts or suggestions would be appreciated!
Thanks.
As you're targeting WP7+, unfortunately using the zune:search URI only works on WP8 as it relies on URI Schemes, which was not backported to WP7. Based on these two posts, I tried the following on your behalf:
zune://search/?publisher=Henry%20Chong;
And a bunch of other things, but it seems that only zune://navigate is available on Windows Phone 7 and that only allows you to load a specific app. (Perhaps someone who feels like opening reflector or on the Phone teams could comment here...)
Two other things I've come across that you can look into:
1) There used to be an undocumented Zune api that you could query the marketplace against; it looks like this has been replaced by the Marketplace Edge Service, which you could try and dig around for:
http://social.msdn.microsoft.com/forums/windowsapps/en-US/f5294fcb-f4b3-4b19-9bda-f49c6a38b327/marketplace-edge-service-query
2) You could add a specific unique keyword to all your apps and use the MarketplaceSearchTask, as suggested here by Matt.
Personally, I'd go with #2 because:
you never know when the Marketplace Edge Service will change
1 is not technically supported by Microsoft
you won't have to replicate the page you're trying to display
Of course, there's also nothing stopping you from creating your own "Apps by X" page for your app and maintain it yourself manually.
Best of luck!

Get Localized Names of Installed Windows Store Apps in Windows 8

I want to populate a ListBox with the localized display names of all the installed Windows Store apps in a Windows 8 desktop app. I tried this:
string Apps = Interaction.Environ("ProgramFiles") + "\\WindowsApps";
foreach ( App in IO.Directory.GetDirectories(Apps)) {
XmlDocument xml = new XmlDocument();
xml.LoadXml(My.Computer.FileSystem.ReadAllText(App + "\\AppxManifest.xml"));
lbApps.Items.Add(xml.GetElementsByTagName("DisplayName")(0).InnerText);
}
But it adds up ms-resource strings and default apps that are uninstalled.
EDIT: I found that all the installed apps have their shortcuts in %LocalAppData%\Microsoft\Windows\Application Shortcuts but those shortcuts don't have the localized name and are non-functional when opened.
Instead of parsing the AppxManifest files directly, use the PackageManager class.
On MSDN, there are quite a few samples that demonstrate how to gather a variety of content about installed application packages, including the Enumerate app packages by user SID sample.
Did you try that: http://marcominerva.wordpress.com/2012/12/17/localizing-app-name-in-windows-store-apps/
If you set correctly the AppPackage Name on the AppDevCenter, your appx on the client side will return you the localized name.
I don't think that There are Windows Runtime APIs which can expose this particular information back to the app. The owner of app is responsible to providing the information to the Appx Manifest in the first place. whatever you can take a look there-[http://msdn.microsoft.com/en-us/library/Hh446622 ] hope something can be useful for you.

Categories