This discussion is archived
14 Replies Latest reply: Feb 3, 2011 11:37 AM by 825080 RSS

Help using php to use API's

825080 Newbie
Currently Being Moderated
Iam new here and i am creating php application that will interact with CCA and i genereated php class from the wsdl web services now i want to know how to make a login using php and what are the values need to be passed .. thanks
  • 1. Re: Help using php to use API's
    rschepis Explorer
    Currently Being Moderated
    First you should review the API docuemntation fuond here:

    http://localhost/CCA/doc/cca-api/

    Modify case and https based on your server install.

    Then on th eleft frame, scroll to the 'all classes' section. Stop and identify the ones that begin with a slash /

    These are the ones you should focus on: Session and MessageProvider
  • 2. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    Thanks a lot for the last reply

    Iam trying from The API to disconnect or to SendToHold() and these both functions take as input session ID and Interaction ID but the function successfully return service result = 0 means it is valid but it doesnt end the call or put the call to hold,

    to clarify more before this i used the function dialExternalNumber to dial an external number and it is working very good

    and iam genereating the interaction ID from the function getNewInteractionId

    it return a number for me which am using into the disconnect and in the SendToHold functions

    please Urgently need the help as soon as possible
  • 3. Re: Help using php to use API's
    rschepis Explorer
    Currently Being Moderated
    So far which web services have you implemented / are you using?


    You would need to open a Session, get configuration, login, perform message provider looping, then issue Interactions commands.
  • 4. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    Ok i made everything now i am making the dialexternalnumber function then i try to disconnect or to hangup but it doesnt ???
  • 5. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    and what am doing now inside interaction class the dialexternalnumber and the disconnect or sendtohold functions all these are inside interactions but the dial function work but other doesnt
  • 6. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    and please can you explain in details what do you mean by :

    perform message provider looping


    because i think am missing this part in my coding

    thanks in advance
  • 7. Re: Help using php to use API's
    rschepis Explorer
    Currently Being Moderated
    The MessageProvider Web Service provides users with the ability to manage their session and to retrieve call center messages.

    Message server will announce an event and give you information about the event. For example, the event might be a new Interaction. Information related to the new Interaction could be the Interaction type, the originator (caller ID or email address), priority, etc.

    Once the client application is logged in, the messages should be obtained by having a dedicated thread call the getMessages(int, String, int, int) method in this service on an infinite loop at least every 30 seconds.

    The getMessages() operation returns a result of type GetMessagesResult with has two parts getServiceResult( ) returns a ServiceResult object that describes whether the last call to getMessages succeeded or failed
    An array of Message objects. By digging into each SessionMessage object, you can find out what events have happened and get all of the important information associated with each event
  • 8. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    great reply really many thanks,

    just another question

    what is required to call the function disconnect() or the function sendtohold() because i called dialexternalnumber function then i tried to call disconnect () function to disconnect from this call but it did nothing ?

    and another thing

    does i need the interaction id in this process i just explained for you ?


    Please i really need big help in this part

    Once again thanks a lot my lord
  • 9. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    any luck ?
  • 10. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    and when i call this wsdl specialy it give me error :


    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unexpected <complexType> in complexType: SoapClient->SoapClient('http://69.28.24...', Array) #1
  • 11. Re: Help using php to use API's
    rschepis Explorer
    Currently Being Moderated
    Yes you need the InteractionID:

    disconnect(java.lang.String sessionId,java.lang.String sInteractionId)
  • 12. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    ok from where i get the interaction ID i tried to genereate one and use it but it doesnt so i will need the class messageprovider?
  • 13. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    i need your help how can i keep the session live ? i tried to call getmessages every 30 seconds and nothing happens

    i need your help to tell me how to keep session live always
  • 14. Re: Help using php to use API's
    825080 Newbie
    Currently Being Moderated
    i need your help hardly

    I tried to loop every 30 sec and call getmessages function but can you help me how to exactly keep the session live in details

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points