Forum
Discuss the development using our network APIs with other users. This is your opportunity to exchange tips and advice and to share ideas.

Create Conference

Author Message
Omar Shamroukh
Topic creator
registered since: 12.12.2011
Posts: 4
Hi guys,

I've implemented the conference call the following way:

JAVAKopieren
  1. public ConferenceCallSetup(String user, String pw, String ini, String reci) {
  2.  
  3. setUsername(user);
  4. setPassword(pw);
  5.  
  6. final ConferenceCallClient client = new ConferenceCallClient(getUsername(),
  7. getPassword(), "sandbox");
  8.  
  9. setInitiatorNumber(ini);
  10. setSecondParticipantNumber(reci);
  11. setThirdParticipantNumber("+49 160 1234 5678");
  12. String maximumDuration = "60";
  13. String joinConfirm = "false";
  14.  
  15.  
  16. try {
  17. createConferenceResponse = client.createConference("owner ID",
  18. "name", "description", null, null, maximumDuration,
  19. joinConfirm, null, null);
  20.  
  21. if (!createConferenceResponse.getStatus().equals(
  22. ConferenceCallStatusConstants.SUCCESS)) {
  23. String errorMessage = "The invocation of createConference() was not successful.
  24. ";
  25. errorMessage += "The error code is: "
  26. + createConferenceResponse.getStatus().getStatusCode()
  27. + "
  28. ";
  29. errorMessage += "The error message is: "
  30. + createConferenceResponse.getStatus()
  31. .getStatusMessage() + "
  32. ";
  33. errorMessage += "The error description is: "
  34. + createConferenceResponse.getStatus()
  35. .getStatusDescriptionEnglish();
  36.  
  37. throw new RuntimeException(errorMessage);
  38. }
  39. } catch (Exception e) {
  40. Log.i("CCSetup","An exception occured while running the sample.");
  41.  
  42. e.printStackTrace();
  43.  
  44. System.exit(-1);
  45. }
  46. // confID = createConferenceResponse.getConferenceId();
  47.  
  48. try {
  49. newParticipantResponse = client.newParticipant(
  50. createConferenceResponse.getConferenceId(), "First",
  51. "Participant", getInitiatorNumber(),
  52. "first.participant@example.com", "true");
  53.  
  54. if (!newParticipantResponse.getStatus().equals(
  55. ConferenceCallStatusConstants.SUCCESS)) {
  56. String errorMessage = "The invocation of newParticipant() was not successful.
  57. ";
  58. errorMessage += "The error code is: "
  59. + newParticipantResponse.getStatus().getStatusCode()
  60. + "
  61. ";
  62. errorMessage += "The error message is: "
  63. + newParticipantResponse.getStatus().getStatusMessage()
  64. + "
  65. ";
  66. errorMessage += "The error description is: "
  67. + newParticipantResponse.getStatus()
  68. .getStatusDescriptionEnglish();
  69.  
  70. throw new RuntimeException(errorMessage);
  71. }
  72. } catch (Exception e) {
  73. Log.i("CCSetup","An exception occured while running the sample.");
  74.  
  75. e.printStackTrace();
  76.  
  77. System.exit(-1);
  78. }
  79.  
  80. try {
  81. newParticipantResponse = client.newParticipant(
  82. createConferenceResponse.getConferenceId(), "Second",
  83. "Participant", getSecondParticipantNumber(),
  84. "second.participant@example.com", null);
  85.  
  86. if (!newParticipantResponse.getStatus().equals(
  87. ConferenceCallStatusConstants.SUCCESS)) {
  88. String errorMessage = "The invocation of newParticipant() was not successful.
  89. ";
  90. errorMessage += "The error code is: "
  91. + newParticipantResponse.getStatus().getStatusCode()
  92. + "
  93. ";
  94. errorMessage += "The error message is: "
  95. + newParticipantResponse.getStatus().getStatusMessage()
  96. + "
  97. ";
  98. errorMessage += "The error description is: "
  99. + newParticipantResponse.getStatus()
  100. .getStatusDescriptionEnglish();
  101.  
  102. throw new RuntimeException(errorMessage);
  103. }
  104. } catch (Exception e) {
  105. Log.i("CCSetup","An exception occured while running the sample.");
  106.  
  107. e.printStackTrace();
  108.  
  109. System.exit(-1);
  110. }
  111.  
  112. try {
  113. newParticipantResponse = client.newParticipant(
  114. createConferenceResponse.getConferenceId(), "Third",
  115. "Participant", getThirdParticipantNumber(),
  116. "third.participant@example.com", null);
  117.  
  118. if (!newParticipantResponse.getStatus().equals(
  119. ConferenceCallStatusConstants.SUCCESS)) {
  120. String errorMessage = "The invocation of newParticipant() was not successful.
  121. ";
  122. errorMessage += "The error code is: "
  123. + newParticipantResponse.getStatus().getStatusCode()
  124. + "
  125. ";
  126. errorMessage += "The error message is: "
  127. + newParticipantResponse.getStatus().getStatusMessage()
  128. + "
  129. ";
  130. errorMessage += "The error description is: "
  131. + newParticipantResponse.getStatus()
  132. .getStatusDescriptionEnglish();
  133.  
  134. throw new RuntimeException(errorMessage);
  135. }
  136. } catch (Exception e) {
  137. Log.i("CCSetup","An exception occured while running the sample.");
  138.  
  139. e.printStackTrace();
  140.  
  141. System.exit(-1);
  142. }
  143.  
  144. CommitConferenceResponse commitResponse = null;
  145.  
  146. try {
  147.  
  148. commitResponse = client.commitConference(createConferenceResponse
  149. .getConferenceId());
  150.  
  151. if (!commitResponse.getStatus().equals(
  152. ConferenceCallStatusConstants.SUCCESS)) {
  153. String errorMessage = "The invocation of commitConference() was not successful.
  154. ";
  155. errorMessage += "The error code is: "
  156. + commitResponse.getStatus().getStatusCode() + "
  157. ";
  158. errorMessage += "The error message is: "
  159. + commitResponse.getStatus().getStatusMessage()
  160. + "
  161. ";
  162. errorMessage += "The error description is: "
  163. + commitResponse.getStatus()
  164. .getStatusDescriptionEnglish();
  165.  
  166. throw new RuntimeException(errorMessage);
  167. }
  168. } catch (Exception e) {
  169. Log.i("CCSetup","An exception occured while running the sample.");
  170.  
  171. e.printStackTrace();
  172.  
  173. System.exit(-1);
  174. }
  175. }


All parameters are correctly transferred but i get an exception as follows:


01-30 10:40:22.346: W/System.err(10776): java.lang.RuntimeException: java.net.UnknownHostException: sts.idm.telekom.com
01-30 10:40:22.376: W/System.err(10776): at com.telekom.api.common.internal.service.STSService.getToken(STSService.java:79)
01-30 10:40:22.376: W/System.err(10776): at com.telekom.api.common.client.DefaultSecurityTokenGetter.getToken(DefaultSecurityTokenGetter.java:61)
01-30 10:40:22.376: W/System.err(10776): at com.telekom.api.conferencecall.client.ConferenceCallClient.createConference(ConferenceCallClient.java:125)
01-30 10:40:22.376: W/System.err(10776): at de.tsystems.emobuzzer.ConferenceCallSetup.<init>(ConferenceCallSetup.java:38)
01-30 10:40:22.376: W/System.err(10776): at de.tsystems.emobuzzer.CreateConference$2.onClick(CreateConference.java:48)
01-30 10:40:22.376: W/System.err(10776): at android.view.View.performClick(View.java:2532)
01-30 10:40:22.376: W/System.err(10776): at android.view.View$PerformClick.run(View.java:9293)
01-30 10:40:22.386: W/System.err(10776): at android.os.Handler.handleCallback(Handler.java:587)
01-30 10:40:22.386: W/System.err(10776): at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 10:40:22.386: W/System.err(10776): at android.os.Looper.loop(Looper.java:143)
01-30 10:40:22.386: W/System.err(10776): at android.app.ActivityThread.main(ActivityThread.java:4277)
01-30 10:40:22.386: W/System.err(10776): at java.lang.reflect.Method.invokeNative(Native Method)
01-30 10:40:22.386: W/System.err(10776): at java.lang.reflect.Method.invoke(Method.java:507)
01-30 10:40:22.386: W/System.err(10776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-30 10:40:22.386: W/System.err(10776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-30 10:40:22.386: W/System.err(10776): at dalvik.system.NativeStart.main(Native Method)
01-30 10:40:22.386: W/System.err(10776): Caused by: java.net.UnknownHostException: sts.idm.telekom.com
01-30 10:40:22.386: W/System.err(10776): at java.net.InetAddress.lookupHostByName(InetAddress.java:500)
01-30 10:40:22.386: W/System.err(10776): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:297)
01-30 10:40:22.396: W/System.err(10776): at java.net.InetAddress.getAllByName(InetAddress.java:259)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:69)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:48)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:322)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:285)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:267)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:406)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeConnection(HttpsURLConnectionImpl.java:387)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:205)
01-30 10:40:22.396: W/System.err(10776): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:152)
01-30 10:40:22.396: W/System.err(10776): at com.telekom.api.common.internal.service.STSService.getToken(STSService.java:59)
01-30 10:40:22.396: W/System.err(10776): ... 15 more


