[SR-Users] Get duration in cnxcc:call-shutdown event

2013-07-20 Thread Jayesh Nambiar
Hello,
Is there a straight forward way of getting the duration of the call in
cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
does not exist. I dont get the value of $DLG_lifetime even in dialog:end
event when the call ends through cnxcc module. Even the cdr flag of acc
module doesn't get the duration and it logs, invalid values !!
Currently, I am storing the timestamp in htable when the call is answered
and then subtract it from the current timestamp in the cnxcc:shutdown event
route to get the duration. Something like this:

onreply_route[MANAGE_REPLY] {
xdbg(incoming reply\n);

if(status==200) {
$sht(ts=$ci) = $Ts;
}
}

event_route[cnxcc:call-shutdown] {

$var(duration) = $TS-$sht(ts=$ci);
sht_rm_name_re(ts=$ci);

xlog(L_INFO, Duration of call was $var(duration));
}


Any more correct way of doing this would be very helpful.

Thanks,

--- Jayesh
___
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


Re: [SR-Users] Get duration in cnxcc:call-shutdown event

2013-07-20 Thread Carlos Ruiz Díaz
The lack of values in some of the standard pseudo variables is a limitation
of the dialog module which does not provide  the necessary information in
the event route block in cases when the call is forced to end.

You can calculate the duration using:

* $var(duration)  = $TS - $dlg(start_ts);*
*
*
Regards,
Carlos





On Sat, Jul 20, 2013 at 2:07 AM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hello,
 Is there a straight forward way of getting the duration of the call in
 cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
 does not exist. I dont get the value of $DLG_lifetime even in dialog:end
 event when the call ends through cnxcc module. Even the cdr flag of acc
 module doesn't get the duration and it logs, invalid values !!
 Currently, I am storing the timestamp in htable when the call is answered
 and then subtract it from the current timestamp in the cnxcc:shutdown event
 route to get the duration. Something like this:

 onreply_route[MANAGE_REPLY] {
 xdbg(incoming reply\n);

 if(status==200) {
 $sht(ts=$ci) = $Ts;
 }
 }

 event_route[cnxcc:call-shutdown] {

 $var(duration) = $TS-$sht(ts=$ci);
 sht_rm_name_re(ts=$ci);

 xlog(L_INFO, Duration of call was $var(duration));
 }


 Any more correct way of doing this would be very helpful.

 Thanks,

 --- Jayesh

 ___
 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




-- 
Carlos
http://caruizdiaz.com
+595981146623
___
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


[SR-Users] Empty location table

2013-07-20 Thread Alexey Rybalko
Hello!

/kamilio 4.1.0/

Can anyone suggest why location table is empty despite that user
registration works?
save(location) return positive value. kamctl shows online users but if I
look into kamailio.location it's empty anytime.

# - registrar params -
modparam(registrar, method_filtering, 0)
modparam(registrar, append_branches, 1)
modparam(registrar, max_contacts, 10)
modparam(registrar, max_expires, 3600)
...

Other strange the strange thing is that $rU is null.



regards,
Alexey
___
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


Re: [SR-Users] Get duration in cnxcc:call-shutdown event

2013-07-20 Thread Jayesh Nambiar
Thanks for the quick reply Carlos. Really appreciate it.

Thanks,

--- Jayesh


On Sat, Jul 20, 2013 at 9:13 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com
 wrote:

 The lack of values in some of the standard pseudo variables is a
 limitation of the dialog module which does not provide  the necessary
 information in the event route block in cases when the call is forced to
 end.

 You can calculate the duration using:

 * $var(duration)  = $TS - $dlg(start_ts);*
 *
 *
 Regards,
 Carlos





 On Sat, Jul 20, 2013 at 2:07 AM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hello,
 Is there a straight forward way of getting the duration of the call in
 cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
 does not exist. I dont get the value of $DLG_lifetime even in dialog:end
 event when the call ends through cnxcc module. Even the cdr flag of acc
 module doesn't get the duration and it logs, invalid values !!
 Currently, I am storing the timestamp in htable when the call is answered
 and then subtract it from the current timestamp in the cnxcc:shutdown event
 route to get the duration. Something like this:

 onreply_route[MANAGE_REPLY] {
 xdbg(incoming reply\n);

 if(status==200) {
 $sht(ts=$ci) = $Ts;
 }
 }

 event_route[cnxcc:call-shutdown] {

 $var(duration) = $TS-$sht(ts=$ci);
 sht_rm_name_re(ts=$ci);

 xlog(L_INFO, Duration of call was $var(duration));
 }


 Any more correct way of doing this would be very helpful.

 Thanks,

 --- Jayesh

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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


Re: [SR-Users] Empty location table

2013-07-20 Thread Alexey Rybalko
Sorry. My bad :/
There was a mistake in define WITH_US*E*RLOC. Just have found it hours
later.

cheers
/A


2013/7/20 Alexey Rybalko alexey.ryba...@gmail.com


 Hello!

 /kamilio 4.1.0/

 Can anyone suggest why location table is empty despite that user
 registration works?
 save(location) return positive value. kamctl shows online users but if I
 look into kamailio.location it's empty anytime.

 # - registrar params -
 modparam(registrar, method_filtering, 0)
 modparam(registrar, append_branches, 1)
 modparam(registrar, max_contacts, 10)
 modparam(registrar, max_expires, 3600)
 ...

 Other strange the strange thing is that $rU is null.



 regards,
 Alexey

___
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


[SR-Users] UAC module fails to refresh registrations

2013-07-20 Thread Isaac McDonald

Hello,

I'm using the UAC module to register to remote sip proxies. When
starting Kamailio, the UAC module successfully registers with the remote
sip proxies as expected. Upon expiration of the registration (refresh
interval) the UAC module fails to re-register.

I've done some sip traces and found the following:

During Kamailio startup the registration process is typical of what 
you'd expect:


1. UAC module sends registration request without authentication 
information to remote registrar


2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized

3. UAC module sends another registration request with credentials and 
registration is complete.


After the refresh interval expires, the UAC module performs step 1 from 
above, and the remote sip proxy sends back a 401 (step 2). At this 
point, the UAC module doesn't resend the registration request with 
credentials thus failing to register.


I've got the following modparam's set on the UAC module.

modparam(uac, reg_contact_addr, 10.0.0.31:5060)
modparam(uac, reg_timer_interval, 60)
modparam(uac, reg_retry_interval, 300)


Anyone have any idea's as to why registrations are failing after the 
refresh interval?





smime.p7s
Description: S/MIME cryptographic signature


smime.p7s
Description: S/MIME Cryptographic Signature
___
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