Coder Social home page Coder Social logo

asterisk-zmq's People

Contributors

pchero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

asterisk-zmq's Issues

asterisk-zmq returns "Respomse"

Sometimes, asterisk-zmq returns "Respomse".

[Jul 18 21:42:41] DEBUG[22460] src/res_zmq_manager.c: Parse ami message. msg[Response: Success^M
EventList: start^M
Message: Peer status list will follow^M
^M
Event: PeerlistComplete^M
EventList: Complete^M
ListItems: 0^M
^M
]
[Jul 18 21:42:41] DEBUG[22460] src/res_zmq_manager.c: Parse complete.
[Jul 18 21:42:41] DEBUG[22460] src/res_zmq_manager.c: Response cmd result. ret[153], msg[[{"Respomse":"Success","EventList":"start","Message":"Peer status list will follow"},{"Event":"PeerlistComplete","EventList":"Complete","ListItems":"0"}]]

Use regex

Adapt the regex when parsing the request/response AMI message.

Error when module load

mercury*CLI> module load res_zmq_manager.so
Unable to load module res_zmq_manager.so
Command 'module load res_zmq_manager.so' failed.
[Jan 21 21:04:51] WARNING[16341]: loader.c:595 load_dynamic_module: Error loading module 'res_zmq_manager.so': /usr/lib/asterisk/modules/res_zmq_manager.so: undefined symbol: zmq_msg_init
[Jan 21 21:04:51] WARNING[16341]: loader.c:1079 load_resource: Module 'res_zmq_manager.so' could not be loaded.

Core dump due to memory corruption

Asterisk 13.5.0, using sample scripts like cmd_devicestatelist.py crashes Asterisk.
After re-compiling with debug info I can see on the console:

*CLI> [0MQ Manager Debug]: action command. command[Action: Setvar
ActionID: 1
Variable: DEVICE_STATE
Value: SIP/max=UNAVAILABLE
]
  == Setting global variable 'DEVICE_STATE' to 'SIP/max=UNAVAILABLE'
WARNING: Memory corrupted after free of 0x7f05600078a0 allocated at json.c ast_json_malloc() line 140
WARNING: Memory corrupted after free of 0x7f05600099b0 allocated at json.c ast_json_malloc() line 140
[0MQ Manager Debug]: zmq_evt_handler. category[2048], event[VarSet], content[Event: VarSet
Privilege: dialplan,all
Channel: none
Uniqueid: none
WARNING: Memory corrupted after free of 0x7f0560007c60 allocated at json.c ast_json_malloc() line 140
Variable: DEVICE_STATE
Value: SIP/max=UNAVAILABLE
WARNING: Memory corrupted after free of 0x7f056004eed0 allocated at json.c ast_json_malloc() line 140

]
[0MQ Manager Debug]: Check value. tmp_line[Event: VarSet]
[0MQ Manager Debug]: Check value. tmp_line[Privilege: dialplan,all]
[0MQ Manager Debug]: Check value. tmp_line[Channel: none]
[0MQ Manager Debug]: Check value. tmp_line[Uniqueid: none]
[0MQ Manager Debug]: Check value. tmp_line[Variable: DEVICE_STATE]
[0MQ Manager Debug]: Check value. tmp_line[Value: SIP/max=UNAVAILABLE]
[0MQ Manager Debug]: Send event. ret[136], buf[{"Channel":"none","Event":"VarSet","Privilege":"dialplan,all","Uniqueid":"none","Variable":"DEVICE_STATE","Value":"SIP/max=UNAVAILABLE"}]

Any suggestions?

Installation problem

Moved from #9

Hi Sungtae,

Hope you are doing well.
facing some error while installing Install zmq-manager on Centos 6.7

Below are the Error reports

src/res_zmq_manager.c: In function 'zmq_cmd_thread':
src/res_zmq_manager.c:283: warning: implicit declaration of function 'zmq_msg_recv'
src/res_zmq_manager.c:301: warning: passing argument 2 of 'zmq_send' from incompatible pointer type
/usr/include/zmq.h:229: note: expected 'struct zmq_msg_t *' but argument is of type 'char *'
src/res_zmq_manager.c:301: error: too many arguments to function 'zmq_send'
src/res_zmq_manager.c:313: warning: passing argument 2 of 'zmq_send' from incompatible pointer type
/usr/include/zmq.h:229: note: expected 'struct zmq_msg_t *' but argument is of type 'char *'
src/res_zmq_manager.c:313: error: too many arguments to function 'zmq_send'
src/res_zmq_manager.c: In function '_load_module':
src/res_zmq_manager.c:449: warning: implicit declaration of function 'zmq_ctx_new'
src/res_zmq_manager.c:449: warning: assignment makes pointer from integer without a cast
src/res_zmq_manager.c: In function 'load_module':
src/res_zmq_manager.c:518: warning: passing argument 2 of 'zmq_send' from incompatible pointer type
/usr/include/zmq.h:229: note: expected 'struct zmq_msg_t *' but argument is of type 'char *'
src/res_zmq_manager.c:518: error: too many arguments to function 'zmq_send'
src/res_zmq_manager.c: In function 'zmq_evt_helper':
src/res_zmq_manager.c:707: warning: passing argument 2 of 'zmq_send' from incompatible pointer type
/usr/include/zmq.h:229: note: expected 'struct zmq_msg_t *' but argument is of type 'char *'
src/res_zmq_manager.c:707: error: too many arguments to function 'zmq_send'

Asterisk down..

When zmq accept & process more than 2 requests, suddenly asterisk has down.
It's very easy to reproduction, but not a same situation...

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.