Hello,
right, I missed the headers and the spilt of the logs.
I think this is related to the 3.1.x version of dialog module which was
not designed to work with stateless replies, which is the case for
authentication challenges.
Can you update your config file for authentication so that before
proxy_challenge() you add t_newtran() and try again?
Cheers,
Daniel
On 12/2/11 12:18 PM, Yufei Tao wrote:
Hi Daniel
Thanks very much for you response!
In my original config, I only set the dialog flag when receiving the
initial INVITE, and didn't use dlg_manage() at all.
Now I have added dlg_manage() when BYE is received as you suggested, I
got from the log that: $DLG_status=5. But the dialog entry is still not
deleted. That entry in the dialog table has state=4.
I've also tried to add dlg_manage() when receiving re-INVITE in
route[WITHINDLG]. In the log, $DLG_status=4 when receiving re-INVITE.
But when receiving BYE it is the same: $DLG_status=5 in log, but state=4
in table, and entry is not deleted.
I've tried different things but so far the only way to make the dialog
entry deleted is to remove call of route(AUTH) in route[WITHINDLG].
Here are the logs from an call with in-dlg auth, and a call without
in-dlg auth. Seems the one with in-dlg auth didn't proceed to remove the
dlg after call:
====================== With in-dlg auth: ======================
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7cb1614 with 1 -> 3
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c7a-0-1322823138' found on entry
548, dir=1
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7cb1614 changed from state 4 to state 4, due
event 8
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7cb164c for -2100549893
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 11125
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7cb1614, type=16
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7cb1614 with 1 -> 4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: INFO:<script>:
WITHINDLG: INVITE: 1. b4 dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: INFO:<script>:
WITHINDLG: INVITE: 1. after dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28700]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 3
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7cb1614 with 1 -> 4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c7a-0-1322823138' found on entry
548, dir=1
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7cb1614 changed from state 4 to state 4, due
event 8
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7cb164c for -2100549893
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 11126
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7cb1614, type=16
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7cb1614 with 1 -> 5
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: INFO:<script>:
WITHINDLG: INVITE: 1. b4 dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: INFO:<script>:
WITHINDLG: INVITE: 1. after dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: INFO:<script>:
WITHINDLG: INVITE: 2. b4 dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: INFO:<script>:
WITHINDLG: INVITE: 2. after dlg_manage: DLG_status=4
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7cb1614 with 1 -> 6
Dec 2 10:56:00 aqua2 /usr/sbin/kamailio[28701]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 5
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28702]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7cb1614, type=512
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7cb1614 with 1 -> 6
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c7a-0-1322823138' found on entry
548, dir=1
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7cb1614 changed from state 4 to state 4, due
event 6
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7cb164c for -2100549892
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 11126
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7cb1614, type=16
Dec 2 10:56:01 aqua2 /usr/sbin/kamailio[28703]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 5
Dec 2 10:56:06 aqua2 /usr/sbin/kamailio[28753]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 4
Dec 2 10:56:06 aqua2 /usr/sbin/kamailio[28753]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 3
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7cb1614 with 1 -> 4
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c7a-0-1322823138' found on entry
548, dir=1
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7cb1614 changed from state 4 to state 5, due
event 7
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7cb1614 with 1 -> 5
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_handlers.c:1013]: BYE successfully processed
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 2 -> 3
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: INFO:<script>:
WITHINDLG: BYE: b4 dlg_manage: DLG_status=5
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: INFO:<script>:
WITHINDLG: BYE: after dlg_manage: DLG_status=5
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7cb1614 with 1 -> 4
Dec 2 10:56:16 aqua2 /usr/sbin/kamailio[28713]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 3
Dec 2 10:56:21 aqua2 /usr/sbin/kamailio[28753]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 2
Dec 2 10:56:21 aqua2 /usr/sbin/kamailio[28753]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7cb1614 with 1 -> 1
====================== Without in-dlg
auth:========================================
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 1
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 5 to state 5, due
event 1
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 0
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: ref<=0 for dialog 0xa7e01dec
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:180]: destroying dialog 0xa7e01dec
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:196]: removed timer for dlg 0xa7e01dec [129:1689784596] with
clid 'baac5c21-0-1322822433' and tags '34923' ''
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=4096
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_db_handler.c:433]: trying to remove dialog [baac5c21-0-1322822433],
update_flag is 0
Dec 2 10:40:40 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_db_handler.c:451]: callid was baac5c21-0-1322822433
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:487]: no dialog callid='baac5c27-0-1322822449' found
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:487]: no dialog callid='baac5c27-0-1322822449' found
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:517]: no dialog callid='baac5c27-0-1322822449' found
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:295]: new dialog on hash 129
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_handlers.c:264]: route_set , contact
sip:global.s2@86.13.96.247:51500;line=c0a80006c92c;transport=UDP, cseq
8874 and bind_addr udp:82.219.14.194:5060
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:546]: ref dlg 0xa7e01dec with 1 -> 1
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_cb.c:228]: dialog=0xa7e01dec
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 2
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27962]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=256
Dec 2 10:40:44 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 1 to state 2, due
event 2
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=256
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 2 to state 3, due
event 3
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_handlers.c:331]: dialog 0xa7e01dec confirmed
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_handlers.c:264]: route_set , contact
sip:global.p1@86.13.96.247:34706;rinstance=ea01df5316ddd508;transport=udp,
cseq 8874 and bind_addr udp:82.219.14.194:5060
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_db_handler.c:511]: sock_info is udp:82.219.14.194:5060
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7e01e24 for -2108358708
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7e01dec with 1 -> 5
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c27-0-1322822449' found on entry
129, dir=1
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 3 to state 4, due
event 6
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7e01e24 for -2108358708
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 8874
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=16
Dec 2 10:40:46 aqua2 /usr/sbin/kamailio[27957]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:40:51 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:40:51 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:641]: unref dlg 0xa7e01dec with 1 -> 2
Dec 2 10:40:51 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 4 to state 4, due
event 1
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c27-0-1322822449' found on entry
129, dir=1
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 4 to state 4, due
event 8
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7e01e24 for -2108358483
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 8875
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=16
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 5
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27956]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27960]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=512
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7e01dec with 1 -> 5
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c27-0-1322822449' found on entry
129, dir=1
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 4 to state 4, due
event 6
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_handlers.c:1042]: sequential request successfully processed
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_timer.c:117]: inserting 0xa7e01e24 for -2108358483
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:411]: cseq is 8875
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=16
Dec 2 10:44:31 aqua2 /usr/sbin/kamailio[27964]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:44:36 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:44:36 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 2
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:478]: ref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:481]: dialog callid='baac5c27-0-1322822449' found on entry
129, dir=1
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:755]: dialog 0xa7e01dec changed from state 4 to state 5, due
event 7
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 4
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_handlers.c:1013]: BYE successfully processed
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 2 -> 2
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: INFO:<script>:
WITHINDLG: BYE: b4 dlg_manage: DLG_status=5
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: INFO:<script>:
WITHINDLG: BYE: after dlg_manage: DLG_status=5
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:566]: ref dlg 0xa7e01dec with 1 -> 3
Dec 2 10:44:50 aqua2 /usr/sbin/kamailio[27975]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 2
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 1
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: unref dlg 0xa7e01dec with 1 -> 0
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:584]: ref<=0 for dialog 0xa7e01dec
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:180]: destroying dialog 0xa7e01dec
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_hash.c:196]: removed timer for dlg 0xa7e01dec [129:1689784597] with
clid 'baac5c27-0-1322822449' and tags '34930' '3104b03d'
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_cb.c:250]: dialog=0xa7e01dec, type=4096
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_db_handler.c:433]: trying to remove dialog [baac5c27-0-1322822449],
update_flag is 4
Dec 2 10:44:55 aqua2 /usr/sbin/kamailio[27979]: DEBUG: dialog
[dlg_db_handler.c:451]: callid was baac5c27-0-1322822449
Thanks very much!
Yufei
On 01/12/11 12:12, Daniel-Constantin Mierla wrote:
Hello,
I could not spot how dialog traffic is handled, via flag or
dlg_manage()? The dialog entry should be deleted after the BYE is
processed. Can you dump the dialog attributes via mi (with kamctl) and
see what is the state of the dialog after processing the BYE? Also,
you can try to do dlg_manage() when BYE is received.
Cheers,
Daniel
On 11/30/11 3:36 PM, Yufei Tao wrote:
> Hi
>
> I am using dialog module in Kamailio 3.1.5, and find that the dialog
> table entry does not get deleted after call if in-dialog requests (e.g.
> session timer refresh re-INVITEs in my case) are challenged. The entry
> will stay there and get deleted after a long time (some time out? I
> didn't set any dialog timeouts myself). If I remove the challenge for
> in-dialog requests, then the dialog entry is deleted right after the
> call.
>
> I use the example config script with a bit of modification for my
> in-dialog route:
>
> route[WITHINDLG] {
> xlog("L_DBG","WITHINDLG: method=$rm, callid=$ci,
cseq=$cs\n");
>
> if (has_totag() ) {
> # sequential request withing a dialog should
> # take the path determined by record-routing
> if (loose_route()) {
> # Filter out bad/faked up in-dialog requests.
> if ( !is_known_dlg() )
> {
> xlog("L_WARN","WITHINDLG: NOT known dlg!! method=$rm,
> callid=$ci, cseq=$cs, $fu->$tu\n");
> exit;
> }
>
> if (is_method("BYE")) {
> xlog("L_DBG","WITHINDLG: BYE found within Dialog \n");
>
> setflag(FLT_ACC); # do accounting ...
> setflag(FLT_ACCFAILED); # ... even if the transaction fails
> }
> ##########################################################
> # challenge: if not CANCEL/ACK
> else if ( !is_method("CANCEL")&&
!is_method("ACK") )
> {
> route(AUTH);
> }
> ##########################################################
> xlog("L_DBG","WITHINDLG: Entering RELAY route from WITHINDLG
> route. \n");
>
> route(RELAY);
> } else {
> if (is_method("SUBSCRIBE")&& uri == myself) {
> # in-dialog subscribe requests
> route(PRESENCE);
> exit;
> }
> if ( is_method("ACK") ) {
> xlog("L_DBG","WITHINDLG: ACK callid=$ci, cseq=$cs\n");
>
> if ( t_check_trans() ) {
> # no loose-route, but stateful ACK;
> # must be an ACK after a 487
> # or e.g. 404 from upstream server
>
> xlog("L_DBG","ACK being relayed\n");
>
> t_relay();
> exit;
> } else {
> # ACK without matching transaction ... ignore and discard
> xlog("L_DBG","ACK without matching transaction-ignore and
> discard\n");
> exit;
> }
> }
> sl_send_reply("404","Not here");
> }
> exit;
> }
> }
>
> The part that calls route(AUTH) that I added was the cause for the
> dialog entry not being deleted after call.
>
> Here are my dialog related settings:
>
> modparam("dialog", "enable_stats", 1)
> modparam("dialog", "dlg_flag", 4)
> modparam("dialog", "db_url", DBURL)
> modparam("dialog", "db_update_period", 20) # use short one to
catch
> short dlgs (default:60)
> modparam("dialog", "db_mode", 1)
> # don't use did, so to cope with clients that don't preserve parameters
> # and mode 1 (fallback to 3261 matching) didn't work??
> modparam("dialog", "dlg_match_mode", 2)
>
> modparam("dialog", "profiles_no_value", "inbound ;
outbound")
> modparam("dialog", "dlg_extra_hdrs", "Hint: dialog
expired\r\n")
>
> # default timeout set to max int 0x07FFFF FFFF
> modparam("dialog", "default_timeout", 2147483647)
>
>
>
> And I set the dialog flag (4) when receiving the initial INVITE.
>
> Any idea why? Am I using the dialog module correctly?
>
> Thanks very much!
>
> Yufei
>
> --
> Yufei Tao
> Red Embedded
>
> This E-mail and any attachments hereto are strictly confidential and
> intended solely for the addressee. If you are not the intended
> addressee please notify the sender by return and delete the message.
>
> You must not disclose, forward or copy this E-mail or attachments to
> any third party without the prior consent of the sender.
>
> Red Embedded Design, Company Number 06688253 Registered in England:
> The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users --
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for
the addressee. If you are not the intended addressee please notify the sender by return
and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party
without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts
Mill Rd, Saltaire, BD17 7EZ
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users