Hi folks,
I just spent the evening with trying to find a logical solution to a NAT
problem but I had no success. I decided therefore to go to bed and let the
more intelligent guys have a guess ;):
I do have the following setup:
Cisco 7960G with public IP
Xlite behind router with NAT
Ser server with a public ip
Asterisk with a public ip
Xlite finds out that it is behind a symetric firewall while starting and
sends the external ip of the nat device in its sip messages.
I want to call the xlite client behind NAT from the Cisco phone. It works
when the cisco phone and the xlite client are registered with the asterisk
server. I have set nat=yes and canreinvite=no in the account settings for
the xlite client in the sip.conf of the asterisk server. The Cisco phone
has a normal account. I had a look at the sip messages and as configured,
the Asterisk server works as a rtp proxy for the media stream. Audio works
in both ways.
When I use ser and register both clients with ser and start a call, audio
works only outbound from xlite to the cisco phone but not inbound from the
cisco phone to xlite through the nat device.
I digged the sip messages several times and did not see any big difference
between the two sip conversations, besides having the asterisk as an rtp
proxy in the middle in the first attempt. Neither did I see an approach of
asterisk to make xlite pinhole the nat device as describe for example in
the sip cookbook.
Unfortunately I am stuck at this stage and cannot find a logical
explanation for the described behaviour. If anyone can give me a hint or
needs further information to assist, please let me know!
Cheers
Morten
After having problems with the older RPMs I figured I'd try the latest
cvs ser/libradiusclient-ng. I'm also using freeradius 0.9.3 with a MySQL
backend.
Here's what I get when I try to authenticate a Granstream BT-100 phone:
rad_recv: Access-Request packet from host 127.0.0.1:38309, id=191,
length=249
User-Name = "test(a)204.244.xxx.xxx"
Digest-Attributes = "\n\006test"
Digest-Attributes = "\001\020204.244.xxx.xxx"
Digest-Attributes =
"\002*4145f7038382c631a7baed91f6ea3be2e39008c2"
Digest-Attributes = "\004\024sip:204.244.xxx.xxx"
Digest-Attributes = "\003\nREGISTER"
Digest-Response = "5a80057b08229421b11034f0c9066de5"
Service-Type = Sip-Session
Sip-URI-User = "8020"
Cisco-AVPair = "call-id=d66787010e24eacd(a)204.244.xxx.xxx"
NAS-IP-Address = 127.0.0.1
NAS-Port-Id = 5060
modcall: entering group authorize for request 15
modcall[authorize]: module "preprocess" returns ok for request 15
modcall[authorize]: module "chap" returns noop for request 15
modcall[authorize]: module "eap" returns noop for request 15
rlm_digest: Converting Digest-Attributes to something sane...
Digest-User-Name = "test"
Digest-Realm = "204.244.xxx.xxx"
Digest-Nonce = "4145f7038382c631a7baed91f6ea3be2e39008c2"
Digest-URI = "sip:204.244.xxx.xxx"
Digest-Method = "REGISTER"
rlm_digest: Adding Auth-Type = DIGEST
modcall[authorize]: module "digest" returns ok for request 15
radius_xlat: 'test(a)204.244.xxx.xxx'
rlm_sql (sql): sql_set_user escaped user --> 'test(a)204.244.xxx.xxx'
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'test(a)204.244.xxx.xxx' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql (sql): User test(a)204.244.xxx.xxx not found in radcheck
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'test(a)204.244.xxx.xxx' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat: 'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'test(a)204.244.xxx.xxx' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): User test(a)204.244.xxx.xxx not found in radgroupcheck
rlm_sql (sql): User not found
rlm_sql (sql): Released sql socket id: 4
modcall[authorize]: module "sql" returns notfound for request 15
rlm_realm: Looking up realm "204.244.xxx.xxx" for User-Name =
"test(a)204.244.xxx.xxx"
rlm_realm: No such realm "204.244.xxx.xxx"
modcall[authorize]: module "suffix" returns noop for request 15
modcall[authorize]: module "files" returns notfound for request 15
modcall[authorize]: module "mschap" returns noop for request 15
modcall: group authorize returns ok for request 15
rad_check_password: Found Auth-Type DIGEST
auth: type "digest"
modcall: entering group authenticate for request 15
rlm_digest: Configuration item "User-Password" is required for
authentication.
modcall[authenticate]: module "digest" returns invalid for request 15
modcall: group authenticate returns invalid for request 15
auth: Failed to validate the user.
Login incorrect: [test(a)204.244.xxx.xxx/<no User-Password attribute>]
(from client localhost port 5060)
-----------------------------
So first off it's trying to authenticate with the username of
"test(a)204.244.xxx.xxx". I don't want to use realms, so I've gone in the
sql.conf changed:
sql_user_name = "%{User-Name}"
to
sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}"
However, it didn't help. It's not stripping away the realm.
Also I still keep getting the "Configuration item "User-Password" is
required for authentication." and "Login incorrect:
[test(a)204.244.xxx.xxx/<no User-Password attribute>]"
I don't understand why. I'm using the proper dictionary.ser file. Here's
my radcheck table:
(`id`, `UserName`, `Attribute`, `op`, `Value`) VALUES (1, 'test',
'User-Password', '==', 'test');
Any help is appreciated.
Thanks,
- Darren
Hello all,
It seems many new comers like me have got problems configuring these two
together. I haven't found any information in the list. The scenario is that
I want to put B2bua(vovida) in line for a prepaid system. SER should route
calls to B2BUA which will be eventually return back to SER to be routed to
the final destination. The problem is how to configure SER to prevent
routing loops. I have tried following but it seems it doesn't work and many
calls will be generated to the same destination.
if (!(src_ip==<b2bip> and src_port==5065) and method=="INVITE") {
Forward to B2BUA for accounting
forward(82.35.57.37,5065);
sl_send_reply("181","Forwarding the call to B2BUA");
};
Thanking you in advance
Regards
Kiarash
Gwen,
Where did you make the ln -s libmysqlclient.so.12 libmysqlclient.so.10?
I have the same problem - and have tried to link the old embedded reference
but without success
Regards
Paul
-----Original Message-----
From: g.billoudet(a)arwen-tech.fr [mailto:g.billoudet@arwen-tech.fr]
Sent: 10 September 2004 14:05
To: g.billoudet(a)arwen-tech.fr
Cc: serusers(a)lists.iptel.org
Subject: RE: [Serusers] could not open module mysql.so
I finally found the solution...
First, I don't know why but I had a strange link file
(libmysqlclient.so.10) in my folder /usr/local/lib/ser/modules. I deleted
it and then I got the following result of the command "ldd mysql.so" :
linux-gate.so.1 => (0xffffe000)
libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x40028000)
libz.so.1 => /usr/lib/libz.so.1 (0x4005f000)
libc.so.6 => /lib/tls/libc.so.6 (0x40070000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x401b8000)
libnsl.so.1 => /lib/libnsl.so.1 (0x401e5000)
libm.so.6 => /lib/tls/libm.so.6 (0x401f8000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
Now, I have the same result than Zeus but I didn't have any
/usr/lib/libmysqlclient.so.10...
When I installed the libmysql12, I obtained new files in /usr/lib/
(libmysqlclient.so.12 and some others). When SER try to load mysql.so, it
looks for the library libmysqlclient.so.10 and obviously can't find it.
So I made a link with the following command :
ln -s libmysqlclient.so.12 libmysqlclient.so.10
And now, SER can load the mysql module !!
Thanks for your help Zeus !!
Bye, Gwen
>
> Hi Zeus and other serusers,
>
> The mysql.so file is the one I got with SER.(ser-0.8.12_linux_i386.tar.gz,
> if I remember...).
>
> Could you tell me what output you get with this command :
> # ldconfig -v |grep mysql
> ldconfig: Path `/usr/lib' given more than once
> libmysqlclient_r.so.12 -> libmysqlclient_r.so.12.0.0
> libmysqlclient.so.12 -> libmysqlclient.so.12.0.0
> libmysqlclient.so.10 -> libmysqlclient.so.10
>
> Thanks,
> Gwen
>
>
>
>> Gwen,
>>
>> There is something wrong with your mysql.so file. Did you compile it
>> yourself or download it somewhere? It doesn't look like mysql library is
>> linked into it. My ldd output is like this:
>>
>> sip:/usr/local/lib/ser/modules> ldd mysql.so
>> libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10
>> (0x00bbb000)
>> libz.so.1 => /usr/lib/libz.so.1 (0x00abf000)
>> libc.so.6 => /lib/tls/libc.so.6 (0x003f3000)
>> libcrypt.so.1 => /lib/libcrypt.so.1 (0x0056a000)
>> libnsl.so.1 => /lib/libnsl.so.1 (0x0029e000)
>> libm.so.6 => /lib/tls/libm.so.6 (0x00111000)
>> libnss_files.so.2 => /lib/libnss_files.so.2 (0x00a7d000)
>> libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x006dd000)
>> libresolv.so.2 => /lib/libresolv.so.2 (0x00967000)
>> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0036b000)
>>
>> Note the first line states that mysql.so should dynamically load the
>> mysql
>> library from /usr/lib/libmysqlclient.so.10. It is absent from your
>> output.
>> Either recompile the module or download another copy from the FTP
>> server.
>>
>> Zeus
>>
>>> -----Original Message-----
>>> From: g.billoudet(a)arwen-tech.fr [mailto:g.billoudet@arwen-tech.fr]
>>> Sent: Friday, 10 September 2004 5:10 PM
>>> To: Zeus Ng
>>> Cc: serusers(a)lists.iptel.org
>>> Subject: RE: [Serusers] could not open module mysql.so
>>>
>>>
>>> Thank you for your help Zeus,
>>>
>>> Here are the output of the commands :
>>>
>>> [root@linux gwen]# ldd /usr/local/lib/ser/modules/mysql.so
>>> linux-gate.so.1 => (0xffffe000)
>>> libz.so.1 => /usr/lib/libz.so.1 (0x40028000)
>>> libc.so.6 => /lib/tls/libc.so.6 (0x40039000)
>>> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>>>
>>> [root@linux gwen]# cat /etc/ld.conf
>>> cat: /etc/ld.conf: No such file or directory
>>>
>>> [root@linux gwen]# cat /etc/ld.so.conf
>>> /usr/X11R6/lib
>>> /usr/lib/qt3/lib
>>> /usr/local/lib/ser/modules
>>> /usr/lib
>>>
>>> Gwen
>>>
>>>
>>> > Gwen,
>>> >
>>> > It appears that your mysql.so is not link properly with the mysql
>>> > library. Send the following output to the list. It may give us more
>>> > insight on your problem.
>>> >
>>> > root# ldd /usr/local/lib/ser/modules/mysql.so
>>> > root# cat /etc/ld.conf
>>> >
>>> >
>>> > Zeus
>>> >
>>> >> -----Original Message-----
>>> >> From: serusers-bounces(a)lists.iptel.org
>>> [mailto:serusers-bounces@lists.iptel.org]
>>> >> On Behalf Of g.billoudet(a)arwen-tech.fr
>>> >> Sent: Friday, 10 September 2004 12:46 AM
>>> >> To: g.billoudet(a)arwen-tech.fr
>>> >> Cc: serusers(a)lists.iptel.org
>>> >> Subject: Re: [Serusers] could not open module mysql.so
>>> >>
>>> >>
>>> >>
>>> >> Hi,
>>> >>
>>> >> I checked my MySQL-client package. So I installed
>>> >> MySQL-client-4.0.20-0.i386.rpm. I also had to install the package
>>> >> libmysql12. But, I still have the same problem with the
>>> load of mysql
>>> >> module...
>>> >>
>>> >> I the folder /usr/lib, new files appeared : libmysqlclient_r.so.12@
>>> >> libmysqlclient_r.so.12.0.0*
>>> >> libmysqlclient.so.10*
>>> >> libmysqlclient.so.12@
>>> >> libmysqlclient.so.12.0.0*
>>> >>
>>> >> What 'libmysqlclient' files do you have in your folder
>>> /usr/lib and
>>> >> /usr/local/lib/ser/modules/ ??
>>> >>
>>> >> When I use "/usr/local/sbin/ser -c", the message of the error is a
>>> >> bit different :
>>> >> 0(2570) loading module /usr/local/lib/ser/modules/mysql.so
>>> >> 0(2570) ERROR: load_module: could not open module
>>> >> </usr/local/lib/ser/modules/mysql.so>:
>>> >> /usr/local/lib/ser/modules/mysql.so: undefined symbol:
>>> >> mysql_field_count
>>> >> 0(2570) parse error (14,13-49): failed to load module
>>> >> # ...bla bla... don't mind
>>> >> ERROR: bad config file (1 errors)
>>> >>
>>> >>
>>> >> Thanks for help
>>> >> Gwen
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>
>>
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
**************************************************************************
Disclaimer
This email transmission is confidential and intended solely for the person
or organisation to whom it is addressed. If you are not the intended
recipient, you must not copy, distribute or disseminate the information, or
take any action in reliance of it. Any views expressed in this message are
those of the individual sender, except where the sender specifically states
them to be the views of any organisation or employer. If you have received
this message in error, do not open any attachment but please notify the
sender (above) and delete this message from your system. Please rely on your
own virus check. Although all outbound mail is checked for viruses, no
responsibility is taken by the sender for any damage rising out of any bug
or virus infection.
**************************************************************************
I'm using 0.8.14, which I grabbed on 8/6, and sems I got from CVS on 8/25.
Thanks,
Jeff
At 11:01 AM 9/13/2004, Steve Blair wrote:
> I saw the "command must begin with..." message before. I think that
>error had to do with which release of SEMS you downloaded. Which
>version of SER are you using?
>
>-Steve
>
>Jeff Harrington wrote:
>
>>Steve,
>> I'm trying to use sems and a second instance of ser on 5090.
>>I did a quick test, and got some new errors in syslog. I haven't gotten
>>far enough to see these before, so I haven't looked into it, but this is
>>what I'm seeing:
>>
>>Sep 13 10:42:06 enforcer Sems[26247]: Error: application 'voicemail' not
>>found !
>>Sep 13 10:42:06 enforcer Sems[26247]: Error: startSession: application
>>'voicemai
>>l' not found !
>>Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command t_reply is
>>not av
>>ailable
>>Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must begin
>>with :
>>: application 'voicemail' not found !
>>Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must begin
>>with :
>>: 000066872B01EEA4
>>Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must have
>>at leas
>>t 3 chars
>>Sep 13 10:42:06 enforcer Sems[26247]: Error: AmRequestUAS::reply: 500
>>command 't
>>_reply' not available
>>Sep 13 10:42:06 enforcer ser[615]: ERROR: t_should_relay: status rewrite
>>by UAS:
>> stored: 408, received: 487
>>Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command t_reply is
>>not av
>>ailable
>>Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must begin
>>with :
>>: Call/Transaction Does Not Exist
>>Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must begin
>>with :
>>: Contact: <sip:jharring@199.109.32.11:5090>
>>Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must have
>>at leas
>>t 3 chars
>>Sep 13 10:42:19 enforcer Sems[26247]: Error: AmRequestUAS::reply: 500
>>command 't
>>_reply' not available
>>
>>Again, these are new, so it may be something easy that I'm missing.
>>
>>Jeff
>>
>>At 10:42 AM 9/13/2004, Steve Blair wrote:
>>
>>>What are you doing for voicemail? What app? How are you sending calls to
>>>vm?
>>>
>>>_Steve
>>>
>>>Jeff Harrington wrote:
>>>
>>>>Steve,
>>>> I had not. I put that into the file just now, and I can
>>>> register again.
>>>>
>>>>Thanks for the advice, not sure if vm is working yet, but at least the
>>>>client can connect.
>>>>
>>>>Jeff
>>>>
>>>>At 10:26 AM 9/13/2004, Steve Blair wrote:
>>>>
>>>>>Jeff:
>>>>>
>>>>> Did you set the set-variable = max_connections=500 in /etc/my.cnf?
>>>>>
>>>>>-Steve
>>>>>
>>>>>Jeff Harrington wrote:
>>>>>
>>>>>>All,
>>>>>> I've been working on voicemail for a while, and haven't made
>>>>>> much progress. In looking through the archives I've come up with a
>>>>>> few example configs. My latest attempt gives me a number of
>>>>>> errors. I was hoping some of the experts could help out with where
>>>>>> I'm going wrong. I'm still in a test mode, so there are only 2
>>>>>> people registering. When I try to start ser, I get the below
>>>>>> errors, and a large number of Zombie processes:
>>>>>>
>>>>>>Sep 10 15:46:52 enforcer ser[30812]: connect_db(): Too many connections
>>>>>>Sep 10 15:46:52 enforcer ser[30812]: db_init(): Error while trying to
>>>>>>connect da
>>>>>>tabase
>>>>>>Sep 10 15:46:52 enforcer ser[30812]: ERROR; vm_init_child: could not
>>>>>>init db mys
>>>>>>ql://ser:heslo@localhost/ser
>>>>>>Sep 10 15:46:52 enforcer ser[30812]: init_mod_child(): Error while
>>>>>>initializing
>>>>>>module voicemail
>>>>>>Sep 10 15:46:52 enforcer ser[30812]: init_children failed
>>>>>>
>>>>>>My config looks like this:
>>>>>>
>>>>>>#
>>>>>># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
>>>>>>#
>>>>>># simple quick-start config script
>>>>>>#
>>>>>>
>>>>>># ----------- global configuration parameters ------------------------
>>>>>>
>>>>>>#debug=3 # debug level (cmd line: -dddddddddd)
>>>>>>#fork=yes
>>>>>>#log_stderror=no # (cmd line: -E)
>>>>>>
>>>>>>/* Uncomment these lines to enter debugging mode
>>>>>>debug=7
>>>>>>fork=no
>>>>>>log_stderror=yes
>>>>>>*/
>>>>>>
>>>>>>check_via=no # (cmd. line: -v)
>>>>>>dns=no # (cmd. line: -r)
>>>>>>rev_dns=no # (cmd. line: -R)
>>>>>>#port=5060
>>>>>>#children=4
>>>>>>fifo="/tmp/ser_fifo"
>>>>>>fifo_mode=0666
>>>>>>alias="nysernet.org"
>>>>>>alias="enforcer.nysernet.org"
>>>>>>
>>>>>># ------------------ module loading ----------------------------------
>>>>>>
>>>>>># Uncomment this if you want to use SQL database
>>>>>>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/vm.so"
>>>>>>loadmodule "/usr/lib/ser/modules/group.so"
>>>>>>
>>>>>># Uncomment this if you want digest authentication
>>>>>># mysql.so must be loaded !
>>>>>>loadmodule "/usr/lib/ser/modules/auth.so"
>>>>>>loadmodule "/usr/lib/ser/modules/auth_db.so"
>>>>>>
>>>>>># ----------------- setting module-specific parameters ---------------
>>>>>>
>>>>>># -- usrloc params --
>>>>>>
>>>>>>#modparam("usrloc", "db_mode", 0)
>>>>>>
>>>>>># Uncomment this if you want to use SQL database
>>>>>># for persistent storage and comment the previous line
>>>>>>modparam("usrloc", "db_mode", 2)
>>>>>>
>>>>>># -- auth params --
>>>>>># Uncomment if you are using auth module
>>>>>>#
>>>>>>modparam("auth_db", "calculate_ha1", yes)
>>>>>>#
>>>>>># If you set "calculate_ha1" parameter to yes (which true in this
>>>>>>config),
>>>>>># uncomment also the following parameter)
>>>>>>#
>>>>>>modparam("auth_db", "password_column", "password")
>>>>>>
>>>>>># -- rr params --
>>>>>># add value to ;lr param to make some broken UAs happy
>>>>>>modparam("rr", "enable_full_lr", 1)
>>>>>>
>>>>>># -- tm - fail on invite --
>>>>>>
>>>>>>modparam ("tm", "fr_inv_timer", 30)
>>>>>>
>>>>>>
>>>>>># -- voicemail params
>>>>>>modparam ("voicemail","db_url","mysql://ser:heslo@localhost/ser")
>>>>>>
>>>>>># ------------------------- request routing logic -------------------
>>>>>>
>>>>>># main routing logic
>>>>>>
>>>>>>route{
>>>>>>
>>>>>> # initial sanity checks -- messages with
>>>>>> # max_forwards==0, or excessively long requests
>>>>>> 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;
>>>>>> };
>>>>>>
>>>>>> # we record-route all messages -- to make sure that
>>>>>> # subsequent messages will go through our proxy; that's
>>>>>> # particularly good if upstream and downstream entities
>>>>>> # use different transport protocol
>>>>>> record_route();
>>>>>> # loose-route processing
>>>>>> if (loose_route()) {
>>>>>> t_relay();
>>>>>> break;
>>>>>> };
>>>>>>
>>>>>> # if the request is for other domain use UsrLoc
>>>>>> # (in case, it does not work, use the following command
>>>>>> # with proper names and addresses in it)
>>>>>> if (uri==myself) {
>>>>>>
>>>>>> if (method=="REGISTER") {
>>>>>>
>>>>>># Uncomment this if you want to use digest authentication
>>>>>> if (!www_authorize("enforcer.nysernet.org",
>>>>>> "subscriber")) {
>>>>>> www_challenge("enforcer.nysernet.org", "0");
>>>>>> break;
>>>>>> };
>>>>>>
>>>>>> save("location");
>>>>>> break;
>>>>>> };
>>>>>> };
>>>>>>
>>>>>># Is the user in the voicemail group? If they are, store it in flag
>>>>>>4, before
>>>>>>#rewriting the flag with UsrLoc
>>>>>>if (is_user_in ("Request-URI","voicemail")) {
>>>>>> setflag(4);
>>>>>>};
>>>>>>
>>>>>> #mark transaction for voicemail (routing block 2)
>>>>>> if (!lookup("location")){
>>>>>> route(2);
>>>>>> break;
>>>>>> }
>>>>>>
>>>>>># if user is on-line and is in voicemail group, enable redirection
>>>>>>if (method == "INVITE" && isflagset(4)) {
>>>>>> t_on_failure("1");
>>>>>>};
>>>>>>t_relay();
>>>>>>}
>>>>>>
>>>>>>#------------------Handling of unavailable user ---------------------
>>>>>>route[2]{
>>>>>>#non-voip -- just send not found
>>>>>>if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")){
>>>>>> sl_send_reply("404","Not Found");
>>>>>> break;
>>>>>> }
>>>>>>#not voicemail subscriber
>>>>>>if (!isflagset(4)){
>>>>>> sl_send_reply("404","Not Found and no voicemail available");
>>>>>> break;
>>>>>>};
>>>>>>
>>>>>>#forward to voicemail now
>>>>>>rewritehostport ("199.109.32.11:5090");
>>>>>>t_relay_to_udp("199.109.32.11","5090");
>>>>>>}
>>>>>>#if forwarding downstream did not succeed, try voicemail running on
>>>>>>port 5090
>>>>>>#
>>>>>>failure_route[1] {
>>>>>> revert_uri();
>>>>>> rewritehostport ("199.109.32.11:5090");
>>>>>> append_branch();
>>>>>> t_relay_to_udp("199.109.32.11","5090");
>>>>>>}
>>>>>>
>>>>>>Any advice as to what I can try would be appreciated.
>>>>>>
>>>>>>Thanks,
>>>>>>Jeff
>>>>>>
>>>>>>_______________________________________________
>>>>>>Serusers mailing list
>>>>>>serusers(a)lists.iptel.org
>>>>>>http://lists.iptel.org/mailman/listinfo/serusers
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>
>>>>>ISC Network Engineering
>>>>>The University of Pennsylvania
>>>>>3401 Walnut Street, Suite 221A
>>>>>Philadelphia, PA 19104
>>>>>
>>>>>
>>>>>voice: 215-573-8396
>>>>> 215-746-7903
>>>>>
>>>>>fax: 215-898-9348
>>>>>
>>>>>sip:blairs@upenn.edu
>>>>
>>>>
>>>>_______________________________________________
>>>>Serusers mailing list
>>>>serusers(a)lists.iptel.org
>>>>http://lists.iptel.org/mailman/listinfo/serusers
>>>
>>>
>>>
>>>--
>>>
>>>ISC Network Engineering
>>>The University of Pennsylvania
>>>3401 Walnut Street, Suite 221A
>>>Philadelphia, PA 19104
>>>
>>>
>>>voice: 215-573-8396
>>> 215-746-7903
>>>
>>>fax: 215-898-9348
>>>
>>>sip:blairs@upenn.edu
>
>--
>
>ISC Network Engineering
>The University of Pennsylvania
>3401 Walnut Street, Suite 221A
>Philadelphia, PA 19104
>
>
>voice: 215-573-8396
> 215-746-7903
>
>fax: 215-898-9348
>
>sip:blairs@upenn.edu
>
Steve,
I'm trying to use sems and a second instance of ser on 5090. I
did a quick test, and got some new errors in syslog. I haven't gotten far
enough to see these before, so I haven't looked into it, but this is what
I'm seeing:
Sep 13 10:42:06 enforcer Sems[26247]: Error: application 'voicemail' not
found !
Sep 13 10:42:06 enforcer Sems[26247]: Error: startSession: application
'voicemai
l' not found !
Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command t_reply is
not av
ailable
Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must begin
with :
: application 'voicemail' not found !
Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must begin
with :
: 000066872B01EEA4
Sep 13 10:42:06 enforcer ser[627]: ERROR: fifo_server: command must have at
leas
t 3 chars
Sep 13 10:42:06 enforcer Sems[26247]: Error: AmRequestUAS::reply: 500
command 't
_reply' not available
Sep 13 10:42:06 enforcer ser[615]: ERROR: t_should_relay: status rewrite by
UAS:
stored: 408, received: 487
Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command t_reply is
not av
ailable
Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must begin
with :
: Call/Transaction Does Not Exist
Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must begin
with :
: Contact: <sip:jharring@199.109.32.11:5090>
Sep 13 10:42:19 enforcer ser[627]: ERROR: fifo_server: command must have at
leas
t 3 chars
Sep 13 10:42:19 enforcer Sems[26247]: Error: AmRequestUAS::reply: 500
command 't
_reply' not available
Again, these are new, so it may be something easy that I'm missing.
Jeff
At 10:42 AM 9/13/2004, Steve Blair wrote:
>What are you doing for voicemail? What app? How are you sending calls to
>vm?
>
>_Steve
>
>Jeff Harrington wrote:
>
>>Steve,
>> I had not. I put that into the file just now, and I can
>> register again.
>>
>>Thanks for the advice, not sure if vm is working yet, but at least the
>>client can connect.
>>
>>Jeff
>>
>>At 10:26 AM 9/13/2004, Steve Blair wrote:
>>
>>>Jeff:
>>>
>>> Did you set the set-variable = max_connections=500 in /etc/my.cnf?
>>>
>>>-Steve
>>>
>>>Jeff Harrington wrote:
>>>
>>>>All,
>>>> I've been working on voicemail for a while, and haven't made much
>>>> progress. In looking through the archives I've come up with a few
>>>> example configs. My latest attempt gives me a number of errors. I
>>>> was hoping some of the experts could help out with where I'm going
>>>> wrong. I'm still in a test mode, so there are only 2 people
>>>> registering. When I try to start ser, I get the below errors, and a
>>>> large number of Zombie processes:
>>>>
>>>>Sep 10 15:46:52 enforcer ser[30812]: connect_db(): Too many connections
>>>>Sep 10 15:46:52 enforcer ser[30812]: db_init(): Error while trying to
>>>>connect da
>>>>tabase
>>>>Sep 10 15:46:52 enforcer ser[30812]: ERROR; vm_init_child: could not
>>>>init db mys
>>>>ql://ser:heslo@localhost/ser
>>>>Sep 10 15:46:52 enforcer ser[30812]: init_mod_child(): Error while
>>>>initializing
>>>>module voicemail
>>>>Sep 10 15:46:52 enforcer ser[30812]: init_children failed
>>>>
>>>>My config looks like this:
>>>>
>>>>#
>>>># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
>>>>#
>>>># simple quick-start config script
>>>>#
>>>>
>>>># ----------- global configuration parameters ------------------------
>>>>
>>>>#debug=3 # debug level (cmd line: -dddddddddd)
>>>>#fork=yes
>>>>#log_stderror=no # (cmd line: -E)
>>>>
>>>>/* Uncomment these lines to enter debugging mode
>>>>debug=7
>>>>fork=no
>>>>log_stderror=yes
>>>>*/
>>>>
>>>>check_via=no # (cmd. line: -v)
>>>>dns=no # (cmd. line: -r)
>>>>rev_dns=no # (cmd. line: -R)
>>>>#port=5060
>>>>#children=4
>>>>fifo="/tmp/ser_fifo"
>>>>fifo_mode=0666
>>>>alias="nysernet.org"
>>>>alias="enforcer.nysernet.org"
>>>>
>>>># ------------------ module loading ----------------------------------
>>>>
>>>># Uncomment this if you want to use SQL database
>>>>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/vm.so"
>>>>loadmodule "/usr/lib/ser/modules/group.so"
>>>>
>>>># Uncomment this if you want digest authentication
>>>># mysql.so must be loaded !
>>>>loadmodule "/usr/lib/ser/modules/auth.so"
>>>>loadmodule "/usr/lib/ser/modules/auth_db.so"
>>>>
>>>># ----------------- setting module-specific parameters ---------------
>>>>
>>>># -- usrloc params --
>>>>
>>>>#modparam("usrloc", "db_mode", 0)
>>>>
>>>># Uncomment this if you want to use SQL database
>>>># for persistent storage and comment the previous line
>>>>modparam("usrloc", "db_mode", 2)
>>>>
>>>># -- auth params --
>>>># Uncomment if you are using auth module
>>>>#
>>>>modparam("auth_db", "calculate_ha1", yes)
>>>>#
>>>># If you set "calculate_ha1" parameter to yes (which true in this config),
>>>># uncomment also the following parameter)
>>>>#
>>>>modparam("auth_db", "password_column", "password")
>>>>
>>>># -- rr params --
>>>># add value to ;lr param to make some broken UAs happy
>>>>modparam("rr", "enable_full_lr", 1)
>>>>
>>>># -- tm - fail on invite --
>>>>
>>>>modparam ("tm", "fr_inv_timer", 30)
>>>>
>>>>
>>>># -- voicemail params
>>>>modparam ("voicemail","db_url","mysql://ser:heslo@localhost/ser")
>>>>
>>>># ------------------------- request routing logic -------------------
>>>>
>>>># main routing logic
>>>>
>>>>route{
>>>>
>>>> # initial sanity checks -- messages with
>>>> # max_forwards==0, or excessively long requests
>>>> 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;
>>>> };
>>>>
>>>> # we record-route all messages -- to make sure that
>>>> # subsequent messages will go through our proxy; that's
>>>> # particularly good if upstream and downstream entities
>>>> # use different transport protocol
>>>> record_route();
>>>> # loose-route processing
>>>> if (loose_route()) {
>>>> t_relay();
>>>> break;
>>>> };
>>>>
>>>> # if the request is for other domain use UsrLoc
>>>> # (in case, it does not work, use the following command
>>>> # with proper names and addresses in it)
>>>> if (uri==myself) {
>>>>
>>>> if (method=="REGISTER") {
>>>>
>>>># Uncomment this if you want to use digest authentication
>>>> if (!www_authorize("enforcer.nysernet.org",
>>>> "subscriber")) {
>>>> www_challenge("enforcer.nysernet.org", "0");
>>>> break;
>>>> };
>>>>
>>>> save("location");
>>>> break;
>>>> };
>>>> };
>>>>
>>>># Is the user in the voicemail group? If they are, store it in flag 4,
>>>>before
>>>>#rewriting the flag with UsrLoc
>>>>if (is_user_in ("Request-URI","voicemail")) {
>>>> setflag(4);
>>>>};
>>>>
>>>> #mark transaction for voicemail (routing block 2)
>>>> if (!lookup("location")){
>>>> route(2);
>>>> break;
>>>> }
>>>>
>>>># if user is on-line and is in voicemail group, enable redirection
>>>>if (method == "INVITE" && isflagset(4)) {
>>>> t_on_failure("1");
>>>>};
>>>>t_relay();
>>>>}
>>>>
>>>>#------------------Handling of unavailable user ---------------------
>>>>route[2]{
>>>>#non-voip -- just send not found
>>>>if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")){
>>>> sl_send_reply("404","Not Found");
>>>> break;
>>>> }
>>>>#not voicemail subscriber
>>>>if (!isflagset(4)){
>>>> sl_send_reply("404","Not Found and no voicemail available");
>>>> break;
>>>>};
>>>>
>>>>#forward to voicemail now
>>>>rewritehostport ("199.109.32.11:5090");
>>>>t_relay_to_udp("199.109.32.11","5090");
>>>>}
>>>>#if forwarding downstream did not succeed, try voicemail running on
>>>>port 5090
>>>>#
>>>>failure_route[1] {
>>>> revert_uri();
>>>> rewritehostport ("199.109.32.11:5090");
>>>> append_branch();
>>>> t_relay_to_udp("199.109.32.11","5090");
>>>>}
>>>>
>>>>Any advice as to what I can try would be appreciated.
>>>>
>>>>Thanks,
>>>>Jeff
>>>>
>>>>_______________________________________________
>>>>Serusers mailing list
>>>>serusers(a)lists.iptel.org
>>>>http://lists.iptel.org/mailman/listinfo/serusers
>>>
>>>
>>>
>>>--
>>>
>>>ISC Network Engineering
>>>The University of Pennsylvania
>>>3401 Walnut Street, Suite 221A
>>>Philadelphia, PA 19104
>>>
>>>
>>>voice: 215-573-8396
>>> 215-746-7903
>>>
>>>fax: 215-898-9348
>>>
>>>sip:blairs@upenn.edu
>>
>>_______________________________________________
>>Serusers mailing list
>>serusers(a)lists.iptel.org
>>http://lists.iptel.org/mailman/listinfo/serusers
>
>
>--
>
>ISC Network Engineering
>The University of Pennsylvania
>3401 Walnut Street, Suite 221A
>Philadelphia, PA 19104
>
>
>voice: 215-573-8396
> 215-746-7903
>
>fax: 215-898-9348
>
>sip:blairs@upenn.edu
>
All,
I've been working on voicemail for a while, and haven't made much
progress. In looking through the archives I've come up with a few example
configs. My latest attempt gives me a number of errors. I was hoping some
of the experts could help out with where I'm going wrong. I'm still in a
test mode, so there are only 2 people registering. When I try to start
ser, I get the below errors, and a large number of Zombie processes:
Sep 10 15:46:52 enforcer ser[30812]: connect_db(): Too many connections
Sep 10 15:46:52 enforcer ser[30812]: db_init(): Error while trying to
connect da
tabase
Sep 10 15:46:52 enforcer ser[30812]: ERROR; vm_init_child: could not init
db mys
ql://ser:heslo@localhost/ser
Sep 10 15:46:52 enforcer ser[30812]: init_mod_child(): Error while
initializing
module voicemail
Sep 10 15:46:52 enforcer ser[30812]: init_children failed
My config looks like this:
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666
alias="nysernet.org"
alias="enforcer.nysernet.org"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
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/vm.so"
loadmodule "/usr/lib/ser/modules/group.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- tm - fail on invite --
modparam ("tm", "fr_inv_timer", 30)
# -- voicemail params
modparam ("voicemail","db_url","mysql://ser:heslo@localhost/ser")
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
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;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("enforcer.nysernet.org", "subscriber")) {
www_challenge("enforcer.nysernet.org", "0");
break;
};
save("location");
break;
};
};
# Is the user in the voicemail group? If they are, store it in flag 4, before
#rewriting the flag with UsrLoc
if (is_user_in ("Request-URI","voicemail")) {
setflag(4);
};
#mark transaction for voicemail (routing block 2)
if (!lookup("location")){
route(2);
break;
}
# if user is on-line and is in voicemail group, enable redirection
if (method == "INVITE" && isflagset(4)) {
t_on_failure("1");
};
t_relay();
}
#------------------Handling of unavailable user ---------------------
route[2]{
#non-voip -- just send not found
if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")){
sl_send_reply("404","Not Found");
break;
}
#not voicemail subscriber
if (!isflagset(4)){
sl_send_reply("404","Not Found and no voicemail available");
break;
};
#forward to voicemail now
rewritehostport ("199.109.32.11:5090");
t_relay_to_udp("199.109.32.11","5090");
}
#if forwarding downstream did not succeed, try voicemail running on port 5090
#
failure_route[1] {
revert_uri();
rewritehostport ("199.109.32.11:5090");
append_branch();
t_relay_to_udp("199.109.32.11","5090");
}
Any advice as to what I can try would be appreciated.
Thanks,
Jeff
Hello.
Can someone help me with this issue?.
When i try to start mediproxy with /etc/init.d/mediaproxy start command, i
don't get anything,
Then when i try to run it from the source directory wirh ./mediaproxy.py i
obtain:
[root@sipproxy mediaproxy]# ./mediaproxy.py
File "./mediaproxy.py", line 84
print >>sys.stderr, "Mediaproxy error: %s. Exiting." % why
^
SyntaxError: invalid syntax
[root@sipproxy mediaproxy]#
I'm stuck with this...
Any ideas?
Thanks in advance.
Ricardo Martinez
Hello.
I have upgraded to version 0.8.14. I found there is no vm modules in new version and the function t_write_req() in tm module is same as vm() in vm module. So in my ser.cfg I write:
if( is_user_in("Request-URI", "voicemail")){
log(1, "yes,incoming voicemail call\n");
if(!t_write_req("/tmp/am_fifo","voicemail")){
log("could not contact voicemail server\n");
t_reply("500","could not contact voicemail server");
};
}
But in sems , the debug information as the following,
(16824) DEBUG: execute (AmServer.cpp:240): cmd.method= <INVITE>
(16824) DEBUG: execute (AmServer.cpp:241): cmd.user= <zhangwei>
(16824) DEBUG: execute (AmServer.cpp:242): cmd.email= <>
.....
(16824) ERROR: startSession (AmSession.cpp:456): 404 voicemail: no email address for user <zhangwei>
Where am i wrong? Do I forget set some parameters?
Thanks for your help!