Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. Hi.
  2.  
  3. Could you explain about the Code changes in your API. It seems that the file for the future code updates is always empty.
  4.  
  5. My problem right now is that when you change a destination code I have no way of detecting this change and update my local tables. So I need some sort of record when a destination code is removed or changed to know which is the new code that should be used instead.
  6.  
  7. something like: code: 3040 removed and code 3041 should be used instead.
  8.  
  9. Thanks in advance.
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  17.  
  18.  
  19. Hi
  20.  
  21. Codes don't change very often so it is normal for this report to be empty. If you check it regularly, there will be something in it it when codes change. Alternatively, you can simply diff the CSV rate files we put out.
  22.  
  23. Kind regards
  24. Simon
  25.  
  26. October 01, 2014 12:29
  27. User photo Vip-Consult
  28. Vip Consult Limited
  29. Yes I can find out which codes have been removed easily , but no way to automatically find out which are the codes I need to replace the missing ones with.
  30.  
  31. Like on my last example :
  32.  
  33. lets say the code 3040 have been removed from your tables , how would I find out which is the new code I need to use instead ?
  34.  
  35. This is crucial for an accurate call cost calculation.
  36.  
  37. When I pull the calling rates from the API I set a default profit margin for most customers , but some need to have custom rates for some destinations.
  38.  
  39. So on the next rates update If a destination ID has been removed I need to know which is the new destination ID I have to use so that I can update the custom rates accurately.
  40.  
  41. October 01, 2014 12:52
  42. User photo Simon Woodhead
  43. Simwood eSMS Limited
  44. I don't see how such a mapping would ever be workable. Codes are linked to breakouts; the codes change. You should always be using the longest match to see which code matches a country, there is never a straight forward in/out as it is way too complicated to do so. your rating/billing should work at the breakout level and the codes linked to it are what they are. If you price at the prefix level you're setting yourself an impossible task.
  45.  
  46. Simon
  47.  
  48. October 01, 2014 12:58
  49. User photo Vip-Consult
  50. Vip Consult Limited
  51. Our business logic Is to have a default profit margin of lets say 80% , but sometimes to keep a customer happy we would have to offer lower rates for some destinations so for example for destination UK T-Mobile they will be at 50% profit margin.
  52.  
  53. so here is a simplified example
  54.  
  55. rates_table
  56. dest_id prefix cost default_charge
  57. 3010 3592 0.01 0.02
  58. 3011 447 0.02 0.03
  59. 3011 4479 0.03 0.04
  60.  
  61. rates_table_custom
  62. dest_id customer_id custom_charge
  63. 3010 10 0.015
  64.  
  65. then when a customer visits their account
  66. (I run a query on the rates_table with a join on the rates_table_custom) for destination Id 3010 they will see charge 0.015 instead of the default one 0.02 and all other destinations will show the default charge
  67.  
  68. So lets say on the next update the rates table is updated to :
  69.  
  70. dest_id prefix cost default_charge
  71. 3019 359 0.06 0.12
  72. 3020 35921 0.03 0.06
  73. 3021 35922 0.05 0.10
  74. 3011 447 0.02 0.03
  75. 3011 4479 0.03 0.04
  76.  
  77. rates_table_custom
  78. dest_id customer_id custom_charge
  79. 3010 10 0.015
  80.  
  81. How would I test if that destination ID 3010 should be replaced with 3019, 3020 or 3021 ?
  82.  
  83. my hope was that on each update the API rates updates will return best match for the new dest ID. In this case it would be 3019
  84.  
  85. something like
  86. 3010 replaced with 3019
  87.  
  88. Otherwise the only solution would be run a query for each custom rate and find the longest destination prefix and use the destination ID as a replacement.
  89.  
  90. One other query : if the dest id still exists after each update it is safe to use for the custom rates ?
  91. I the same dest id will be set for a completely new prefix range right ?
  92.  
  93. for example
  94. before update:
  95. dest id 3333 - prefixes : 35920,35921
  96. after the update it will still be something like:
  97. dest id 3333 - prefixes : 3592,3591
  98.  
  99. it will not change for a completely new prefix range like
  100. dest id 3333 - prefixes : 4474,4475
  101.  
  102. October 01, 2014 15:10
  103. User photo Simon Woodhead
  104. Simwood eSMS Limited
  105. Hi
  106.  
  107. I'm afraid we can't help specify your billing system. If you have specific
  108. questions about the API output, don't hesittate to ask.
  109.  
  110. Kind regards
  111. Simon
  112.  
  113. October 01, 2014 15:50
  114. User photo Vip-Consult
  115. Vip Consult Limited
  116. Hi.
  117.  
  118. I understand.
  119.  
  120. Could you offer some paid support on this ?
  121.  
  122. October 01, 2014 15:58
  123. User photo Vip-Consult
  124. Vip Consult Limited
  125. or any reference of someone that will be able to help us get this properly solved.
  126.  
  127. There are many ways to do this , but I prefer to get some help from someone that has already been with this dilemma.
  128.  
  129. October 01, 2014 16:10
  130. User photo Simon Woodhead
  131. Simwood eSMS Limited
  132. Hi,
  133.  
  134. We can do paid consultancy but to be honest are taking none on at the
  135. moment given our own internal committments.
  136.  
  137. I'd price your customers at the breakout level and just link codes to that.
  138. Give each code and rate a start and end date so you can match the longest
  139. match valid at the time you're interested in. You can do the same with
  140. rates and the output from the API naturally lends itself to this.
  141.  
  142. Kind regards
  143. Simon
  144.  
  145. October 01, 2014 16:14
  146. User photo Vip-Consult
  147. Vip Consult Limited
  148. I have read your suggestion 10 times and can't understand it :) I am not sure what you mean by a "breakout level"
  149.  
  150. Is it too much to ask for a simple example.
  151.  
  152. to be honest I would feel better if I pay you at least an hour of your time for answering my query.
  153.  
  154. October 01, 2014 20:24
  155. User photo Simon Woodhead
  156. Simwood eSMS Limited
  157. Hi,
  158.  
  159. I thought I'd told you how to do it for free in the last mail...
  160.  
  161. I'm afraid I wouldn't know anyone consulting in billing.
  162.  
  163. Kind regards
  164. Simon
  165.  
  166. October 01, 2014 20:28
  167. User photo Simon Woodhead
  168. Simwood eSMS Limited
  169. If you were to create a table based on the data coming back from our API,
  170. with from and to dates for each code, you'd be pretty much there.
  171.  
  172. cheers
  173. Simon
  174.  
  175. > Hi,
  176. >
  177. > I thought I'd told you how to do it for free in the last mail...
  178. >
  179. > I'm afraid I wouldn't know anyone consulting in billing.
  180. >
  181. > Kind regards
  182. > Simon
  183. >
  184. > On 1 October 2014 16:10, Simwood <team@simwood.com> wrote:
  185. >
  186. >>
  187.  
  188. October 01, 2014 20:31
  189. User photo Vip-Consult
  190. Vip Consult Limited
  191. Yes the table is based on the values coming from your API.
  192.  
  193. The part I don't understand it is how to keep the custom rates (based on a customer ID) linked to the new table after each rate update.
  194.  
  195. I don't think I will understand it without an example, but thanks for your time anyway.
  196.  
  197. I will try to find someone in the freeswitch channel I know quite a few people there use your SIP termination.
  198.  
  199. You have been most helpful.
  200.  
  201. October 01, 2014 21:11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement