[ 
https://issues.apache.org/jira/browse/CAMEL-27627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27627:
--------------------------------
    Fix Version/s: 4.24.0
                       (was: 4.25.0)

> camel-asterisk: producer gets all events, no port option, name unset, no 
> security label
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27627
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27627
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-asterisk
>            Reporter: Claus Ibsen
>            Assignee: shashank
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while improving the option descriptions of camel-asterisk for 
> CAMEL-23832 (PR https://github.com/apache/camel/pull/30959).
> These are separate problems of the component; the descriptions PR only 
> documents the current behavior.
> h4. 1. The producer subscribes to all AMI events and ignores them
> {{AsteriskProducer.doStart()}} calls {{AsteriskConnection.login()}}, which 
> always calls {{managerConnection.login("on")}}. The event mask {{on}} asks 
> Asterisk to send every event to the connection. The producer adds no event 
> listener, so Asterisk sends a stream of events that the producer reads and 
> drops. On a busy PBX this costs network and CPU on both sides for nothing.
> Proposed change: let the producer log in with the event mask {{off}}, and 
> keep {{on}} for the consumer.
> h4. 2. The AMI port cannot be configured
> {{AsteriskConnection.connect()}} creates the connection with {{new 
> ManagerConnectionFactory(host, username, password)}}, and that constructor of 
> asterisk-java always uses port 5038. The {{hostname}} option cannot take a 
> {{host:port}} value, and there is no port option. A user whose Asterisk 
> server listens for AMI on another port cannot use the component.
> Proposed change: add a {{port}} option (default 5038) and use the 
> {{ManagerConnectionFactory(host, port, username, password)}} constructor.
> h4. 3. The name path value is never set
> {{AsteriskComponent.createEndpoint()}} does not pass {{remaining}} to 
> {{AsteriskEndpoint.setName()}}, so {{getName()}} always returns null. The 
> {{name}} path is required in the metadata, but the code does not use it.
> Proposed change: call {{endpoint.setName(remaining)}} in {{createEndpoint()}}.
> h4. 4. username and password have no security label
> The {{username}} and {{password}} options of {{AsteriskEndpoint}} have no 
> {{label}}, so they are in the {{common}} group in the catalog and the docs, 
> and not in the {{security}} group like in other components.
> Proposed change: add {{label = "security"}} to both options.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to