Please see reply's inline...
-----Original Message----- From: GR S [mailto:gr_sh2003@yahoo.com] Sent: 29 July 2004 02:01 To: Dave Bath Cc: serusers@lists.iptel.org Subject: RE: [Serusers] Asterisks to ser to asterisk (voicemail)
Dave,
--- Dave Bath dave@fuuz.com wrote:
Hey Girish,
<snip>
Ser always pass it the format it's expecting... there must be way to
do
a lookup(alias) and then re-write the URI with the alias before it
gets
forwarded.?
I am sorry. I haven't used 'aliases' and MSILO module. So my knowledge is very limited on using these features. We also have a setup somewhat similer to what you had described, but we have a plug-in for SER from which we fetch the records from the database, modify the uri and send it to Asterisk. This works fine for us and as you said, the ${EXTEN} in Asterisk dialplan handles all such numbers.
Hmm... what do you mean about fetching from the database? I am using the mysql module and have the subscribers and aliases stored in the database... it sounds like I want to do exactly what you are doing - lookup the alias in the database and then modify the URI. Do you have any advice as to how you are doing this?
Sorry if my explanation about the 404 is confusing... it's confusing
for
me too! Attached is the ser.cfg (I hope it retains the indentation!)
From your ser.cfg:
if ((method=="INVITE" || method=="ACK") && t_newtran() ) { t_reply("404", "Not Found");
I think this is why you get the 404 message failure route. Instead try this:
if ((method == .... { t_on_failure("4"); t_relay(); break; }
Thanks - I'll try this! Although I'll need to check to make sure that I still do cope with true 404 errors.
Thanks for all the help,
D
Dave
Best Regards,
===== Girish Gopinath gr_sh2003@yahoo.com
_______________________________ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com
Hi Dave,
--- Dave Bath dave@fuuz.com wrote:
Please see reply's inline...
<snip>
Hmm... what do you mean about fetching from the database? I am using the mysql module and have the subscribers and aliases stored in the database... it sounds like I want to do exactly what you are doing - lookup the alias in the database and then modify the URI. Do you have any advice as to how you are doing this?
We wrote a small loadable module for SER and we have exported parameters and methods from the module. So when an INVITE comes, we call those methods and the URI is modified depending on the values in the database. Then SER t_relays/forwards the call to the specified destination in the URI. So far it has been serving our needs. The following lines will give you an idea of this:
ser.cfg:
loadmodule "/usr/local/lib/ser/modules/ourmodule.so" modparam ("ourmodule", "media_server", "192.168.68.10:5070")
and when we receive calls:
if (uri =~ "sip:1[0-9]{10}@*") { #Method form the module if (! get_extension ("1") { sl_send_reply ("404", "Not Found!"); break; }
t_on_failure ("2"); t_relay(); break }
SER Developers guide will give you a better idea of how to do this. Pls checkout this URL: http://www.iptel.org/ser/doc/serdev/serdev.html
Hope that helps...
===== Girish Gopinath gr_sh2003@yahoo.com
__________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail