[OpenSIPS-Devel] E_DLG_STATE_CHANGED missing dialog information for ENDED state.

Adam Overbeeke Adam.Overbeeke at genesys.com
Thu Mar 7 09:49:31 EST 2019


Hi Bogdan,


We are trying to access the dialog information during the event route. The function that we are using is get_dialog_vals. During my testing, I was able to get the expected parameters that was passed from the event route, but the dialog variables was returning nothing. This happens only when the state transitions to ENDED, all other states have the information. This makes me believe that the dialog was destroy.



i.e. in this example: variableOne and variableTwo are dialog variables.


event_route[E_DLG_STATE_CHANGED] {

         fetch_event_params("hash_entry=$avp(eparm_hash_entry)");
        fetch_event_params("hash_id=$avp(eparm_hash_id)");
        fetch_event_params("callid=$avp(eparm_callid)");
        fetch_event_params("from_tag=$avp(eparm_from_tag)");
        fetch_event_params("to_tag=$avp(eparm_to_tag)");
        fetch_event_params("old_state=$avp(eparm_old_state)");
        fetch_event_params("new_state=$avp(eparm_new_state)");

         if ( get_dialog_vals("$avp(d_names)","$avp(d_vals)","$avp(eparm_callid)") ) {
                $var(i) = 0;
                while ( $(avp(d_names)[$var(i)]) != NULL ) {
                         $var(k) = $(avp(d_names)[$var(i)]);
                         $var(v) = $(avp(d_vals)[$var(i)]);
                         switch($var(k)) {
                                  case "variableOne":
                                           #// log statement here
                                           break;
                                  case "variableTwo":
                                           #// log statement here
                                           break;
                         }
                         $var(i) = $var(i) + 1;
                }
        }
}



^ when the state is ENDED, get_dialog_vals returns nothing back for the dialog’s callid.



Hope it helps,



Adam


From: Bogdan-Andrei Iancu <bogdan at opensips.org>
Date: Thursday, March 7, 2019 at 5:37 AM
To: OpenSIPS devel mailling list <devel at lists.opensips.org>, Adam Overbeeke <Adam.Overbeeke at genesys.com>
Subject: Re: [OpenSIPS-Devel] E_DLG_STATE_CHANGED missing dialog information for ENDED state.

Hi Adam,

Sorry for the late reply.

How exactly are you trying to retrieve the dialog info (during the TERMINATED event) ?

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://www.opensips-solutions.com>

OpenSIPS Summit 2019

  https://www.opensips.org/events/Summit-2019Amsterdam/<https://www.opensips.org/events/Summit-2019Amsterdam/>
On 02/20/2019 04:55 PM, Adam Overbeeke wrote:

Hello all,

We are trying to use the dialog event routes and ran into some unexpected behavior. The issue is that we cannot retrieve the dialog information when the dialog state transitions to ENDED. We believe the dialog have been destroyed or removed prior to firing the event change. Is it possible to change this behavior in the synchronous case? We understand design decision for asynchronous handling but believe it should be possible to retrieve the information in the synchronous case.

If our assumptions are incorrect, we are open to ideas on how we could get the dialog information during the ENDED state. We are considering using a local cache in the meantime, but that will duplicate a lot of information in our system. My hopes are that we are just missing some function call. We appreciate your help/response.

Thanks,

Adam

Adam Overbeeke
Lead Voice Network Engineer, PureCloud
[cid:image001.png at 01D2DB78.7C3D8250]
[cid:image002.png at 01D2DB78.7C3D8250]<http://www.genesys.com/>
[cid:image003.png at 01D2DB78.7C3D8250]<https://twitter.com/Genesys>[cid:image004.png at 01D2DB78.7C3D8250]<http://www.linkedin.com/company/601919?trk=tyah>[cid:image005.png at 01D2DB78.7C3D8250]<https://plus.google.com/+Genesyslab?rel=publisher>[cid:image006.png at 01D2DB78.7C3D8250]<https://www.facebook.com/Genesys/>[cid:image007.png at 01D2DB78.7C3D8250]<https://www.youtube.com/Genesys>[cid:image008.png at 01D2DB78.7C3D8250]<http://blog.genesys.com/>





_______________________________________________

Devel mailing list

Devel at lists.opensips.org<mailto:Devel at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/devel<http://lists.opensips.org/cgi-bin/mailman/listinfo/devel>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1243 bytes
Desc: image001.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 7163 bytes
Desc: image002.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2055 bytes
Desc: image003.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2042 bytes
Desc: image004.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 2045 bytes
Desc: image005.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1921 bytes
Desc: image006.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 2058 bytes
Desc: image007.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 2072 bytes
Desc: image008.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190307/726495a2/attachment-0015.png>


More information about the Devel mailing list