Hello All!
05.03.08, tatarskiy@severen.nettatarskiy@severen.net написал(а):
Нello ! I need of help (it is important for me)
Canaanite !
Я использую SER Sip EXpress Router 0.9.6), пока в режиме теста. Он у меня работает как:
- Location Server (+ Auth);
- Proxy Server;
Используется MySQL.
Вопрос (question) ! Как мне сделать так, чтобы SER ограничивал колличество вызовов по номеру и/или по имени !?
We use self-written module with connection to database to rewrite all incoming call for purposes of call limitations for users.
Just FYI - easy example (w/o many necessary details)
=========================================== static int rewrite_address(struct sip_msg* m, char* foo, char* bar) {
char from[256]; char to[256]; char result[256];
struct action a;
if (parse_headers(m, HDR_TO_F|HDR_FROM_F, 1) != 0){ printf ("destination_rewrite: can't parse headers!\n"); return 0; }
sprintf (from, "%.*s", ((m->from)->body).len, ((m->from)->body).s); sprintf (to, "%.*s", ((m->to)->body).len, ((m->to)->body).s);
get_new_dest_from_db (result, from, to);
a.type = SET_URI_T; a.p1_type = STRING_ST; a.p1.string = result; a.next = NULL;
do_action (&a, m);
return 1; } ===========================================
In case user from overcomes its call limits you need to forward calls somethere to sip:sems#notaccepted_here@youraddress.com where ypou may setup SEMS (for example) which tell user that he runs out of call lines.