danbarua / NEventSocket

A reactive FreeSwitch eventsocket library for Modern .Net
Mozilla Public License 2.0
74 stars 37 forks source link

PlayGetDigitsResult is not Success when no digits is provided by user #67

Open tdragon-fp opened 7 years ago

tdragon-fp commented 7 years ago

Is there any particular reason why property Success in PlayGetDigitsResult is set to false, when there are no digits provided by user and PlayGetDigits is run with MinimumDigits option set to 0? According to the FreeSwitch documentation, 0 is valid value for play_get_digits app parameter. Current behavior is misleading, suggesting something went wrong, when it does not.

danbarua commented 7 years ago

That may be an invalid assumption made here: https://github.com/danbarua/NEventSocket/blob/e29e5f00281e13a71d5c37cfff673008e6d00b96/src/NEventSocket/FreeSwitch/PlayGetDigitsResult.cs#L20

I will take a look at this.

tdragon-fp commented 7 years ago

Getting deeper into the problem I think it should be handled similar way it's done in ReadResult, by reading read_result variable: https://github.com/danbarua/NEventSocket/blob/e29e5f00281e13a71d5c37cfff673008e6d00b96/src/NEventSocket/FreeSwitch/ReadResult.cs#L17-L30 It seems play_get_digits sets this variable the same way, although I cannot find anything to confirm that in FreeSwitch documentation.