[sr-dev] dialog: reason behind not storing early state dialogs in db

Ovidiu Sas osas at voipembedded.com
Sat Jun 13 21:04:26 CEST 2020


One observation here: early dialogs are bound to the initial INVITE
transaction. For this reason, early dialogs should not be restored
from db because the transaction is no longer present (during failover
or restart).

Thanks,
Ovidiu

On Fri, Jun 12, 2020 at 3:35 PM Henning Westerholt <hw at skalatan.de> wrote:
>
> Hi Victor,
>
> thanks for the feedback, I will also do some more tests.
>
> Cheers,
>
> Henning
>
> -----Original Message-----
> From: sr-dev <sr-dev-bounces at lists.kamailio.org> On Behalf Of Victor Seva
> Sent: Friday, June 12, 2020 2:34 PM
> To: Kamailio (SER) - Development Mailing List <sr-dev at lists.kamailio.org>
> Subject: Re: [sr-dev] dialog: reason behind not storing early state dialogs in db
>
> Hi Henning,
>
> On 6/12/20 10:31 AM, Henning Westerholt wrote:
> > added with 37d83a5838a50350. Feedback and additional testing are of
> > course welcome.
>
> Applied 37d83a5838a50350 but I don't see any insert to the db until dialog is confirmed.
>
> ``modparam("dialog","db_mode", 1)`` is in the config
>
> ```
> Jun 12 13:47:01 sp1 proxy[31630]: NOTICE: DEFAULT_ROUTE <script>: New request on proxy - M=INVITE R=«sip:43993002 at 192.168.1.102» F=«sip:43993003 at 192.168.1.102» T=«sip:43993002 at 192.168.1.102» IP=«192.168.1.123»:«5068» («127.0.0.1»:«5060») ID=«ephgtzmqykl gppz at debrock.torreviejawireless.org» UA='Twinkle/1.10.1' DESTIP=«127.0.0.1»:«5062» Jun 12 13:47:01 sp1 proxy[31630]: NOTICE: DEFAULT_ROUTE <script>: Sending reply S=100 Trying M=INVITE fs='«127.0.0.1»:«5062»' du='«127.0.0.1»:«5060»' - R=«sip:43993002 at 192.168.1.102» ID=«ephgtzmqyklgppz at debrock.torreviejawireless.org» UA='Twinkle/1.10.1 '
> ...
> Jun 12 13:47:01 sp1 proxy[31630]: DEBUG: ROUTE_DLG_MANAGE dialog [dlg_hash.c:480]: build_new_dlg(): new dialog on hash 380 ...
> Jun 12 13:47:01 sp1 proxy[31630]: DEBUG: ROUTE_DLG_MANAGE dialog [dlg_db_handler.c:835]: update_dialog_dbinfo_unsafe(): updated 4 vars for dlg [380:4617] ...
> Jun 12 13:47:01 sp1 proxy[31630]: DEBUG: ROUTE_DLG_MANAGE dialog [dlg_profile.c:536]: set_current_dialog(): setting current dialog [380:4617] ...
> Jun 12 13:47:01 sp1 proxy[31630]: NOTICE: DEFAULT_ROUTE <script>: Sending reply S=100 Trying M=INVITE fs='«127.0.0.1»:«5062»' du='«127.0.0.1»:«5060»' - R=«sip:43993002 at 192.168.1.102» ID=«ephgtzmqyklgppz at debrock.torreviejawireless.org» UA='Twinkle/1.10.1'
> ...
> Jun 12 13:47:01 sp1 proxy[31634]: NOTICE: REPLY_ROUTE_NAT <script>: NAT-Reply - S=180 - Ringing M=INVITE IP=«192.168.1.123»:«5068» («127.0.0.1»:«5080») ID=«ephgtzmqyklgppz at debrock.torreviejawireless.org» UA='<null>' DESTIP=«127.0.0.1»:«5062» ...
> Jun 12 13:47:01 sp1 proxy[31634]: DEBUG: REPLY_ROUTE_NAT tmx [t_var.c:539]: pv_get_tm_reply_code(): reply code is <180> ...
> Jun 12 13:47:01 sp1 proxy[31634]: DEBUG: REPLY_ROUTE_NAT dialog [dlg_hash.c:789]: dlg_lookup_mode(): dialog id=4617 found on entry 380 ...
> Jun 12 13:47:01 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_hash.c:1264]: next_state_dlg(): dialog 0x7fd87d250e88 changed from state 1 to state 2, due event 2 (ref 2) Jun 12 13:47:01 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_cb.c:271]: run_dlg_callbacks(): dialog=0x7fd87d250e88, type=256 ```
>
> Nothing gets written in the dialog table until
>
> ```
> Jun 12 13:47:25 sp1 proxy[31634]: NOTICE: REPLY_ROUTE_NAT <script>: NAT-Reply - S=200 - Answering M=INVITE IP=«192.168.1.123»:«5068» («127.0.0.1»:«5080») ID=«ephgtzmqyklgppz at debrock.torreviejawireless.org» UA='<null>' DESTIP=«127.0.0.1»:«5062» ...
> Jun 12 13:47:25 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_hash.c:1264]: next_state_dlg(): dialog 0x7fd87d250e88 changed from state 2 to state 3, due event 3 (ref 2) ...
> Jun 12 13:47:25 sp1 proxy[31634]: NOTICE: dialog:start <script>: [dialog:start] lua_dlg_callid:[«ephgtzmqyklgppz at debrock.torreviejawireless.org»]  - R=«<null>» ID=«ephgtzmqyklgppz at debrock.torreviejawireless.org» UA='<null>'
> ...
> Jun 12 13:47:25 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_handlers.c:512]: dlg_onreply(): dialog 0x7fd87d250e88 confirmed (ACK pending) Jun 12 13:47:25 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_handlers.c:259]: populate_leg_info(): leg(1) route_set [], contact [sip:127.0.0.1:5080;transport=udp], cseq [] and bind_addr [udp:127.0.0.1:5062] Jun 12 13:47:25 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_db_handler.c:835]: update_dialog_dbinfo_unsafe(): updated 19 vars for dlg [380:4617] Jun 12 13:47:25 sp1 proxy[31634]: DEBUG: <null> dialog [dlg_db_handler.c:874]: update_dialog_dbinfo_unsafe(): sock_info is udp:127.0.0.1:5062 ```
>
>
> Cheers,
> Victor
>
> _______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the sr-dev mailing list