[OpenSIPS-Users] Differentiate in Dialog table between incoming and outgoing calls
Jeff Pyle
jpyle at fidelityvoice.com
Tue Oct 22 19:30:17 CEST 2013
Hello,
You can set a dialog flag with
set_dlg_flag()<http://www.opensips.org/html/docs/modules/devel/dialog.html#id295687>.
That flag will show up in the DB table if you have
db_mode<http://www.opensips.org/html/docs/modules/devel/dialog.html#id293698>set
to 1. The flags you set will appear as a bitmapped integer in the
script_flags<http://www.opensips.org/html/docs/modules/devel/dialog.html#id294602>column.
So, if you set_dlg_flag("10") for inbound calls and set_dlg_flag("20") for
outbound calls, you'll see either 1024 for inbound or 1048576 for outbound
in the DB. You'll want to pick values that make sense for you.
Another option is to use dialog profiles. You could assign dialogs to
profiles named "inbound" and "outbound", for example, then count them with
an MI command. This way the database is unrelated, and depending on server
load, greatly enhance efficiency compared to realtime dialog updates to the
DB. The profile name itself may appear in the DB record also; you'll want
to test that one if you think it might be useful for you.
- Jeff
On Tue, Oct 22, 2013 at 1:12 PM, Schneur Rosenberg <rosenberg11219 at gmail.com
> wrote:
> Hi, I'm trying to pull the active calls from the dialog table to output on
> a client portal, I would like to know if I can set some kind of flag in my
> script that will change a field in the db table, so I can do a query on
> that field.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131022/90621390/attachment.htm>
More information about the Users
mailing list