Sorry all , It is working now , Do accounting at the initial INVITE was the source of all pain
Best regards , Ahmed Shabana +20 1003325373 -----Original Message----- From: Users [mailto:[email protected]] On Behalf Of [email protected] Sent: Friday, December 15, 2017 9:52 PM To: [email protected] Subject: Users Digest, Vol 113, Issue 28 Send Users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=01%7C01%7Ca.shabana%40cequens.com%7C242e7aef642e435fb49808d543f55c4b%7Cf9a01c91467346cf9e27d48185bb3644%7C1&sdata=I8FFatZMRTyyAJgUGGVAQukxBhOkOg220cIWgITs5po%3D&reserved=0 or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: 1. Need opensips only send accounting requests at BYE to aaa radius (Ahmed Shabana) ---------------------------------------------------------------------- Message: 1 Date: Fri, 15 Dec 2017 19:52:04 +0000 From: Ahmed Shabana <[email protected]> To: "[email protected]" <[email protected]> Subject: [OpenSIPS-Users] Need opensips only send accounting requests at BYE to aaa radius Message-ID: <he1pr07mb1180356b23d3b7357f4c4650f6...@he1pr07mb1180.eurprd07.prod.outlook.com> Content-Type: text/plain; charset="utf-8" Dears , I am facing a strange issue and spending so many hours on it . We have two environment Development and staging , opensips use Radius as accounting backend , opensips.cfg generated from template that should only apply each environment IPs and VAR Vimdiff show that files identical except in params of each environment . We use do_accounting("aaa", "cdr") at initial INVITE as below @ Initial INVITE 13 $acc_extra(extra_au) = $au ; 12 $acc_extra(extra_ru) = $ru; 11 $acc_extra(extra_rpid) = $avp(rpid); 10 $acc_extra(extra_si) = $si; 9 $acc_extra(extra_username) = $au; 8 $acc_extra(extra_ar) = $ar; 7 $acc_extra(extra_rd) = $rd; 6 $acc_extra(extra_fU) = $fU; 5 $acc_extra(extra_rU) = $rU+"@"+$rd; 1 xlog("---- current Dialog.Status is :$DLG_status " ) ; # the output of this log $DLG_Status = 1 as expected 2 do_accounting("aaa","cdr"); @ is_method("BYE") do_accounting("aaa", "cdr|failed|missed"); The problem now is : When apply radsniff at Development , it behaves exactly as we plan Send Accounting request only at Acct-Status-Type Stop with all params ----------------------------------------------------------- Access-Request Id 230 192.168.13.1:35549 -> 192.168.13.11:1812 +0.000 User-Name = "[email protected]" Digest-Attributes = 0x0a0f72657374636f6d6d2e74657374 Digest-Attributes = 0x010f3139322e3136382e312e313030 Digest-Attributes = 0x0232356133343233643730303030303038383464323865663661373330393464386362656566303664333862373964326537 Digest-Attributes = 0x04217369703a2b393636353633373032323638403139322e3136382e312e313030 Digest-Attributes = 0x0308494e56495445 Digest-Response = "4bfc6f0ecee7b25d81cf4e68f52243db" Service-Type = IAPP-Register Sip-Uri-User = "1234" Acct-Session-Id = "[email protected]" NAS-Port = 5060 NAS-IP-Address = 192.168.13.1 Access-Accept Id 230 192.168.13.11:1812 -> 192.168.13.1:35549 +0.001 Accounting-Request Id 231 192.168.13.1:32887 -> 192.168.13.11:1813 +0.048 Acct-Status-Type = Stop Service-Type = IAPP-Register Sip-Response-Code = 200 Sip-Method = Invite Event-Timestamp = "Dec 15 2017 19:34:17 UTC" Sip-From-Tag = "81019376_9b1d9904_57a5b08a_ef03d73c" Sip-To-Tag = "as2ae5edf5" Acct-Session-Id = "[email protected]" Sip-Call-Duration = 0 Sip-Call-MSDuration = 367 Sip-Call-Setuptime = Route-IP-No Sip-Translated-Request-URI = "sip:[email protected]:5060" Sip-Src-IP = "\002" User-Name = "rxt.test" SIP-AVP = "192.168.13.12" Calling-Station-Id = "1234" Called-Station-Id = "[email protected]" Sip-Group = "ACae6e420f425248d6a26948c17a9e2acf" NAS-Port = 5060 Acct-Delay-Time = 0 NAS-IP-Address = 192.168.13.1 At Staging environment , It Send Accounting-Request for both Acct-Status-Type Start and Stop !!! Access-Request Id 199 192.168.104.109:43417 -> 192.168.105.241:1812 +1901.364 User-Name = "[email protected]" Digest-Attributes = 0x0a0f72657374636f6d6d2e74657374 Digest-Attributes = 0x01113139322e3136382e3130342e313039 Digest-Attributes = 0x0232356133343161366630303030303030313563633834333862343365306633386439303764313230303564373230633334 Digest-Attributes = 0x04237369703a2b323031313135353433363236403139322e3136382e3130342e313039 Digest-Attributes = 0x0308494e56495445 Digest-Response = "3d8cccd86495bddedbdae41999820898" Service-Type = Sip-Session Sip-Uri-User = "2979666" Acct-Session-Id = "[email protected]" NAS-Port = 5060 NAS-IP-Address = 192.168.104.109 Access-Accept Id 199 192.168.105.241:1812 -> 192.168.104.109:43417 +1901.371 Accounting-Request Id 200 192.168.104.109:41734 -> 192.168.105.241:1813 +1911.726 Acct-Status-Type = Start Service-Type = Sip-Session Sip-Response-Code = 200 Sip-Method = INVITE Event-Timestamp = "Dec 15 2017 18:54:19 UTC" Sip-From-Tag = "74898207_03603651_57a5b08a_059b89a0" Sip-To-Tag = "23712318_6772d868_bd252ab2-7f19-4b4b-9d64-8543b3e60525" Acct-Session-Id = "[email protected]" Digest-Attributes = 0x0a0f72657374636f6d6d2e74657374 Sip-Translated-Request-URI = "sip:[email protected]" Sip-Src-IP = "\317h\250\300[\0324Z" User-Name = "rxt.test" Attr-111 = 0x3139322e3136382e3130342e313039 SIP-AVP = "ceq.pstn.ie1.twilio.com" Calling-Station-Id = "2979666" Called-Station-Id = "[email protected]" Sip-Group = "ACae6e420f425248d6a26948c17a9e2acf" NAS-Port = 5060 Acct-Delay-Time = 0 NAS-IP-Address = 192.168.104.109 Accounting-Response Id 200 192.168.105.241:1813 -> 192.168.104.109:41734 +1911.727 Access-Request Id 201 192.168.104.109:34342 -> 192.168.105.241:1812 +2545.558 User-Name = "[email protected]" Digest-Attributes = 0x0a0f72657374636f6d6d2e74657374 Digest-Attributes = 0x01113139322e3136382e3130342e313039 Digest-Attributes = 0x0232356133343163663330303030303030306534383762636339316161333161616532643938666336623535313831346235 Digest-Attributes = 0x04237369703a2b323031313135353433363236403139322e3136382e3130342e313039 Digest-Attributes = 0x0308494e56495445 Digest-Response = "aa768ad30a7ec76ba70c2a1507920ff6" Service-Type = Sip-Session Sip-Uri-User = "2979666" Acct-Session-Id = "[email protected]" NAS-Port = 5060 NAS-IP-Address = 192.168.104.109 Access-Accept Id 201 192.168.105.241:1812 -> 192.168.104.109:34342 +2545.560 Which make the custom SQL statement we build at /etc/freeradius/sql/mysql/dialup.conf not function , which only handle accounting_stop_query Your support is so much appreciated Best regards , Shabana -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fpipermail%2Fusers%2Fattachments%2F20171215%2Ff75775d3%2Fattachment.html&data=01%7C01%7Ca.shabana%40cequens.com%7C242e7aef642e435fb49808d543f55c4b%7Cf9a01c91467346cf9e27d48185bb3644%7C1&sdata=JQ5guEnjIi7wrBSsO7cTuPXgtxh0RmqBwkMMlHAI9h0%3D&reserved=0> ------------------------------ Subject: Digest Footer _______________________________________________ Users mailing list [email protected] https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=01%7C01%7Ca.shabana%40cequens.com%7C242e7aef642e435fb49808d543f55c4b%7Cf9a01c91467346cf9e27d48185bb3644%7C1&sdata=I8FFatZMRTyyAJgUGGVAQukxBhOkOg220cIWgITs5po%3D&reserved=0 ------------------------------ End of Users Digest, Vol 113, Issue 28 ************************************** _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
