[SR-Users] Dialog module showing calls that have already been terminated
Phillman25 Kyriacou
phillman25 at gmail.com
Tue Sep 20 15:23:09 CEST 2011
Hey Timo
Thanks for your email.
I apologise i never copied the config properly. I missed a } to close the
if statement.
You can see that the route(WITHINDLG); is called for all requests from this
config.
# MANAGE ALL DIALOGS
#===================================================
if (is_method("INVITE"))
{
if(is_method("INVITE") && !has_totag())
{
$dlg_ctx(timeout_route) = 12;
$dlg_ctx(timeout_bye) = 1;
}
dlg_manage();
}
if(is_method("BYE|CANCEL"))
{
dlg_manage();
}
# per request initial checks
route(REQINIT);
# NAT detection
route(NAT);
# handle requests within SIP dialogs
route(WITHINDLG);
### only initial requests (no To tag)
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
t_check_trans();
# authentication
route(AUTH);
# record routing for dialog forming requests (in case they are
routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
record_route();
Thanks again for your help.
Phillip
On Tue, Sep 20, 2011 at 3:06 PM, Timo Reimann <timo.reimann at 1und1.de> wrote:
> Hey Phillip,
>
>
> On 20.09.2011 13:48, Phillman25 Kyriacou wrote:
> > Thanks for your email.
> >
> > Yes dlg_manage(); has to now be called on INVITE and BYE/CANCEL messages.
> > Where would i have to call loose_route()? Only on INVITE?
>
> On *all* in-dialog requests, i.e., all requests which contain a To tag.
> This may include Re-INVITEs too (but not initial INVITEs).
>
>
> > My configuration did not change between 3.1.2 and 3.1.5.
> >
> > Call flow example:
> > ==============
> >
> > Cisco PGW ===> Kamailio 3.1.5 ===> VOIP PROVIDER or ASTERISK PABX
> >
> >
> > The below is my configuration.
>
> Let's take a look at it:
>
>
> > #!KAMAILIO
> > #
>
> [...]
>
> > if(is_method("BYE|CANCEL"))
> >
> > {
> >
> > dlg_manage();
> >
> >
> >
> > # per request initial checks
> > route(REQINIT);
> >
> > # NAT detection
> > route(NAT);
> >
> > # handle requests within SIP dialogs
> > route(WITHINDLG);
>
> [...]
>
> > # Handle requests within SIP dialogs
> > route[WITHINDLG] {
> > if (has_totag()) {
> > # sequential request withing a dialog should
> > # take the path determined by record-routing
> > if (loose_route()) {
>
> [...]
>
>
> So route[WITHINDLG] contains the logic to track in-dialog requests.
> However, you seem to call that route only from BYE and CANCEL requests,
> missing out ACKs, which is likely the reason why things go wrong. So
> make sure you run all in-dialog requests through that route, and you
> should be fine (hopefully).
>
>
> Cheers,
>
> --Timo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110920/9724434a/attachment-0001.htm>
More information about the sr-users
mailing list