i dont get it yet... could anyone help?

greetz

Omar
ReplyProfile
Author Message
Omar Shamroukh
Topic creator
registered since: 12.12.2011
Posts: 4
Ahh sorry - my fault i forgot to set permissions right ... nevertheless now he tells me this error


01-30 14:05:59.906: W/System.err(11078): java.lang.RuntimeException: The invocation of newParticipant() was not successful.

01-30 14:05:59.906: W/System.err(11078): The error code is: 0208

01-30 14:05:59.906: W/System.err(11078): The error message is: Invalid number format

01-30 14:05:59.906: W/System.err(11078): The error description is: Incorrect number format.
01-30 14:05:59.906: W/System.err(11078): at de.tsystems.emobuzzer.ConferenceCallSetup.<init>(ConferenceCallSetup.java:85)
01-30 14:05:59.906: W/System.err(11078): at de.tsystems.emobuzzer.CreateConference$2.onClick(CreateConference.java:48)
01-30 14:05:59.906: W/System.err(11078): at android.view.View.performClick(View.java:2532)
01-30 14:05:59.906: W/System.err(11078): at android.view.View$PerformClick.run(View.java:9293)
01-30 14:05:59.916: W/System.err(11078): at android.os.Handler.handleCallback(Handler.java:587)
01-30 14:05:59.916: W/System.err(11078): at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 14:05:59.916: W/System.err(11078): at android.os.Looper.loop(Looper.java:143)
01-30 14:05:59.916: W/System.err(11078): at android.app.ActivityThread.main(ActivityThread.java:4277)
01-30 14:05:59.916: W/System.err(11078): at java.lang.reflect.Method.invokeNative(Native Method)
01-30 14:05:59.916: W/System.err(11078): at java.lang.reflect.Method.invoke(Method.java:507)
01-30 14:05:59.916: W/System.err(11078): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-30 14:05:59.916: W/System.err(11078): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-30 14:05:59.916: W/System.err(11078): at dalvik.system.NativeStart.main(Native Method)


I tried those formats:
+491758789565 and 01758789565
does anyone have a clue?

greetz

omar
ReplyProfile
Author Message
Omar Shamroukh
Topic creator
registered since: 12.12.2011
Posts: 4
And Now I've changed my constructor without parameters for testing and guess what - new error given:


01-30 15:22:45.766: W/System.err(11308): java.lang.RuntimeException: The invocation of newParticipant() was not successful.

01-30 15:22:45.766: W/System.err(11308): The error code is: 0205

01-30 15:22:45.766: W/System.err(11308): The error message is: Number not allowed

01-30 15:22:45.766: W/System.err(11308): The error description is: Phone number not allowed.
01-30 15:22:45.766: W/System.err(11308): at de.tsystems.emobuzzer.ConferenceCallSetup.<init>(ConferenceCallSetup.java:246)
01-30 15:22:45.766: W/System.err(11308): at de.tsystems.emobuzzer.CreateConference$2.onClick(CreateConference.java:49)
01-30 15:22:45.766: W/System.err(11308): at android.view.View.performClick(View.java:2532)
01-30 15:22:45.766: W/System.err(11308): at android.view.View$PerformClick.run(View.java:9293)
01-30 15:22:45.776: W/System.err(11308): at android.os.Handler.handleCallback(Handler.java:587)
01-30 15:22:45.776: W/System.err(11308): at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 15:22:45.776: W/System.err(11308): at android.os.Looper.loop(Looper.java:143)
01-30 15:22:45.776: W/System.err(11308): at android.app.ActivityThread.main(ActivityThread.java:4277)
01-30 15:22:45.776: W/System.err(11308): at java.lang.reflect.Method.invokeNative(Native Method)
01-30 15:22:45.776: W/System.err(11308): at java.lang.reflect.Method.invoke(Method.java:507)
01-30 15:22:45.776: W/System.err(11308): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-30 15:22:45.776: W/System.err(11308): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-30 15:22:45.776: W/System.err(11308): at dalvik.system.NativeStart.main(Native Method)


I'm using this format for the numbers: +49 175 5803 055
Obviously you have to make " " inbetween to send correct number .... but now says: number not allowed??? is a mobile phone number not allowed as initiator???

greetz

omar
ReplyProfile
Author Message
Tobias Hahn
registered since: 15.08.2011
Posts: 25
Hey Omar,

difficult.
At first please try to initiate a conference within our live demo here . If this works you may check, whether the phone nr is passed correctly. I once had a problem, that the "+" was not passed .

regards
Tobias
ReplyProfile