Hello,
another addition to the dialog module is the new pseudo-variable class $dlg(...)
http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#dlg_attr
With it you can get access to all attributes of current processed dialog, e.g., caller and callee URI, start time, flags...
A typical use case is to write full cdr when the BYE comes over - the dialog stores the start time and you can get the end time via $Ts. You can either write the acc record at dialog ending or update the start acc event written when INVITE was processed - you have access to the call-id, from tag and to tag in the right order and one shot of sql_query() will do it.
Cheers, Daniel
Daniel-Constantin Mierla schrieb:
Hello,
another addition to the dialog module is the new pseudo-variable class $dlg(...)
http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#dlg_attr
With it you can get access to all attributes of current processed dialog, e.g., caller and callee URI, start time, flags...
I guess the callee URI is the originally RURI. Is it possible to store an additional URI (e.g. canonical callee URI) within the dialog too?
regards klaus
A typical use case is to write full cdr when the BYE comes over - the dialog stores the start time and you can get the end time via $Ts. You can either write the acc record at dialog ending or update the start acc event written when INVITE was processed - you have access to the call-id, from tag and to tag in the right order and one shot of sql_query() will do it.
Cheers, Daniel
Kamailio (OpenSER) - Devel mailing list Devel@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
Hello Klaus,
On 02/06/2009 07:26 AM, Klaus Darilion wrote:
Daniel-Constantin Mierla schrieb:
Hello,
another addition to the dialog module is the new pseudo-variable class $dlg(...)
http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#dlg_attr
With it you can get access to all attributes of current processed dialog, e.g., caller and callee URI, start time, flags...
I guess the callee URI is the originally RURI.
yes, it gets access to the sip-dialog elements.
Is it possible to store an additional URI (e.g. canonical callee URI) within the dialog too?
There is a solution by using htable and store as many attributes per dialog as you want. Make a combined key like: $sht(dlg=>$dlg(h_entry)::$dlg(h_id)::uri) = ...;
You can set same timeout as for dialog or delete when dialog ends. For future, we can add native support if this is not that nice -- but for moment I though is ok the way it can be done now as time was limited.
Cheers, Daniel
regards klaus
A typical use case is to write full cdr when the BYE comes over - the dialog stores the start time and you can get the end time via $Ts. You can either write the acc record at dialog ending or update the start acc event written when INVITE was processed - you have access to the call-id, from tag and to tag in the right order and one shot of sql_query() will do it.
Cheers, Daniel
Kamailio (OpenSER) - Devel mailing list Devel@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users