[Serusers] Implementing Voicemail

Jiri Kuthan jiri at iptel.org
Wed Sep 10 20:01:07 CEST 2003


At 07:29 PM 9/10/2003, Steve Dolloff wrote:
>I'm sure this is pretty straightforward to some of you, but I could use
>some help with a few issues if someone has the time.  Below is my config
>file. This is running on RedHat 9.
>
>I am having numerous problems.  
>
>1) Having issues with correctly increasing the number of children.  If I
>increase it, it fails because it can't connect with mysql.  I have tried
>increasing the number of connections in mysql in the my.cnf file, but it
>seems to cause even more problems.

Number of mysql connections grows linearly with number of children. We will
certainly put effort in keeping the number of connections lower by reusing
them, but it is not outthere yet. Keep children count low (very wise advice
which will save you lot of money in general :)) or mysql connections high.

What problems do you have with high number of connections in my.cnf?

>2) I only want the call to fail to route 2 for calls that terminate in
>my network.  I don't want calls leaving the network to try to go to
>voicemail after the time hits.

Sure. What is the question, script? If so, that's easy: set t_on_failure 
only from within the uri==myself condition.

Actually, most of your script should be within this condition. If
a request for other domain comes (i.e., uri==msyelf does not hold),
you just forward using t_relay and that's it. All the script processing,
uri rewriting, redirection makes only sense if you "own" the request.

For example, now if someone from your domain calls some other domain's
sip:voicemail+foo at somewhereelse.com, you will mistakenly process the
request too with your current script. That's called domain hijacking :)
So you want to have all the voicemail stuff, failure handling, etc. 
inside (uri==myself). 


>3) I can't seem to figure out how to format the rewrite/append/etc to
>trigger the voicemail call.  Maybe I don't understand the routing loop.
>Can someone take a look at the config and give me some ideas?

The "user-offline" part is I guess ok. There are some nits though:
- you ignore non-VoIP messages to off-line users -- is an instant
  MESSAGE comes, you just break. you should indicate the status
  sip-wise instead. Use sl_send_reply("404","not found");
- I don't know what the append_branch in your script is good for,
  but I don't think you need it.


>4) The append to the null/parallel destination that allows the trigger
>to activate I don't understand at all.  Why does it need to be there?
>Where should it be pointed to?

append_branch does not need be there where you inserted it.

>5) I'm not seeing the activity/routing logs going anywhere.  If I run
>ser manually, I see information on the stderr, but nothing in the
>database or logs in terms of the connections.

If you start manually, force messages and see them on your console,
then everything is all right, isn't it? If you start from an init
script and keep forcing use of stderr, you will obviously will not
see anything -- you need to turn stderr off and watch syslog output.

Let us know as you get to the next iteration.

-Jiri 




More information about the sr-users mailing list