-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Folks,
I realised that querys and log entries have been duplicated by SER (0.8.14). When I put log entries, SER duplicate all of them in syslog. Example:
route{ if (!mf_process_maxfwd_header("10")) { ~ sl_send_reply("483","Too Many Hops"); ~ break; ~ }; ~ if ( msg:len > max_len ) { ~ sl_send_reply("513", "Message too big"); ~ break; ~ };
~ record_route(); ~ # loose-route processing ~ if (loose_route()) { ~ t_relay(); ~ break; ~ };
~ if (method=="INVITE") { ~ log (1, "Checking user group...\n"); ~ if (is_user_in("From", "Active")) { ~ log(1, "User OK\n"); ~ } else { ~ log(1, "User not OK\n"); ~ }; ~ }; }
I could see 3 querys in mysql log. 63485 Query select grp from grp where username='1113' AND grp='Active' 63494 Query select grp from grp where username='1113' AND grp='Active' 63508 Query select grp from grp where username='1113' AND grp='Active'
Is that right?
Thanks in advance. Telles
No log or query are duplicated. You can notice that the logs are generated by different process (they have different pid at the beginning). Since your script doesn't forward or reply on the requests, my guess is you are dealing with request retransmissions, and multiple logs are a side-effect of these.
bogdan
Rodrigo P. Telles wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Folks,
I realised that querys and log entries have been duplicated by SER (0.8.14). When I put log entries, SER duplicate all of them in syslog. Example:
route{ if (!mf_process_maxfwd_header("10")) { ~ sl_send_reply("483","Too Many Hops"); ~ break; ~ }; ~ if ( msg:len > max_len ) { ~ sl_send_reply("513", "Message too big"); ~ break; ~ };
~ record_route(); ~ # loose-route processing ~ if (loose_route()) { ~ t_relay(); ~ break; ~ };
~ if (method=="INVITE") { ~ log (1, "Checking user group...\n"); ~ if (is_user_in("From", "Active")) { ~ log(1, "User OK\n"); ~ } else { ~ log(1, "User not OK\n"); ~ }; ~ }; }
I could see 3 querys in mysql log. 63485 Query select grp from grp where username='1113' AND grp='Active' 63494 Query select grp from grp where username='1113' AND grp='Active' 63508 Query select grp from grp where username='1113' AND grp='Active'
Is that right?
Thanks in advance. Telles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQFBZFm+iLK8unYgEMQRAtPfAJ9VW+/CzZNllXg2vMLy0ODgLFz9iQCfd9Kb hQbM5Vck15Gq37hfFZIjW3E= =EeMp -----END PGP SIGNATURE-----
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Bogdan,
Bogdan-Andrei IANCU wrote: | | No log or query are duplicated. You can notice that the logs are | generated by different process (they have different pid at the beginning). | Since your script doesn't forward or reply on the requests, my guess is | you are dealing with request retransmissions, and multiple logs are a | side-effect of these.
It was my first guess (about retransmissions). I tried t_newtran(), but SER said:
WARNING: script writer didn't release transaction
I used this peace of code: if (method=="INVITE") { if (t_newtran()) { ~ log (1, "Checking user group...\n"); ~ if (is_user_in("From", "Active")) { ~ log(1, "User OK\n"); ~ } else { ~ log(1, "User not OK\n"); ~ }; }; };
Does anyone have any idea? Thanks in advance.
Telles
| | bogdan | | | Rodrigo P. Telles wrote: | | Hi Folks, | | I realised that querys and log entries have been duplicated by | SER (0.8.14). | When I put log entries, SER duplicate all of them in syslog. | Example: | | route{ | if (!mf_process_maxfwd_header("10")) { | ~ sl_send_reply("483","Too Many Hops"); | ~ break; | ~ }; | ~ if ( msg:len > max_len ) { | ~ sl_send_reply("513", "Message too big"); | ~ break; | ~ }; | | ~ record_route(); | ~ # loose-route processing | ~ if (loose_route()) { | ~ t_relay(); | ~ break; | ~ }; | | ~ if (method=="INVITE") { | ~ log (1, "Checking user group...\n"); | ~ if (is_user_in("From", "Active")) { | ~ log(1, "User OK\n"); | ~ } else { | ~ log(1, "User not OK\n"); | ~ }; | ~ }; | } | | I could see 3 querys in mysql log. | 63485 Query select grp from grp where username='1113' AND | grp='Active' | 63494 Query select grp from grp where username='1113' AND | grp='Active' | 63508 Query select grp from grp where username='1113' AND | grp='Active' | | Is that right? | | Thanks in advance. | Telles |> _______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
As I said, the problem is your script doesn't finish the request processing neither by sending a reply, neither by forwarding it.
Try to add at the end of your original script either: t_reply("400","Hello world"); or t_relay();
bogdan
Rodrigo P. Telles wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Bogdan,
Bogdan-Andrei IANCU wrote: | | No log or query are duplicated. You can notice that the logs are | generated by different process (they have different pid at the beginning). | Since your script doesn't forward or reply on the requests, my guess is | you are dealing with request retransmissions, and multiple logs are a | side-effect of these.
It was my first guess (about retransmissions).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Bogdan,
Bogdan-Andrei IANCU wrote: | As I said, the problem is your script doesn't finish the request | processing neither by sending a reply, neither by forwarding it. | | Try to add at the end of your original script either: | t_reply("400","Hello world"); | or | t_relay(); |
I understood now, thanks for your explanation!
| bogdan
Telles
| | | Rodrigo P. Telles wrote: | |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> Hi Bogdan, |> |> Bogdan-Andrei IANCU wrote: |> | |> | No log or query are duplicated. You can notice that the logs are |> | generated by different process (they have different pid at the |> beginning). |> | Since your script doesn't forward or reply on the requests, my guess is |> | you are dealing with request retransmissions, and multiple logs are a |> | side-effect of these. |> |> It was my first guess (about retransmissions). | | | | |