1
Vote

GetVariable issue DIALSTATUS

description

Hi,

I need to know the value of "DIALSTATUS" when a call is ended.
So I call "GetVariable("DIALSTATUS") and it works for these cases :
When the callee reject the call, the DIALSTATUS = BUSY as expected.
When the callee accept the call and he is the first to hangup, DIALSTATUS = ANSWERED as expected.
But it fails when caller is the first to hangup, GetVariable("DIALSTATUS") return null value.
(channel.LastReply.ResultCode == -1)
But when I check the Asterisk trace in the CLI, Asterisk return the "ANSWER" value as expected !
Here what I see in the CLI :
<SIP/Android-00000021>AGI Rx << GET VARIABLE "DIALSTATUS"
<SIP/Android-00000021>AGI Tx >> 200 result=1 (ANSWER)
Why GetVariable can't get the returned value in this case ?

comments

skrusty wrote Aug 15, 2014 at 8:30 AM

I've seen this also, with the AsterNET.Extensions classes.

squady wrote Aug 15, 2014 at 11:40 AM

for information, if I call GetVariable("DIALSTATUS") twice, the second call return the value.