Help - Search - Members - Calendar
Full Version: How can I know the rate to be applied to a call?
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
jwdelcarpio_
Hello!

I'm interested in finding a way to determine the rate for calling a specific PSTN before a call it's actually made, or the call's rate applied by Skype after it's finished.

When I submit the "GET CALL <id> RATE" command for a specific call, it replies with a code (let's say 87) for wich I don't have the rate.
sonny
Rates to all destinations (alphabetical order)

http://www.skype.com/products/skypeout/rat.../all_rates.html
jwdelcarpio_
Thanks for your response. I had seen this list before, but what I'm looking for is a way to match the rate code returnd by the "GET CALL <CallId> RATE" command with the list you referred me to so that I can calculate the total amount of the call.
rocketman
jwdelcarpio

Where are you getting this from[quote]"GET CALL <CallId> RATE"[/quote] If you want to know how much you call cost log into your account page.
jwdelcarpio_
Well, one of the Skype API's command is "GET CALL" wich allows you to retrieve properties of the CALL object. One of the properties is "RATE"", so the command "GET CALL <CallId> RATE" returns a value.

Besides, I don't want to know the rate of the call by displaying my calls log. What I need is to find a way to make my program "know" (using the API) the rate applied to a specific call, or the rate that Skype would use if I made the call.
rocketman
QUOTE(jwdelcarpio)
Well, one of the Skype API's command is "GET CALL" wich allows you to retrieve properties of the CALL object. One of the properties is "RATE"", so the command "GET CALL <CallId> RATE" returns a value.

Besides, I don't want to know the rate of the call by displaying my calls log. What I need is to find a way to make my program "know" (using the API) the rate applied to a specific call, or the rate that Skype would use if I made the call.


Sorry I cant help you as I have never seen this API or know where it is.
Paraveterinary
-Moved to API-
TheUberOverlord
This is the information you can get on a call:

https://developer.skype.com/Docs/Skype4COMLib/ICall
longwaytogo
QUOTE(ZOverLord @ Tue Jul 18 2006, 19:52) [snapback]276077[/snapback]

This is the information you can get on a call:
https://developer.skype.com/Docs/Skype4COMLib/ICall


Hi newbie here,
How do I use the call.rate and call.duration class? i'm using VB2005 Express edition. I'm currently looking for a code to calculate the total cost (rate x duration) for each call i made.

Idea would be very much appreciated.

spud5
QUOTE(longwaytogo @ Sun Dec 17 2006, 17:35) [snapback]332438[/snapback]

Hi newbie here,
How do I use the call.rate and call.duration class? i'm using VB2005 Express edition. I'm currently looking for a code to calculate the total cost (rate x duration) for each call i made.

Idea would be very much appreciated.


It's basic mathematics. Try something like (duration/60) * (rate/10^precision) and apply some rounding to get the result you need.
longwaytogo
QUOTE(spud5 @ Sun Dec 17 2006, 22:06) [snapback]332488[/snapback]

It's basic mathematics. Try something like (duration/60) * (rate/10^precision) and apply some rounding to get the result you need.

Thanks spud5,
the problem is that I can't get the rate and duration from skype using SKYPE4COMLib.ICall before i can do the math....

Below is what I did,

Private WithEvents m_call As SKYPE4COMLib.ICall
Dim callrate as interger
Dim callduration as interger

callrate = m_call.rate
callduration = m_call.duration
If callrate > 0 Then
Label6.Text = callrate
End if
If callduration > 0 Then
Label7.Text = callrate
End if

What when wrong? please kindly help....
spud5
QUOTE(longwaytogo @ Mon Dec 18 2006, 13:20) [snapback]332788[/snapback]

Thanks spud5,
the problem is that I can't get the rate and duration from skype using SKYPE4COMLib.ICall before i can do the math....

Below is what I did,

Private WithEvents m_call As SKYPE4COMLib.ICall
..


My coding isn't great but here's a general idea,
CODE

Private WithEvents objSkype As SKYPE4COMLib.Skype

objSkype = New SKYPE4COMLib.Skype
objSkype.Attach()

Private Sub objSkype_CallStatus(ByVal objCall As SKYPE4COMLib.Call, ByVal Status As SKYPE4COMLib.TCallStatus) Handles objSkype.CallStatus
  If Status = SKYPE4COMLib.TCallStatus.clsFinished Then
    Dim intRate As Integer = objCall.Rate
    ' do something with intRate here
  End If
End Sub
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.