]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_pjsip: Update device state when in early media.
authorJoshua Colp <jcolp@digium.com>
Wed, 7 Jun 2017 20:19:05 +0000 (20:19 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 7 Jun 2017 20:19:05 +0000 (20:19 +0000)
The chan_pjsip module uses a calculation approach for
determining device state. This means that in situations
where we would expect device state to change we need to
tell the core to query. A scenario that was missed is
when early media was signaled.

This change adds the notification for the core to
query device state when we are told that early media
is being provided.

ASTERISK-27039

Change-Id: Iafebfd152894966344ff2e950a3cee9f59a3eb6f

channels/chan_pjsip.c

index 97c3d101bd253969796d733b7e62190e9274a2bf..6eea7936815eda9ec3d21377cc90a123d2b4e763 100644 (file)
@@ -1356,6 +1356,7 @@ static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const voi
                } else {
                        res = -1;
                }
+               ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "PJSIP/%s", ast_sorcery_object_get_id(channel->session->endpoint));
                break;
        case AST_CONTROL_VIDUPDATE:
                media = pvt->media[SIP_MEDIA_VIDEO];