Hi, perhaps I miss something but I don't get set_dlg_profile() working:
---------------- modparam("dialog", "dlg_flag", FLAG_DIALOG) modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "db_mode", 1) modparam("dialog", "profiles_no_value", "inbound ; outbound")
if is_method("INVITE") { setflag(FLAG_DIALOG); set_dlg_profile("outbound"); ... ----------------
But when I run "kamctl fifo profile_list_dlgs outbound" I see nothing (the dialog does appear listed in "kamctl fifo dlg_list").
I've also added into the loose_route section: if (is_in_profile("outbound")) { xlog("L_CRIT", "*** this request belongs to an outbound call\n"); }
This should appear when the ACK-200 arrives, also in any re-INVITE or BYE, but it doesn't ¿?
Do I miss something? Thanks.
Hello,
do you get any particular error in the syslog?
Can you try using dlg_mange() instead of setting the FLAG_DIALOG? http://kamailio.org/docs/modules/1.5.x/dialog.html#id2531667
Cheers, Daniel
On 03/20/2009 01:04 PM, Iñaki Baz Castillo wrote:
Hi, perhaps I miss something but I don't get set_dlg_profile() working:
modparam("dialog", "dlg_flag", FLAG_DIALOG) modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "db_mode", 1) modparam("dialog", "profiles_no_value", "inbound ; outbound")
if is_method("INVITE") { setflag(FLAG_DIALOG); set_dlg_profile("outbound"); ...
But when I run "kamctl fifo profile_list_dlgs outbound" I see nothing (the dialog does appear listed in "kamctl fifo dlg_list").
I've also added into the loose_route section: if (is_in_profile("outbound")) { xlog("L_CRIT", "*** this request belongs to an outbound call\n"); }
This should appear when the ACK-200 arrives, also in any re-INVITE or BYE, but it doesn't ¿?
Do I miss something? Thanks.
2009/3/24 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
do you get any particular error in the syslog?
Can you try using dlg_mange() instead of setting the FLAG_DIALOG? http://kamailio.org/docs/modules/1.5.x/dialog.html#id2531667
Thanks, that works but just if I set "dlg_manage()" before "set_dlg_profile():
dlg_manage(); set_dlg_profile("topbx");
But the following doesn't work:
setflag(FLAG_DIALOG); set_dlg_profile("topbx");
2009/3/24 Iñaki Baz Castillo ibc@aliax.net:
Can you try using dlg_mange() instead of setting the FLAG_DIALOG? http://kamailio.org/docs/modules/1.5.x/dialog.html#id2531667
Also, could I know the difference between setflag(FLAG_DIALOG) and dlg_manage() ? According to the doc:
----------- dlg_manage()
Process current SIP request with dialog module. It is alternative to setting dialog flag for initial INVITE and Route-parameter-callback execution for within-dialog requests. -----------
On 03/24/2009 11:17 AM, Iñaki Baz Castillo wrote:
2009/3/24 Iñaki Baz Castillo ibc@aliax.net:
Can you try using dlg_mange() instead of setting the FLAG_DIALOG? http://kamailio.org/docs/modules/1.5.x/dialog.html#id2531667
Also, could I know the difference between setflag(FLAG_DIALOG) and dlg_manage() ?
For initial INVITE when setting the flag, the dialog is actually created upon a tm callback. With dlg_manage() dialog is created immediately.
For requests withing dialog, the state is updated either when loose_route() is executed or when dlg_manage() is called.
The need of dlg_manage() is especially when you have static routes inside your network and you do not add Record-Route in all your servers. Also, makes more clear when you get dialog related operations done.
Cheers, Daniel
According to the doc:
dlg_manage()
Process current SIP request with dialog module. It is alternative to setting dialog flag for initial INVITE and Route-parameter-callback execution for within-dialog requests.
2009/3/24 Daniel-Constantin Mierla miconda@gmail.com:
For initial INVITE when setting the flag, the dialog is actually created upon a tm callback. With dlg_manage() dialog is created immediately.
ok
For requests withing dialog, the state is updated either when loose_route() is executed or when dlg_manage() is called.
So, in case I do "loose_route()" I don't need to call "dlg_manage()" during in-dialog processing, right?
The need of dlg_manage() is especially when you have static routes inside your network and you do not add Record-Route in all your servers. Also, makes more clear when you get dialog related operations done.
Useful, yes :) Thanks.
I'm very annoying because now I've removed *all* dlg_manage() and setflag(DIALOG) from my script (dialog module remains loaded) and the dialogs are stored in memory and DB !!!
Do I miss something? Also, using "dlg_manage()" I get 2 entries for each dialog!
On 03/24/2009 11:59 AM, Iñaki Baz Castillo wrote:
I'm very annoying because now I've removed *all* dlg_manage() and setflag(DIALOG) from my script (dialog module remains loaded) and the dialogs are stored in memory and DB !!!
Old dialogs only or new dialogs are added there?
Do I miss something? Also, using "dlg_manage()" I get 2 entries for each dialog!
Are you sure? There are constraints to prevent that. Are they both in memory and db?
Cheers, Daniel
2009/3/24 Daniel-Constantin Mierla miconda@gmail.com:
On 03/24/2009 11:59 AM, Iñaki Baz Castillo wrote:
I'm very annoying because now I've removed *all* dlg_manage() and setflag(DIALOG) from my script (dialog module remains loaded) and the dialogs are stored in memory and DB !!!
Old dialogs only or new dialogs are added there?
I stop Kamailio, clean dialog table, start kamailio. No dialogs if I do "kamct fifo dlg_list", neither in DB. I do a call (ringing). It appears running the fifo commands and also in the dialog table. I've dialog module loaded, but I don't use dlg_manage() or setflag(DIALOG), neither set_dlg_profile(), nothing related to dialog module!
Do I miss something? Also, using "dlg_manage()" I get 2 entries for each dialog!
Are you sure? There are constraints to prevent that. Are they both in memory and db?
Yes they were (when dialog functions were used in the config script).
I must test it more.
On 03/24/2009 11:15 AM, Iñaki Baz Castillo wrote:
2009/3/24 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
do you get any particular error in the syslog?
Can you try using dlg_mange() instead of setting the FLAG_DIALOG? http://kamailio.org/docs/modules/1.5.x/dialog.html#id2531667
Thanks, that works but just if I set "dlg_manage()" before "set_dlg_profile():
dlg_manage(); set_dlg_profile("topbx");
But the following doesn't work:
setflag(FLAG_DIALOG); set_dlg_profile("topbx");
ok. I will analyze to see what happens.
You didn't get any error when you try first option, right?
Cheers, Daniel
2009/3/24 Daniel-Constantin Mierla miconda@gmail.com:
You didn't get any error when you try first option, right?
Absolutelly nothing (with debug level = 5).