Hi folks,
i have a problem with call_control module. I get a following log from kamailio
kamailio[15066]: WARNING: call_control [call_control.c:1159]: postprocess_request(): dialog to trace controlled call was not created. discarding callcontrol.
and following log from call_control python application
Call id <call-id> of 1000@domain.com to sip:0033000000@domain.com canceled by user
As far as I can see the call_control module runs a postprocess_request() function which checks whether the dialog was created by checking FL_USE_CALL_CONTROL variable.
This variable is set at the time of the registration of call_controll to the dialog module DLGCB_CREATED.
Therefore if I call the call_control() function in kamailio after the dlg_manage, the FL_USE_CALL_CONTROL cannot be set and the call_control won't work.
In my configuration I would like to call the dlg_manage at the beginning of the script for example because of uac_replace_from as I have AUTO_RESTORE mode ON.
I have kamailio 4.0.2 and call_control 2.0.15.
Is there anything I can fix in a script or configuration or this is an implementation problem?
Thanks for the reply
Efelin
Hello,
On 10/14/13 10:07 AM, Efelin Novak wrote:
Hi folks,
i have a problem with call_control module. I get a following log from kamailio
kamailio[15066]: WARNING: call_control [call_control.c:1159]: postprocess_request(): dialog to trace controlled call was not created. discarding callcontrol.
and following log from call_control python application
Call id <call-id> of 1000@domain.com mailto:1000@domain.com to sip:0033000000@domain.com mailto:sip%3A0033000000@domain.com canceled by user
As far as I can see the call_control module runs a postprocess_request() function which checks whether the dialog was created by checking FL_USE_CALL_CONTROL variable.
This variable is set at the time of the registration of call_controll to the dialog module DLGCB_CREATED.
Therefore if I call the call_control() function in kamailio after the dlg_manage, the FL_USE_CALL_CONTROL cannot be set and the call_control won't work.
In my configuration I would like to call the dlg_manage at the beginning of the script for example because of uac_replace_from as I have AUTO_RESTORE mode ON.
I have kamailio 4.0.2 and call_control 2.0.15.
Is there anything I can fix in a script or configuration or this is an implementation problem?
you can call dlg_manage() inside if conditions for initial requests and within dialog requests. So for initial you have it towards the end of the script. Anyhow, in both cases, do it as much as possible before relaying.
Cheers, Daniel
Thanks Daniel,
I'm confused a little bit by the dialog module documentation. Please correct me if I'm wrong
For initial invite I should create a dialog with dlg_manage "just" before t_relay. All dialog variables would be set correctly? How about dialog:failed route, would it work correctly? For in dialog requests (has_totag) I should call dlg_manage at the beginning of the script to have all dialog variables available.
So far seems to be fine. However uac_replace_from auto restore feature does not work with this scenario. Should I move it right after dlg_manage like this:?
dlg_manage(); uac_replace_from(); t_relay;
I think e.g. mediaproxy also requires the dialog to be started before enagage_mediaproxy()? Aren't there any other functions bound to the dialog creation?
I apologize for so many questions and if any of these questions is inappropriate I'm sorry.
Thanks for clarifying answers.
Efelin
2013/10/14 Daniel-Constantin Mierla miconda@gmail.com
Hello,
On 10/14/13 10:07 AM, Efelin Novak wrote:
Hi folks,
i have a problem with call_control module. I get a following log from kamailio
kamailio[15066]: WARNING: call_control [call_control.c:1159]: postprocess_request(): dialog to trace controlled call was not created. discarding callcontrol.
and following log from call_control python application
Call id <call-id> of 1000@domain.com to sip:0033000000@domain.comcanceled by user
As far as I can see the call_control module runs a postprocess_request() function which checks whether the dialog was created by checking FL_USE_CALL_CONTROL variable.
This variable is set at the time of the registration of call_controll to the dialog module DLGCB_CREATED.
Therefore if I call the call_control() function in kamailio after the dlg_manage, the FL_USE_CALL_CONTROL cannot be set and the call_control won't work.
In my configuration I would like to call the dlg_manage at the beginning of the script for example because of uac_replace_from as I have AUTO_RESTORE mode ON.
I have kamailio 4.0.2 and call_control 2.0.15.
Is there anything I can fix in a script or configuration or this is an implementation problem?
you can call dlg_manage() inside if conditions for initial requests and within dialog requests. So for initial you have it towards the end of the script. Anyhow, in both cases, do it as much as possible before relaying.
Cheers, Daniel
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Trainings - Berlin, Nov 25-28; Miami, Nov 18-20, 2013
- more details about Kamailio trainings at http://www.asipto.com -
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 10/14/13 12:12 PM, Efelin Novak wrote:
Thanks Daniel,
I'm confused a little bit by the dialog module documentation. Please correct me if I'm wrong
For initial invite I should create a dialog with dlg_manage "just" before t_relay. All dialog variables would be set correctly?
Not sure, never used dialog vars. But you can set them after dlg_manage(). The rule is that dialog should not be created before you are (pretty) sure the initial invite is going to be relayed.
For requests within dialog you can call it earlier, as there is no much routing logic to be done for them.
How about dialog:failed route, would it work correctly?
Yes.
For in dialog requests (has_totag) I should call dlg_manage at the beginning of the script to have all dialog variables available.
That's fine.
So far seems to be fine. However uac_replace_from auto restore feature does not work with this scenario. Should I move it right after dlg_manage like this:?
dlg_manage(); uac_replace_from(); t_relay;
Yes, should be recommended. Typically I do uac_replace_from() in a branch route, because in case of serial forking another branch might need a different From format.
I think e.g. mediaproxy also requires the dialog to be started before enagage_mediaproxy()? Aren't there any other functions bound to the dialog creation?
I don't remember any one at this moment.
I apologize for so many questions and if any of these questions is inappropriate I'm sorry.
Cheers, Daniel