Giter VIP home page Giter VIP logo

Comments (10)

augcampos avatar augcampos commented on September 26, 2024

Hi there,
Is that a problem in ManagerEvent.getEventName() or the string compare???

from asterisk-cpp.

xks avatar xks commented on September 26, 2024

Hi,

Is this issue solved? I have been trying for some time now, and I am stuck trying to get the event name...how can i retrieve the event type?

Thanks!

from asterisk-cpp.

augcampos avatar augcampos commented on September 26, 2024

I think the problem is a string comparator/cast

from asterisk-cpp.

xks avatar xks commented on September 26, 2024

Actually, my problem is not a casting problem but a problem of getting the event name. By logging the ManagerEvent.getName() I always get "Manage" no matter what Asterisk event was fired. Would it be possible to get some examples of how this is used?

Thanks,

from asterisk-cpp.

augcampos avatar augcampos commented on September 26, 2024

This was fiixed in las commit :)

from asterisk-cpp.

augcampos avatar augcampos commented on September 26, 2024

No is not fixed I realise this is a major bug, sory about that...
I'm try to make a function that returns the the class name so we don have to specified in every event...

from asterisk-cpp.

xks avatar xks commented on September 26, 2024

I figured it was a major bug. By now I am just analyzing the whole event stream in my code.

from asterisk-cpp.

augcampos avatar augcampos commented on September 26, 2024

Hi there can you test if the last commit, fix the getEventName problem, please...
@see examples/Test.cpp
...
void eventCallback(const ManagerEvent& me) {
std::cout << "TEST EVENT START: " << me.getEventName() << std::endl;
if (me.getEventName() == "NewChannel") {
std::cout << "E - " << me.toString() << std::endl;
}
std::cout << "TEST EVENT: " << me.toLog() << std::endl;
}
..

from asterisk-cpp.

xks avatar xks commented on September 26, 2024

Actually with the latest version what I am not able to connect to AMI as in the login process the AMI response is "Permission denied", so I guess that login action is not properly sent

from asterisk-cpp.

augcampos avatar augcampos commented on September 26, 2024

I Fix it in last commit (ManagerAction->getAction was returning "Action" at end) ex:
Action: ChallengeAction\nAuthType: MD5\n\n
and the correct is:
Action: Challenge\nAuthType: MD5\n\n

from asterisk-cpp.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.