Hi Shane,

Please make sure you create a new transaction using t_newtran() if t_check_trans() fails. Dialog will not be tracked if there is no transaction.

Cheers
Jason

On Sun, Feb 8, 2015 at 11:42 PM, Shane Harrison <Shane.Harrison@imgtec.com> wrote:

Hi Jason,

 

Appreciate the reply.  Below is my log file for processing initial INVITE (I will send the config file privately so you can match up line numbers).  Note that as you may have noticed from a previous posting, I have modified ims_charging module to use standard usrloc module.  I know this would normally mean people’s interest in helping tends to wane but the changes weren’t major and the area of checking the dialog exists in the Ro_CCR() is independent of the usrloc changes which only kick in later in the process.  So hoping you are willing to give it a quick look even under these circumstances.  Currently I can’t see how it works for you guys unless dialog_ng creates an initial dialog before the t_relay() call when the flag is set – which would be different behaviour to standard dialog module.

 

Cheers

Shane

 

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=572 a=26 n=xlog

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: <script>: received message INVITE call-id ccd6117c-4e@192.168.148.30 received from 172.16.0.82

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=579 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=574 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=579 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1012 a=55 n=force_rport

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1024 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1013 a=25 n=nat_uac_test

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1020 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1014 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1019 a=26 n=xlog

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[NATDETECT] c=[//etc/kamailio/kamailio.cfg] l=1024 a=2 n=return

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=586 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=582 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=583 a=39 n=setflag

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=586 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[WITHINDLG] c=[//etc/kamailio/kamailio.cfg] l=849 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[WITHINDLG] c=[//etc/kamailio/kamailio.cfg] l=792 a=24 n=has_totag

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=598 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=591 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=598 a=24 n=t_check_trans

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=610 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=601 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=616 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=616 a=25 n=remove_hf

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=637 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=619 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=623 a=25 n=set_dlg_profile

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=624 a=26 n=xlog

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=626 a=63 n=assign

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=626 a=30 n=Ro_CCR

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: ims_charging [mod.c:381]: w_ro_ccr(): Unable to find dialog and cannot do Ro charging without it

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[07] c=[//etc/kamailio/kamailio.cfg] l=633 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=628 a=26 n=xlog

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: <script>: CCR Request failure

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=633 a=39 n=setflag

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=637 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[SIPOUT] c=[//etc/kamailio/kamailio.cfg] l=1074 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=640 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[REGISTRAR] c=[//etc/kamailio/kamailio.cfg] l=876 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[REGISTRAR] c=[//etc/kamailio/kamailio.cfg] l=853 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=650 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=650 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[PSTN] c=[//etc/kamailio/kamailio.cfg] l=1090 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[PSTN] c=[//etc/kamailio/kamailio.cfg] l=1081 a=25 n=xlog

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: <script>: SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[PSTN] c=[//etc/kamailio/kamailio.cfg] l=1082 a=2 n=return

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[-2] c=[//etc/kamailio/kamailio.cfg] l=653 a=5 n=route

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=882 a=63 n=assign

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=933 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=883 a=25 n=lookup

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=933 a=16 n=if

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=931 a=25 n=is_method

Feb  8 21:29:22 hh-rcs-sipproxy3 /usr/sbin/kamailio[11965]: ERROR: *** cfgtrace:request_route=[LOCATION] c=[//etc/kamailio/kamailio.cfg] l=932 a=24 n=record_route

Feb  8 21:29:22 hh-rcs-sipproxy3 rsyslogd-2177: imuxsock begins to drop messages from pid 11965 due to rate-limiting

 

From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Jason Penton
Sent: Friday, 6 February 2015 7:50 a.m.


To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Using dialog_ng

 

Shane,

 

Just looking at your config I see you have already set the flag. Can you perhaps send me a log file and I will take a look for you. This is exactly how we, and others (ng voice) use it in our IMS setups so it should work....

 

Cheers

Jason

 

On Thu, Feb 5, 2015 at 8:48 PM, Jason Penton <jason.penton@smilecoms.com> wrote:

Hi Shane,

 

dialog_ng started as a prototype by us quite a while ago to form the basis of dialogs in our IMS implementation using Kamailio. We took quite a lot from the existing dialog module at the time and then built the additional functionality on top. There were some things (like dlg_manage) that we did not move across.... and this is bad.... so I apologise.

 

Right now to get a dialog recorded you need to define a flag in the modparam:

modparam("dialog_ng", "dlg_flag", 10)

 

And then when you want to track a dlg do something like:

 

if (is_method("INVITE")) {

   setflag(10);

   ...

}

 

We have had a lot of other work to focus on and haven't spent too much time on dialog_ng but we will certainly put some effort into making it easier to use and more complete. 

 

Cheers

Jason

 

On Thu, Feb 5, 2015 at 8:03 PM, Shane Harrison <Shane.Harrison@imgtec.com> wrote:


Thanks Daniel - that clarity helps.  Apologies if I should have been able to glean that from the docs - I just didn't see it in my reading.  FYI, dialog-ng has deprecated the dlg_mange() function.

Can anybody who has used or involved in writing the dialog-ng module shed some light on what the new mechanism is for creating an early dialog structure?

Cheers and thanks
Shane

________________________________________
From: sr-users [sr-users-bounces@lists.sip-router.org] on behalf of Daniel-Constantin Mierla [miconda@gmail.com]
Sent: 06 February 2015 00:02
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Using dialog_ng


Hello,

I haven't used the dialog_ng module, but (as expected based on the
dialog module) if you only set the FLT_DIALOG flag, then the dialog is
created when calling t_relay(). The dialog module has dlg_manage()
function which creates the dialog immediately, maybe that's in dialog_ng
as well.

Cheers,
Daniel

On 04/02/15 05:28, Shane Harrison wrote:
> Hi all,
>
> I think the lack of response to my previous thread is probably because it was too complicated.  I have now narrowed my problem down after further archive readings .
>
> I am trying to use the dialog_ng module along with the ims_charging_module.  Upon reception of an INVITE, a call to the Ro_CCR() from the request_route script is made.  That function does a check that the dialog record exists (binds to dialog module and does a "get_dlg(msg)" call) - this fails i.e. dialog is not found.
>
> Running kamailio 4.2.2 and relevant sections of kamailio.cfg are:
> modparam("dialog_ng", "dlg_flag", FLT_DIALOG)
> modparam("dialog_ng", "timeout_avp", "$avp(DLG_TIMEOUT_AVP)")
> modparam("dialog_ng", "detect_spirals", 1)
> modparam("dialog_ng", "profiles_no_value", "orig ; term")
>
> request_route {
>         # NAT detection
>         route(NATDETECT);
>
>         # Set DLG flag to track dialogs using dialog2
>         if (!is_method("REGISTER|SUBSCRIBE"))
>                 setflag(FLT_DIALOG);
>
>         # 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();
>
>         if (is_method("INVITE"))
>         {
>                 set_dlg_profile("orig");
>                Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "", "30","CCR_location");
>        }
>
>
> So my question is, "should the above logic create a dialog record on the initial INVITE?" and if yes then "what possible reasons might there be for the Ro_CCR() function not be able to detect it exists?"
>
> Cheers
> Shane Harrison
>
>
>
>
> _______________________________________________
> 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

--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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

_______________________________________________
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



 

--

 

Jason Penton

Senior Manager: Applications and Services

Smile Communications Pty (Ltd)

Mobile:

+27 (0) 83 283 7000

Skype:

jason.barry.penton

jason.penton@smilecoms.com

www.smilecoms.com
Image removed by sender.

 



 

--

 

Jason Penton

Senior Manager: Applications and Services

Smile Communications Pty (Ltd)

Mobile:

+27 (0) 83 283 7000

Skype:

jason.barry.penton

jason.penton@smilecoms.com

www.smilecoms.com
Image removed by sender.

 

 

This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/

_______________________________________________
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




--

Jason Penton
Senior Manager: Applications and Services
Smile Communications Pty (Ltd)
Mobile:+27 (0) 83 283 7000
Skype:jason.barry.penton
jason.penton@smilecoms.com
www.smilecoms.com



This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/