Hello, comments inline.
On 24-07 16:45, Juan J. Sierralta P. wrote:
On Thu, 2003-07-24 at 16:17, Jan Janak wrote:
First of all thanks to SER developers for the great work. I'm new to SIP and SER, I been playing with it a week ago and I was able to setup a 0.8.11pre, and now I want to try the voicemail service. It seems that I need to run another SER instance for voicemail and redirect the requests to that instance.
No, you can run it on the same server.
It is posible to process the voicemail request on the same instance I use to forward/register users ?
Yes.
Or I need a second SER running. In case of 2 SER servers, it is posible to run them in the same box using diferent ports and diferent databases ?
Yes, if the servers listen on different ports and use different databases.
The problem I see with two instances is maintaing the users table syncronized to get the email address.
You can use the same table as for the "routing" SIP server. subscriber table (the table which contains usernames and correspondings e-mails) is not modified by the proxy or voicemail, so there is no need to synchronize it.
I mean the routing proxy will query the table to get credentials and voicemail will query it to get email addresses.
So is there an example out there how to implement voicemail in the same instance used for forwarding/register.
A sample config file for a voicemail running within another ser instance is attached. Note that you can also put the snippets of the config into the main proxy config, you need no separate instance.
Correct me if I'm wrong:
- I receive an INVITE for an offline user.
- I detect the offline status and must rewrite the uri in some way to
signal echo,conference or voicemail.
The problem I see if I rewrite the URI the VM will no be able to locate the user's email address.
It uses To header field to get URI of the callee, To header field URI never changes.
Jan.
PS: Please always CC the list.
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
And post it to the FAQ section. Sorry if I am too much demanding.
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Juan J. Sierralta P." juanjo@atmlab.utfsm.cl Cc: serusers@lists.iptel.org Sent: Friday, July 25, 2003 00:32 Subject: Re: [Serusers] Voicemail implementation
Hello, comments inline.
On 24-07 16:45, Juan J. Sierralta P. wrote:
On Thu, 2003-07-24 at 16:17, Jan Janak wrote:
First of all thanks to SER developers for the great work. I'm new to SIP and SER, I been playing with it a week ago and I was able to setup a 0.8.11pre, and now I want to try the voicemail
service.
It seems that I need to run another SER instance for voicemail and redirect the requests to that instance.
No, you can run it on the same server.
It is posible to process the voicemail request on the same instance
I
use to forward/register users ?
Yes.
Or I need a second SER running. In case of 2 SER servers, it is
posible
to run them in the same box using diferent ports and diferent
databases
?
On 25-07 00:03, Director General: NEFACOMP wrote:
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
I don't have a simple config file showing aliases and accounting. Aliases are easy, simply put lookup("aliases"); into your script, it is good to enclose it into something like this:
if (uri==myself) { ... lookup("aliases"); ... };
The condition ensures that the proxy will use the aliases only if the request is targeted to your proxy.
And then you, of course, need to create some aliases (for example using serctl utility).
Regarding accounting, that one is easy too: 1) load acc module 2) put the following into modparam section of your file: modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
And then, when your script is processing a request that you want to account, simply call:
setflag(1); That's it.
Jan.
Trying to use ACC with MySQL stops SER and restarts X.
The message found in the log file (/var/log/messages) is: ===== ser: set_mod_param_regex: parameter <db_url> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_missed_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter .... =====
The parameters db_url, db_flag, dg_missed_flag cannot be found in ACC module.
Will this get solved please? Do you know anyone who uses acc with MySQL and it works??
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Juan J. Sierralta P." juanjo@atmlab.utfsm.cl; serusers@lists.iptel.org Sent: Friday, July 25, 2003 01:05 Subject: Re: [Serusers] Voicemail implementation
On 25-07 00:03, Director General: NEFACOMP wrote:
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
I don't have a simple config file showing aliases and accounting. Aliases are easy, simply put lookup("aliases"); into your script, it is good to enclose it into something like this:
if (uri==myself) { ... lookup("aliases"); ... };
The condition ensures that the proxy will use the aliases only if the request is targeted to your proxy.
And then you, of course, need to create some aliases (for example using serctl utility).
Regarding accounting, that one is easy too:
- load acc module
- put the following into modparam section of your file: modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
And then, when your script is processing a request that you want to
account,
simply call:
setflag(1);
That's it.
Jan.
You have to enable database support in acc (uncomment line #DEFS+=-DSQL_ACC) in sip_router/modules/acc/Makefile and recompile and reinstall the module.
Jan.
On 25-07 16:22, Director General: NEFACOMP wrote:
Trying to use ACC with MySQL stops SER and restarts X.
The message found in the log file (/var/log/messages) is:
ser: set_mod_param_regex: parameter <db_url> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_missed_flag> not found in module
<acc> ser: parse error (65, 58-59): Can't set module parameter .... =====
The parameters db_url, db_flag, dg_missed_flag cannot be found in ACC module.
Will this get solved please? Do you know anyone who uses acc with MySQL and it works??
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Juan J. Sierralta P." juanjo@atmlab.utfsm.cl; serusers@lists.iptel.org Sent: Friday, July 25, 2003 01:05 Subject: Re: [Serusers] Voicemail implementation
On 25-07 00:03, Director General: NEFACOMP wrote:
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
I don't have a simple config file showing aliases and accounting. Aliases are easy, simply put lookup("aliases"); into your script, it is good to enclose it into something like this:
if (uri==myself) { ... lookup("aliases"); ... };
The condition ensures that the proxy will use the aliases only if the request is targeted to your proxy.
And then you, of course, need to create some aliases (for example using serctl utility).
Regarding accounting, that one is easy too:
- load acc module
- put the following into modparam section of your file: modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
And then, when your script is processing a request that you want to
account,
simply call:
setflag(1);
That's it.
Jan.
Where can I get a compiled acc.so with all those features? I am sorry I am not a Linux Guru. Compiling and recompiling caused my MySQL to stop functioning and I lost my data.
I am using RedHat 8.0
Should I download the source? What do you mean by reinstalling the module? Just copying?
Hope I am not too much demanding.
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Jiri Kuthan" jiri@iptel.org; serusers@lists.iptel.org Sent: Friday, July 25, 2003 19:52 Subject: Re: [Serusers] Voicemail implementation
You have to enable database support in acc (uncomment line #DEFS+=-DSQL_ACC) in sip_router/modules/acc/Makefile and recompile and reinstall the module.
Jan.
On 25-07 16:22, Director General: NEFACOMP wrote:
Trying to use ACC with MySQL stops SER and restarts X.
The message found in the log file (/var/log/messages) is:
ser: set_mod_param_regex: parameter <db_url> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_missed_flag> not found in module
<acc> ser: parse error (65, 58-59): Can't set module parameter .... =====
The parameters db_url, db_flag, dg_missed_flag cannot be found in ACC module.
Will this get solved please? Do you know anyone who uses acc with MySQL and it works??
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Juan J. Sierralta P." juanjo@atmlab.utfsm.cl;
Sent: Friday, July 25, 2003 01:05 Subject: Re: [Serusers] Voicemail implementation
On 25-07 00:03, Director General: NEFACOMP wrote:
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
I don't have a simple config file showing aliases and accounting. Aliases are easy, simply put lookup("aliases"); into your script, it
is
good to enclose it into something like this:
if (uri==myself) { ... lookup("aliases"); ... };
The condition ensures that the proxy will use the aliases only if the request is targeted to your proxy.
And then you, of course, need to create some aliases (for example
using
serctl utility).
Regarding accounting, that one is easy too:
- load acc module
- put the following into modparam section of your file: modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
And then, when your script is processing a request that you want to
account,
simply call:
setflag(1);
That's it.
Jan.
What version of ser do you use ? I was speaking about CVS stable version which is not available as a binary package yet, so you will have to recompile it.
Instructions on checking out the cvs tree are here:
Jan.
On 25-07 19:14, Director General: NEFACOMP wrote:
Where can I get a compiled acc.so with all those features? I am sorry I am not a Linux Guru. Compiling and recompiling caused my MySQL to stop functioning and I lost my data.
I am using RedHat 8.0
Should I download the source? What do you mean by reinstalling the module? Just copying?
Hope I am not too much demanding.
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Jiri Kuthan" jiri@iptel.org; serusers@lists.iptel.org Sent: Friday, July 25, 2003 19:52 Subject: Re: [Serusers] Voicemail implementation
You have to enable database support in acc (uncomment line #DEFS+=-DSQL_ACC) in sip_router/modules/acc/Makefile and recompile and reinstall the module.
Jan.
On 25-07 16:22, Director General: NEFACOMP wrote:
Trying to use ACC with MySQL stops SER and restarts X.
The message found in the log file (/var/log/messages) is:
ser: set_mod_param_regex: parameter <db_url> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_missed_flag> not found in module
<acc> ser: parse error (65, 58-59): Can't set module parameter .... =====
The parameters db_url, db_flag, dg_missed_flag cannot be found in ACC module.
Will this get solved please? Do you know anyone who uses acc with MySQL and it works??
Thanks Emery ----- Original Message ----- From: "Jan Janak" jan@iptel.org To: "Director General: NEFACOMP" dg@nefacomp.net Cc: "Juan J. Sierralta P." juanjo@atmlab.utfsm.cl;
Sent: Friday, July 25, 2003 01:05 Subject: Re: [Serusers] Voicemail implementation
On 25-07 00:03, Director General: NEFACOMP wrote:
A file like this one is needed for aliases and accounting to MySQL. (I mean a complete ser.cfg file)
I don't have a simple config file showing aliases and accounting. Aliases are easy, simply put lookup("aliases"); into your script, it
is
good to enclose it into something like this:
if (uri==myself) { ... lookup("aliases"); ... };
The condition ensures that the proxy will use the aliases only if the request is targeted to your proxy.
And then you, of course, need to create some aliases (for example
using
serctl utility).
Regarding accounting, that one is easy too:
- load acc module
- put the following into modparam section of your file: modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
And then, when your script is processing a request that you want to
account,
simply call:
setflag(1);
That's it.
Jan.
On Fri, 2003-07-25 at 09:22, Director General: NEFACOMP wrote:
ser: set_mod_param_regex: parameter <db_url> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_flag> not found in module <acc> ser: parse error (65, 58-59): Can't set module parameter ser: set_mod_param_regex: parameter <db_missed_flag> not found in module
<acc> ser: parse error (65, 58-59): Can't set module parameter .... =====
The parameters db_url, db_flag, dg_missed_flag cannot be found in ACC module.
Will this get solved please? Do you know anyone who uses acc with MySQL and it works??
Recompile the acc module with MySQL support, look at modules/acc/Makefile and uncomment DEFS+=-DSQL_ACC .
On Thu, 2003-07-24 at 17:32, Jan Janak wrote:
A sample config file for a voicemail running within another ser instance is attached. Note that you can also put the snippets of the config into the main proxy config, you need no separate instance.
Thanks !
Correct me if I'm wrong:
- I receive an INVITE for an offline user.
- I detect the offline status and must rewrite the uri in some way to
signal echo,conference or voicemail.
The problem I see if I rewrite the URI the VM will no be able to locate the user's email address.
It uses To header field to get URI of the callee, To header field URI never changes.
Fine, but sometimes the To header comes without prefixes since probably the proxy of another domain added them to the R-URI. Does the missed_acc uses the To HF also ?
Another question: How can I check if the R-URI correspond to one of my subscribers ? (not the registered one) I cannot use lookup() over subscribers table.
PS: Please always CC the list.
Ups ! Sorry Mailman can be setup to set reply-to to the list address.
On 25-07 11:01, Juan J. Sierralta P. wrote:
Fine, but sometimes the To header comes without prefixes since probably the proxy of another domain added them to the R-URI. Does the missed_acc uses the To HF also ?
Sorry, I don't follow now. In our case, the routing proxy does the following:
rewritehostport("your.voicemail.host"); append_hf("P-hint: OFFLINE-VOICEMAIL\r\n"); t_relay();
The routing proxy simply rewrites the hostname part of Request-URI with hostname of the voicemail machine and forward the request there. The other mahine runs the script I sent yesterday.
Another question: How can I check if the R-URI correspond to one of my subscribers ? (not the registered one) I cannot use lookup() over subscribers table.
You can check if hostname part belongs to your proxy, that's what if (uri == myself) does. It compares all hostnames, IPs and alises of the host.
If you want to check if the user in R-URI is really registered (that means if he does exist), you can use does_uri_exist function from uri module. The function checks if the username in R-URI is registered (i.e. it must exist in subscriber table).
PS: Please always CC the list.
Ups ! Sorry Mailman can be setup to set reply-to to the list address.
Yes, I know it, but from time to time people who are not subscribed to the list are brought into a discussion and they wouldn't see replies.
Simply use "group reply" when replying and you're done.
Jan.
On Fri, 2003-07-25 at 11:45, Jan Janak wrote:
Fine, but sometimes the To header comes without prefixes since probably the proxy of another domain added them to the R-URI. Does the missed_acc uses the To HF also ?
Sorry, I don't follow now. In our case, the routing proxy does the following:
I'm not so good explaining myself in english :)
rewritehostport("your.voicemail.host"); append_hf("P-hint: OFFLINE-VOICEMAIL\r\n"); t_relay();
The routing proxy simply rewrites the hostname part of Request-URI with hostname of the voicemail machine and forward the request there. The other mahine runs the script I sent yesterday.
What a I meant was: Since SER checks the To HF to get the user so its email address for voicemail but sometimes the To URI doesn't reflect the real created username in SER DBs, because some SIP Phone called 6389420@xdomain and xdomain proxy prefixed "562" and forwarded to SER since the SER user is 5626389420@serdomain but the To HF says 6389420@xdomain, so the username doesn't match in the DB. And I was wondering if SER used To HF to check if the missed call was for one of its users but I noted that actually it logs every missed call even if the user doesn't exist in the domain, that's why I asked how can I check if the user actually exist in the subscriber table. Thanks for the support.
On 25-07 12:20, Juan J. Sierralta P. wrote:
What a I meant was: Since SER checks the To HF to get the user so its email address for voicemail but sometimes the To URI doesn't reflect the real created username in SER DBs, because some SIP Phone called 6389420@xdomain and xdomain proxy prefixed "562" and forwarded to SER since the SER user is 5626389420@serdomain but the To HF says 6389420@xdomain, so the username doesn't match in the DB. And I was wondering if SER used To HF to check if the missed call was for one of its users but I noted that actually it logs every missed call even if the user doesn't exist in the domain, that's why I asked how can I check if the user actually exist in the subscriber table. Thanks for the support.
Sorry, I was wrong, username from R-URI is taken, not from To, I just looked it up in the sources.
The username part of R-URI will be preserved if you use rewritehostport, the function rewrites just hostname and (optionaly) port number, so voicemail will be still able to get callee's username.
Jan.