Summary: | ASTERISK-27875: AMI Hook Helper Problem | ||
Reporter: | cranberriess89 (cranberriess89_) | Labels: | |
Date Opened: | 2018-05-25 08:41:06 | Date Closed: | 2020-01-14 11:21:11.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Tests/NewFeature |
Versions: | 11.5.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Hi,
I try to improve an asterisk plugin which simply does recording. To be able to put VOX feature into the existing recording module, I've explored event listening mechanisms. I've used amihook helper. So, I can easily detect talking status by listening and catching related events. But the problem is as follows ; I can make and record a call successfully, but I can not make a second call. It seems like the call is in calling state. I've captured network packets, and analyzed it in Wireshark; Conv.| Time | 10.1.10.68 | | | | 10.1.1.36 | 0 |4.544233 | INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4503@10.1.1.36 | |(5060) ------------------> (5060) | 0 |4.545045 | 401 Unauthorized |SIP Status | |(5060) <------------------ (5060) | 0 |4.547712 | ACK | |SIP Request | |(5060) ------------------> (5060) | 0 |4.557050 | INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4503@10.1.1.36 | |(5060) ------------------> (5060) | 0 |4.559138 | 100 Trying| |SIP Status | |(5060) <------------------ (5060) | 0 |4.560821 | 200 OK SDP (g711U g7 |SIP Status | |(5060) <------------------ (5060) | 0 |4.570073 | ACK | |SIP Request | |(5060) ------------------> (5060) | 0 |4.670496 | INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4503@10.1.1.36 | |(5060) ------------------> (5060) | 0 |4.671506 | 100 Trying| |SIP Status | |(5060) <------------------ (5060) | 0 |4.671661 | 200 OK SDP (g711U g7 |SIP Status | |(5060) <------------------ (5060) | 0 |4.674323 | ACK | |SIP Request | |(5060) ------------------> (5060) | 0 |4.684900 | RTP (g711U) |RTP Num packets:242 Duration:4.822s SSRC:0xE5D641DA | |(5078) ------------------> (12616) | 0 |4.687103 | RTP (g711U) |RTP Num packets:218 Duration:4.800s SSRC:0x75162D25 | |(5078) <------------------ (12616) | 0 |9.506410 | BYE | |SIP Request | |(5060) ------------------> (5060) | 0 |9.507490 | 200 OK | |SIP Status | |(5060) <------------------ (5060) | --------------------------------------------------------- 1 |14.129832| INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4501@10.1.1.36 | |(5060) ------------------> (5060) | 1 |14.130495| 401 Unauthorized |SIP Status | |(5060) <------------------ (5060) | 1 |14.133185| ACK | |SIP Request | |(5060) ------------------> (5060) | 1 |14.143423| INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4501@10.1.1.36 | |(5060) ------------------> (5060) | 1 |14.655246| INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4501@10.1.1.36 | |(5060) ------------------> (5060) | 1 |15.655354| INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4501@10.1.1.36 | |(5060) ------------------> (5060) | 1 |17.655802| INVITE SDP (g711U te |SIP From: "mark" <sip:4502@10.1.1.36 To:<sip:4501@10.1.1.36 | |(5060) ------------------> (5060) | According to the packets, for the second call; client sends SIP INVITE message, but Asterisk server does not respond him. When I remove amihook helper impl, I can make call records recurrently( without VOX feature ) Most probably, some connections are pending, or AMI sockets are not closed. Additionally, I register to amihook helper when recording module is loaded, and unregister when it is unloaded. Should it be on call basis ? After hangig up the first call, I check the connections ; tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 22253/asterisk tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 22253/asterisk tcp 0 0 127.0.0.1:5038 127.0.0.1:59002 ESTABLISHED 22253/asterisk By the way, manager conf settings are as follows; [general] enabled = yes webenabled = yes port = 5038 bindaddr = 0.0.0.0 Actually, I don't know what is wrong. There isn't any error logs regarding the problem. I can not find any useful documents about AMI events listening mechanism. Could you please help me to elaborate and solve this problem ? | ||
Comments: | By: Asterisk Team (asteriskteam) 2018-05-25 08:41:07.803-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Asterisk Team (asteriskteam) 2018-05-25 08:41:08.200-0500 Per the Asterisk versions page [1], the maintenance (bug fix) support for the Asterisk branch you are using has ended. For continued maintenance support please move to a supported branch of Asterisk. After testing with a supported branch, if you find this problem has not been resolved, please open a new issue against the latest version of that Asterisk branch. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions By: Asterisk Team (asteriskteam) 2018-05-25 08:41:08.865-0500 We appreciate the difficulties you are facing, however information request type issues would be better served in a different forum. The Asterisk community provides support over IRC, mailing lists, and forums as described at http://asterisk.org/community. The Asterisk issue tracker is used specifically to track issues concerning bugs and documentation errors. If this issue is actually a bug please use the Bug issue type instead. Please see the Asterisk Issue Guidelines [1] for instruction on the intended use of the Asterisk issue tracker. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines |