[asterisk-dev] Need Feedback about new Manager Dial event
Moises Silva
moises.silva at gmail.com
Wed May 17 18:23:07 MST 2006
Hi everyone.
I need some feedback about bug #6992. I will apreciate if someone
takes a couple of minutes to read on.
As the bug report explain, im needing a new event to be launched
when the Dial() application ends. The patch you can found in the bug
report ,generate a new event called EndDial, however I have been
corrected and requested to follow the coding guidelines (thanks for
that oej) and avoid to break existing Dial event implementation.
However other issues come to my mind.
I need a way to know the end status of each dial attempt. I have
been suggested to use the Hangup cause in the Hangup event to figure
out this. However in the bug report I explain why I think this is not
possible. So far, I think we all agree (in the bug report) that a
status flag is needed in the Dial event. Something like:
Status: Starting | Ending
So, when I refer to "DialStarting" event I mean the Dial event with
Starting flag. The same for DialEnding.
When the parameter passed to Dial() is composed of several dial
strings, Asterisk sends one DialStarting event for each created
channel. If one of the dial strings is unable to create a channel, no
DialStarting event is sent, ( ie SIP/14 is not a valid SIP peer ).
However, for DialEnding events is usefull to know the status
"CHANUNAVAIL". So here im having problems to decide where to go.
It would seem silly to generate a DialStarting event when we
already know that the channel has not been generated. In the other
hand seems weird to me to generate an DialEnding event with no prior
DialStarting event. Besides, I think that the Dial event should
reflect the Dialing attempt, it doesnt matter that the channel has not
been generated.
I can see 3 main options:
1. Move DialStarting to a position where we still dont know the result
of the Dial attempt.
2. Keep DialStarting where is right now, and immediatly after sending
the DialStarting send a DialEnding with CHANUNAVAIL DialStatus.
3. Forget completly about DialStarting and send DialEnding, even
though, that no DialStarting event was ever sent.
Any toughts and recommendations are more than welcomed.
Sincerly,
Moy
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-dev
mailing list