Hello,
1. SER + Asterisk + Billings system that also do routing.
2. I have two dual Xeon 3.1 DELL machine with 4G ram
3. secret :) But it depends on customers.. if you have customers that reuire RTP proxy with G711 codec - u can handle may be 100 of them on the box (simultaneous calls). If it non RTP proxy customer - thousands. I am doing my best to make everybody use STUN.
Accounting on termination ciscos but now I am moving to B2BUA there is few issues with old ciscos (5300) that not allowed me to send CC-Diversion field to radius server.
SER use mssql for authorization and routing (routing from exec_dset.. I change it too often to have module).
So far it working good. SER never died (for half year) by itself. Asterisk - may be once per month. Problems usually with bad UA and stupid users :)
> -----Original Message-----
> From: Nahuel Alejandro Ramos [mailto:nahuelon@gmail.com]
> Sent: Thursday, October 14, 2004 11:57 AM
> To: Vitaly Nikolaev
> Cc: serusers(a)lists.iptel.org
> Subject: Re: [Serusers] Multiple instance of SER
>
> Vitaly,
> I have just visiting your site (www.voipsonic.com). Did you offer
> all that stufs with SER? Could you tell me what are the CPU and MEM
> usage of SER? How many minutes a month could manage with a single box
> doing AAA?
> And the last one... How do you make a Prepaid Billing? Do you use B2BUA?
> Thank your very very much!!!
>
> Nahuel Ramos.
>
>
>
> On Thu, 14 Oct 2004 12:47:09 -0300, Nahuel Alejandro Ramos
> <nahuelon(a)gmail.com> wrote:
> > Vitaly,
> > It´s woking like a want. Do you know what happend is I share the
> > mySQL table with the two instances?
> > Thanks a lot.
> >
> > Nahuel.
> >
> > On Thu, 14 Oct 2004 12:15:19 -0300, Nahuel Alejandro Ramos
> >
> >
> > <nahuelon(a)gmail.com> wrote:
> > > Thank you very much Vitaly, I will try it and then I post the result.
> > >
> > > On Thu, 14 Oct 2004 11:11:24 -0400, Vitaly Nikolaev
> > >
> > >
> > > <vitaly(a)voipsonic.com> wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > U need to make sure you have different FIFO file names in each
> config (fifo="/tmp/ser_fifo")
> > > >
> > > > Different databases for all modules that require database.
> > > >
> > > > Then u just execute ser like:
> > > >
> > > > /usr/local/sbin/ser -f /etc/ser/ser1.cfg -P /var/run/ser1.pid
> > > > /usr/local/sbin/ser -f /etc/ser/ser2.cfg -P /var/run/ser2.pid
> > > > ...
> > > >
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: serusers-bounces(a)lists.iptel.org [mailto:serusers-
> bounces(a)iptel.org] On
> > > > > Behalf Of Nahuel Alejandro Ramos
> > > > > Sent: Thursday, October 14, 2004 10:58 AM
> > > > > To: Jesus Rodriguez
> > > > > Cc: serusers(a)lists.iptel.org
> > > > > Subject: Re: [Serusers] Multiple instance of SER
> > > > >
> > > > > Thanks for the quickly answer.
> > > > > I´m using RH 9.0. And SER 0.8.14. How could be the process to run
> two
> > > > > or more SERs?. Where do I put the configuration files
> (/etc/ser1.cfg
> > > > > and /etc/ser2.cfg) ?
> > > > > How do I run it?
> > > > > Thank you very much again...
> > > > >
> > > > > Nahuel Ramos.
> > > > >
> > > > >
> > > > > On Thu, 14 Oct 2004 16:50:18 +0200 (CEST), Jesus Rodriguez
> > > > > <jesusr(a)voztele.com> wrote:
> > > > > > On Thu, 14 Oct 2004, Nahuel Alejandro Ramos wrote:
> > > > > >
> > > > > > > Hi, I would like to know how can I run multiple instances of
> SER on
> > > > > > > the same linux box (diferent port and domain).
> > > > > > > What I want to do is to have an instance to manage the
> voicemail and
> > > > > > > other to be the SIP Proxy to the PSTN Gw, doing the AAA.
> > > > > > > Could I have more than two instances? Could I use the same
> mySQL to do
> > > > > the AAA?
> > > > > >
> > > > > > If you want to try with FreeBSD, jail is your solution :) .
> About MySQL,
> > > > > > yes, you can use the same one to keep different AAA; just use
> different
> > > > > > databases.
> > > > > >
> > > > > > Saludos
> > > > > > JesusR.
> > > > > >
> > > > > > -------------------------------
> > > > > > Jesus Rodriguez
> > > > > > VozTelecom Sistemas, S.L.
> > > > > > jesusr(a)voztele.com
> > > > > > http://www.voztele.com
> > > > > > Tel. 902360305
> > > > > > -------------------------------
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Serusers mailing list
> > > > > serusers(a)lists.iptel.org
> > > > > http://lists.iptel.org/mailman/listinfo/serusers
> > > >
> > > >
> > >
> >
Hi All.
I'm using ser-0.8.99-dev12 and really having problems getting usrloc to write
to MySQL.
Here is the usrloc modparams from my ser.cfg
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "timer_interval", 10)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "db_url", "mysql://ser:heslo@localhost/ser")
Below is the debug output from ser from the point the usrloc module is
initialized. It includes a UA registering with my ser proxy. I do not see any
indication here that usrloc has indeed invoked MySQL. Should I?
I'm really struggling to see what depedency is causing usrloc to not write to
the location table in MySQL. Have I missed something obvious?
Regards,
Paul
1(0) DEBUG: init_mod_child (-1): usrloc
1(0) get_connection(): Connection not found in the pool
2(0) INFO: fifo process starting: 19508
2(0) DEBUG: init_mod_child (-2): tm
2(0) DEBUG: callid: '7fbefbeb-0(a)172.16.1.153'
2(0) DEBUG: init_mod_child (-2): usrloc
2(0) get_connection(): Connection not found in the pool
0(19503) DEBUG: init_mod_child (1): tm
0(19503) DEBUG: callid: '7fbefbeb-19503(a)172.16.1.153'
0(19503) DEBUG: init_mod_child (1): usrloc
0(19503) get_connection(): Connection not found in the pool
1(19507) DEBUG: init_mod_child (-1): auth_db
1(19507) get_connection(): Connection found in the pool
2(19508) DEBUG: init_mod_child (-2): auth_db
2(19508) get_connection(): Connection found in the pool
2(19508) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
2(19508) DEBUG: register_fifo_cmd: new command (print) registered
2(19508) DEBUG: register_fifo_cmd: new command (uptime) registered
2(19508) DEBUG: register_fifo_cmd: new command (version) registered
2(19508) DEBUG: register_fifo_cmd: new command (pwd) registered
2(19508) DEBUG: register_fifo_cmd: new command (arg) registered
2(19508) DEBUG: register_fifo_cmd: new command (which) registered
2(19508) DEBUG: register_fifo_cmd: new command (ps) registered
2(19508) DEBUG: register_fifo_cmd: new command (kill) registered
2(19508) find_mod_export: found <db_use_table> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_init> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_close> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_raw_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_free_result> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_insert> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_delete> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) find_mod_export: found <db_update> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
2(19508) get_connection(): Connection found in the pool
2(19508) DEBUG: register_fifo_cmd: new command (DB) registered
0(19503) DEBUG: init_mod_child (1): auth_db
0(19503) get_connection(): Connection found in the pool
0(19493) SIP Request:
0(19493) method: <REGISTER>
0(19493) uri: <sip:172.16.1.153>
0(19493) version: <SIP/2.0>
0(19493) parse_headers: flags=1
0(19493) Found param type 232, <branch> = <z9hG4bKff4cd4ff4ac4a763>; state=16
0(19493) end of header reached, state=5
0(19493) parse_headers: Via found, flags=1
0(19493) parse_headers: this is the first via
0(19493) After parse_msg...
0(19493) preparing to run routing scripts...
0(19493) parse_headers: flags=128
0(19493) end of header reached, state=9
0(19493) DEBUG: get_hdr_field: <To> [36];
uri=[sip:1010@172.16.1.153;user=phone]
0(19493) DEBUG: to body [<sip:1010@172.16.1.153;user=phone>]
0(19493) get_hdr_field: cseq <CSeq>: <100> <REGISTER>
0(19493) DEBUG:maxfwd:is_maxfwd_present: value = 70
0(19493) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
0(19493) parse_headers: flags=256
0(19493) DEBUG: get_hdr_body : content_length=0
0(19493) found end of header
0(19493) find_first_route(): No Route headers found
0(19493) loose_route(): There is no Route HF
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) parse_headers: flags=4096
0(19493) pre_auth(): Credentials with given realm not found
0(19493) build_auth_hf(): 'WWW-Authenticate: Digest realm="172.16.1.153",
nonce="4179de37684a1d7693f0c437a809fe1946afd90d"
'
0(19493) parse_headers: flags=-1
0(19493) check_via_address(172.16.1.34, 172.16.1.34, 0)
0(19493) DEBUG:destroy_avp_list: destroying list (nil)
0(19493) receive_msg: cleaning up
0(19493) SIP Request:
0(19493) method: <REGISTER>
0(19493) uri: <sip:172.16.1.153>
0(19493) version: <SIP/2.0>
0(19493) parse_headers: flags=1
0(19493) Found param type 232, <branch> = <z9hG4bK8e1345c1d3d54874>; state=16
0(19493) end of header reached, state=5
0(19493) parse_headers: Via found, flags=1
0(19493) parse_headers: this is the first via
0(19493) After parse_msg...
0(19493) preparing to run routing scripts...
0(19493) parse_headers: flags=128
0(19493) end of header reached, state=9
0(19493) DEBUG: get_hdr_field: <To> [36];
uri=[sip:1010@172.16.1.153;user=phone]
0(19493) DEBUG: to body [<sip:1010@172.16.1.153;user=phone>]
0(19493) get_hdr_field: cseq <CSeq>: <101> <REGISTER>
0(19493) DEBUG:maxfwd:is_maxfwd_present: value = 70
0(19493) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
0(19493) parse_headers: flags=256
0(19493) DEBUG: get_hdr_body : content_length=0
0(19493) found end of header
0(19493) find_first_route(): No Route headers found
0(19493) loose_route(): There is no Route HF
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) check_nonce(): comparing [4179de37684a1d7693f0c437a809fe1946afd90d]
and [4179de37684a1d7693f0c437a809fe1946afd90d]
0(19493) HA1 string calculated: 9c6b1b6480acbc2f87248ca008fb0dc1
0(19493) check_response(): Our result = 'adf927277baaa915be63eaef73e86cb6'
0(19493) check_response(): Authorization is OK
0(19493) save_rpid(): rpid value is ''
0(19493) parse_headers: flags=-1
0(19493) parse_headers: flags=33554432
0(19493) parse_headers: flags=-1
0(19493) check_via_address(172.16.1.34, 172.16.1.34, 0)
0(19493) DEBUG:destroy_avp_list: destroying list (nil)
0(19493) receive_msg: cleaning up
0(19493) SIP Request:
0(19493) method: <REGISTER>
0(19493) uri: <sip:172.16.1.153>
0(19493) version: <SIP/2.0>
0(19493) parse_headers: flags=1
0(19493) Found param type 232, <branch> = <z9hG4bKab4d5f63f40008ae>; state=16
0(19493) end of header reached, state=5
0(19493) parse_headers: Via found, flags=1
0(19493) parse_headers: this is the first via
0(19493) After parse_msg...
0(19493) preparing to run routing scripts...
0(19493) parse_headers: flags=128
0(19493) end of header reached, state=9
0(19493) DEBUG: get_hdr_field: <To> [36];
uri=[sip:1010@172.16.1.153;user=phone]
0(19493) DEBUG: to body [<sip:1010@172.16.1.153;user=phone>]
0(19493) get_hdr_field: cseq <CSeq>: <102> <REGISTER>
0(19493) DEBUG:maxfwd:is_maxfwd_present: value = 70
0(19493) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
0(19493) parse_headers: flags=256
0(19493) DEBUG: get_hdr_body : content_length=0
0(19493) found end of header
0(19493) find_first_route(): No Route headers found
0(19493) loose_route(): There is no Route HF
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) parse_headers: flags=4096
0(19493) pre_auth(): Credentials with given realm not found
0(19493) build_auth_hf(): 'WWW-Authenticate: Digest realm="172.16.1.153",
nonce="4179de38e9c06f02608126486e382024120644e9"'
0(19493) parse_headers: flags=-1
0(19493) check_via_address(172.16.1.34, 172.16.1.34, 0)
0(19493) DEBUG:destroy_avp_list: destroying list (nil)
0(19493) receive_msg: cleaning up
0(19493) SIP Request:
0(19493) method: <REGISTER>
0(19493) uri: <sip:172.16.1.153>
0(19493) version: <SIP/2.0>
0(19493) parse_headers: flags=1
0(19493) Found param type 232, <branch> = <z9hG4bKe5b2bd5112750414>; state=16
0(19493) end of header reached, state=5
0(19493) parse_headers: Via found, flags=1
0(19493) parse_headers: this is the first via
0(19493) After parse_msg...
0(19493) preparing to run routing scripts...
0(19493) parse_headers: flags=128
0(19493) end of header reached, state=9
0(19493) DEBUG: get_hdr_field: <To> [36];
uri=[sip:1010@172.16.1.153;user=phone]
0(19493) DEBUG: to body [<sip:1010@172.16.1.153;user=phone>]
0(19493) get_hdr_field: cseq <CSeq>: <103> <REGISTER>
0(19493) DEBUG:maxfwd:is_maxfwd_present: value = 70
0(19493) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
0(19493) parse_headers: flags=256
0(19493) DEBUG: get_hdr_body : content_length=0
0(19493) found end of header
0(19493) find_first_route(): No Route headers found
0(19493) loose_route(): There is no Route HF
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) grep_sock_info - checking if host==us: 12==12 && [172.16.1.153] ==
[172.16.1.153]
0(19493) grep_sock_info - checking if port 5060 matches port 5060
0(19493) check_nonce(): comparing [4179de38e9c06f02608126486e382024120644e9]
and [4179de38e9c06f02608126486e382024120644e9]
0(19493) HA1 string calculated: 9c6b1b6480acbc2f87248ca008fb0dc1
0(19493) check_response(): Our result = '210118ea1c3c6ea71518bf310f18ca9a'
0(19493) check_response(): Authorization is OK
0(19493) save_rpid(): rpid value is ''
0(19493) parse_headers: flags=-1
0(19493) parse_headers: flags=33554432
0(19493) build_contact(): Created Contact HF: Contact:
<sip:1010@172.16.1.34;user=phone>;expires=3600
0(19493) parse_headers: flags=-1
0(19493) check_via_address(172.16.1.34, 172.16.1.34, 0)
0(19493) DEBUG:destroy_avp_list: destroying list (nil)
0(19493) receive_msg: cleaning up
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
I'm having this situation while configuring a new SER installation over a Debian Linux:
I have two two grandstream BT-101 as UA configured with the default parameters and
proxy, user, ID and password.
Both phones are behind a LinkSys ADSL router and work fine if I register to iptel.org
When I register to my own server (freephonet.com) only one completes the registration and
serctl moni shows issuing continuous 401 stauts codes.
The ser.cfg in use is the following:
# FREEPHONET SIP SERVER I
# SER Config File
# named gateway.freephonet.com at ip address 69.60.109.205
# running on a Debian Linux server
#
# ------------- version 0.8.14 --------------------------------------------
# ------------- Initial global variables ----------------------------------
/*
debug=3
fork=yes
log_stderror=no
*/
#listen=69.60.109.205
#listen=127.0.0.1
# hostname matching an alias will satisfy the condition uri==myself".
alias=freephonet.com
alias=69.60.109.205
# dns - Uses dns to check if it is necessary to add a "received=" field
# to a via. Default is no.
# rev_dns - Same as dns but use reverse DNS.
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -r)
port=5060
children=4
# check_via - Turn on or off Via host checking when forwarding replies.
# Default is no. arcane. looks for discrepancy between name and
# ip address when forwarding replies.
check_via=no # (cmd. line: -v)
# syn_branch - Shall the server use stateful synonym branches? It is
# faster but not reboot-safe. Default is yes.
syn_branch=no
# memlog - Debugging level for final memory statistics report.
# Default is L_DBG - memory statistics are dumped
# only if debug is set high.
memlog=3
# sip_warning - Should replies include extensive warnings? By default
# yes, it is good for trouble-shooting.
sip_warning=yes
# fifo - FIFO special file pathname
fifo="/tmp/ser_fifo"
# server_signature - Should locally-generated messages include server's
# signature? By default yes, it is good for
# trouble-shooting.
server_signature=yes
# reply_to_via - A hint to reply modules whether they should send reply
# to IP advertised in Via. Turned off by default, which
# means that replies are sent to IP address from which
# requests came.
reply_to_via=no
# user | uid - uid to be used by the server. 99 = nobody.
#uid="nobody"
# group | gid - gid to be used by the server. 99 = nobody.
#gid="nobody"
# mhomed -- enable calculation of outbound interface; useful on
# multihomed servers.
mhomed=0
# ------------- external module loading --------------------------------------
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/exec.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/print.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/uri.so"
# ------------- tm parameters ------------------------------------------------
modparam("tm", "fr_timer", 12) # Timer which hits if no final reply for a
# request or ACK for a negative INVITE
# reply arrives (in seconds).
# Default value is 30 seconds.
modparam("tm", "fr_inv_timer", 24) # Timer which hits if no final reply for an
# INVITE arrives after a provisional message
# was received (in seconds).
# Default value is 120 seconds.
# ------------- rr parameters -------------------------------------------------
# set ";lr" tag to ";lr=true"
modparam("rr", "enable_full_lr", 1) # If set to 1 then ;lr=on instead of just ;lr
# will be used. This is to overcome problems
# with broken UAs which strip ;lr parameter
# when generating Route header fields from
# Record-Route (;lr=on seems to help).
# Default value is 0 (no).
# ------------- accounting parameters -----------------------------------------
modparam("acc", "log_level", 1) # Log level at which accounting messages are
# issued to syslog. Default value is L_NOTICE.
modparam("acc", "log_flag", 1) # Request flag which needs to be set to
# account a transaction. Default value is 1.
modparam("acc", "log_missed_flag", 3) # Request flag which needs to be set to
# account missed calls. Default value is 2.
# ------------- usrloc parameters ---------------------------------------------
# 2 enables write-back to persistent mysql storage for speed
# disable=0, write-through=1
modparam("usrloc", "db_mode", 2)
# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)
# database location
modparam("usrloc", "db_url", "sql://ser:heslo@localhost/ser")
# ------------- auth parameters ----------------------------------------------
# database location
modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser")
# allows clear text passwords in the mysql database
modparam("auth_db", "calculate_ha1", yes)
# name of password column in mysql database
modparam("auth_db", "password_column", "password")
# ------------- routing logic ------------------------------------------------
route {
# ------------- routine checks --------------------------------------------
# stop forwarding at 10 hops to prevent infinite loops
if (!mf_process_maxfwd_header("10")) {
log(1, "LOG: Too many hops\n");
sl_send_reply("483", "Too many hops");
break;
};
# prevents private ip space from being used
#if (search("^(Contact|m): .*(a)(192\.168\.|10\.|172\.16)")) {
# if (method=="REGISTER") {
# log(1, "LOG: Someone trying to register from private IP\n");
# sl_send_reply("479", "Please don't use private IP addresses" );
# break;
# };
#};
# separate the destination r-uri from the set of proxies that must be traversed
loose_route();
# if the host portion of the request uri is not local, send it directly
# to route processing.
if (!(uri==myself)) {
route(2);
break;
};
# All REGISTER attempts are processed and must always be authenticated
if (method=="REGISTER") {
# make sure that users don't register infinite loops
if (search("^(Contact|m): .*(a)(69\.60\.109\.205|(proxy\.)?freephonet\.com)")) {
log(1, "LOG: alert: someone trying to set aor==contact\n");
sl_send_reply("476", "No Server Address in Contacts Allowed" );
break;
};
# challenge/response
if (!www_authorize("freephonet.com", "subscriber")) {
www_challenge("freephonet.com", "0");
break;
};
# only registered users are allowed
if (!is_user("replicator") & !check_to()) {
log(1, "LOG: unregistered user registration attempt\n");
sl_send_reply("403", "Only registered users are allowed");
break;
};
# it is an authenticated request, update Contact database now
if (!save("location")) {
sl_reply_error();
};
break;
};
# process traffic local to freephonet and the PSTN
# Find the canonical username
lookup("aliases");
# check domain again, if it is not still local after the alias
# table lookup, just send it on its way. We do not authenticate
# traffic we forward
if (!(uri=~"^sip:(.+@)?(69\.60\.109\.205|(proxy\.)?freephonet\.com)([:;\?].*)?$")) {
route(5);
break;
};
# now check for destinations through the gateway. 911 and 9911
# are always sent to the gateway. The assumption is that other all
# numeric usernames between 5 and 20 digits are really pstn numbers
# and so they are routed to the gateway
if ( (uri=~"^sip:911@.*") | (uri=~"^sip:9911@.*") | (uri=~"sip:[0-9]{5,20}@.*") ) {
route(3);
break;
};
# does the user wish redirection on no availability? (i.e., is he
# in the voicemail (ser->grp) group?)
if (is_user_in("Request-URI", "voicemail")) {
t_on_failure("4");
setflag(4);
};
# handle local SIP destinations not found in usrloc db
# mostly offline or non-existent users
if (!lookup("location")) {
route(4);
break;
};
# check whether some inventive user has uploaded gateway
# contacts to usrloc to bypass authorization logic
if (uri=~"@10\.1\.2\.5([;:].*)*" ) {
log(1, "LOG: Gateway address in UsrLoc\n");
route(3);
break;
};
# this flag is used with the acc module to report missed calls
# to syslog.
setflag(3);
# do it (words to live by)
append_hf("P-hint: USRLOC\r\n");
if (!t_relay()) {
sl_reply_error();
break;
};
} /* end of initial routing logic */
Hello.
I'm trying to use the exec_dset() command to call an external
application that rewrite the Request-URI. What i want to know if it's
possible to take the value of the original R-URI by the exec_dset( ) and
then according to the external application rewrite the value. Notice that
the important thing here is know the original value of the R-URI. I have
been searching in the mail list but i could not find anything related. Hope
that someone can help me.
Thanks in advance.
Best Regards.
Ricardo Martinez Ogalde
Hello.
I finally was able to change the R-URI for a particular call. I
made a simple test program like this one:
echo "$*" >/usr/local/etc/ser/redirec.log
num=1111234567 >>/usr/local/etc/ser/redirec.log
echo sip:$num@mysip.domain.com
exit 0
So every call is "translated" to the number indicated in the program.
At this point i have a question.
I saw the sip debug for a call made to my SER. And i realized that the
authorization is still made with the original called number. Then when the
INVITE goes to outgoing gateway i see that uri changed, as i expected, but
all the other paramters are intact. You can see it in this INVITE message
(outgoing INVITE from SER).
INVITE sip:1111234567@gw1.mydomain.com:5060 SIP/2.0
Record-Route: <sip:0012012287000@mysip.domain.com;ftag=2c425f59a4;lr=on>
Via: SIP/2.0/UDP mysip.domain.com;branch=z9hG4bK03b6.f1684071.0
Via: SIP/2.0/UDP xx.xx.148.242:5060;branch=z9hG4bK2c425f59a4249
From: <sip:5555832351@mysip.domain.com>;tag=2c425f59a4
To: <sip:0012012287000@mysip.domain.com>
Call-ID: 2c239842-ca97-5f35-81590002a400f1e9xx.xx.148.242
CSeq: 249 INVITE
Supported: timer, replaces
Min-SE: 1800
Date: Sat, 28 May 2005 07:52:12 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:5555832351@xx.xx.148.242>
Accept: application/sdp..Proxy-Authorization: Digest username="javier",
realm="mysip.domain.com", nonce="417981a87eebd1f4cc0db371a",
uri="sip:0012012287000@mysip.domain.com", qop=auth, nc=00000001,
cnonce="0c85cf88", response="3b96cb278bfc2c898297c6568a9", algorithm=MD5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 241
Max-Forwards: 69
P-hint: GATEWAY..
v=0
o=5555832351 1117266732 1117266732 IN IP4 xx.xx.148.242
s=AddPac Gateway SDP
c=IN IP4 xx.xx.148.242
t=1117266732 0
m=audio 23230 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
Do i have to append something else?. I'm not really sure about this.
Here is the part when i call exec_dset()
# Llamada a Rutina Externa para cambio de numero
if (method=="INVITE") {
exec_dset("/usr/local/etc/ser/redirect.sh");
};
is at the beggining of my ser.cfg
Here is part of my routing configuration.
if ( (uri=~"^sip:111.*@.*") | (uri=~"^sip:333.*@.*") |
(uri=~"^sip:0.*@.*") ){
if (method=="INVITE") {
log(1,"FORWARDING : Llamada hacia plataforma H.323\n");
route(1);
break;
};
};
Then
route[1]
{
rewritehostport("gw1.mydomain.com:5060");
append_hf("P-hint: GATEWAY\r\n");
t_relay();
break;
};
I really hope that someone can help me here!
Thanks in advance.
Ricardo.
-----Mensaje original-----
De: Ricardo Martinez [mailto:rmartinez@redvoiss.net]
Enviado el: Viernes, 22 de Octubre de 2004 15:12
Para: 'serusers(a)lists.iptel.org'
Asunto: [Serusers] exec_dset() question.
Hello.
I'm trying to use the exec_dset() command to call an external
application that rewrite the Request-URI. What i want to know if it's
possible to take the value of the original R-URI by the exec_dset( ) and
then according to the external application rewrite the value. Notice that
the important thing here is know the original value of the R-URI. I have
been searching in the mail list but i could not find anything related. Hope
that someone can help me.
Thanks in advance.
Best Regards.
Ricardo Martinez Ogalde
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
1. Don't think about making your UA asymmetric, make it symmetric
2. I t is possible to use Mediaproxy with your asymmetric client but
you would still need to set port forwarding in your NAT device so stick
to point 1
3. Symmetric means to use same port for sending and receiving data
-----------
Hi
Sorry if this is already answered, but i've search the archives and
couldn't find what I'm looking for.
Basically I would like to have the following scenario:
UA1 asym --> NAT/Firewall --> Ser/mediaproxy --> PSTN Gateway
PSTN Gateway is a Quintum box, we already have several of this, and it
can only support asymmetric rtp, that's why we are looking at mediaproxy
I develop the UA1 myself, and can support both symmetric or asymmetric
rtp.
My question, is this possible with Ser/mediaproxy? If it is, could
somebody give me pointer on how to configure Ser with mediaproxy
Currenty I have the call goes to the pstn gateway but no voice on each
side.
Another question, how do you know if the sip signalling is asymmetric or
not?
Thanks,
Fikri
Hi
I have the following configuration:
IP Phone ---- router ----- Eth Switch ------ router ------ IP Phone
|
|
PC running SER
If I try to make a call from on IP phone to the other I can get the voice
through
only every second call; I can't get it through everytime I try!
I also tried restarting the routers but it didn't help.
I tried to trace using ngrep and what I can see is that when I have the
speech connection
I get a "loop detected" message from the called phone while when the speech
is not set up
everything looks smooth.
Do you have any suggestion?
Thanks in advance
//Umberto
hello,
i can not use proxy, if i set "fork=no" in ser.cfg.
Have you ever noticed it ?
Any idee?
Regards
Yongcheng Chen
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com