[asterisk-bugs] [JIRA] (ASTERISK-28446) Asterisk NOTIFY NOT_INUSE and UNAVAILABLE both send same XML dialog <state>terminated</state>
Joshua C. Colp (JIRA)
noreply at issues.asterisk.org
Thu Jun 13 11:11:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua C. Colp closed ASTERISK-28446.
-------------------------------------
Just clearing out resolution...
> Asterisk NOTIFY NOT_INUSE and UNAVAILABLE both send same XML dialog <state>terminated</state>
> ---------------------------------------------------------------------------------------------
>
> Key: ASTERISK-28446
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28446
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/Interoperability
> Affects Versions: 13.27.0
> Reporter: David Brillert
>
> I confirmed the bad behavior with Yealink product management.
> A Yealink phone configured to subscribe to asterisk hint for devstate will not change the BLF light correctly.
> Yealink supports:
> BLF = Green/NOT_INUSE
> BLF= OFF/UNAVAILABLE
> But the lights don't function in the desired manner because Asterisk sends the same XML dialog <state>terminated</state> for both device states. So the Yealink and all other vendors result in:
> BLF = Green/NOT_INUSE
> BLF= Green/UNAVAILABLE
> Here is the bit of Asterisk source code responsible for the problem:
> Asterisk source code:
> if (data->state & AST_EXTENSION_RINGING && sip_cfg.notifyringing) {
> ast_str_append(tmp, 0, "<state>early</state>\n");
> } else if (data->state & (AST_EXTENSION_RINGING | AST_EXTENSION_INUSE | AST_EXTENSION_BUSY |
> AST_EXTENSION_ONHOLD) || data->presence_state == AST_PRESENCE_DND) {
> ast_str_append(tmp, 0, "<state>confirmed</state>\n");
> } else {
> ast_str_append(tmp, 0, "<state>terminated</state>\n");
> }
>
> This is from chan_sip
> So Asterisk always sends terminated if state is "UNAVAILABLE" and by the same if statement "IDLE" will also result in XML <state>terminated</state>
> Yealink expects to see a 480 temporarily unavailable response for UNAVAILABLE
> Here is a summary of XML responses by devstate from Asterisk 13.27
> RINGING <state>early</state>
> ONHOLD <state>confirmed</state>
> BUSY <state>confirmed</state>
> UNAVAILABLE <state>terminated</state>
> NOT_INUSE <state>terminated</state>
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list