Is this a question or tip for others on how to achieve what you want?
You are doing something unconventional here. Why modify sems' code and the db structure when you can do what you want with the current ser/sems with suitable routing logic.
I always lookup the aliases to find the "real" user id and forward to that user id's voicemail. Other people on the list will likely follow the same logic. You may have a hard time getting response from others. Not that you are doing anything wrong with your method but I don't see many people would follow your way.
Zeus
-----Original Message----- From: serusers-bounces@lists.iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of harry gaillac Sent: Tuesday, 26 July 2005 8:39 PM To: harry gaillac Cc: serusers@lists.iptel.org; sems@lists.iptel.org Subject: [Serusers] accounting
Hello,
If somebody is interested to send voicemessages to both user account and their aliases: sip:alice@mydomain or sip:123456789@mydomain or sip:s.alice@mydomain for example.
I add in AnswerMachine.cpp file (voicemail module): ////////////////////////////////////////////////////// if(AmConfig::SendMethod == "fifo"){
DBG("`P-Email-Address' has not been found:
trying fifo db\n");
SerDBQuery email_query("aliases"); email_query.addKey("email_address"); email_query.addWhereClause("username = \"" +
cmd.user + """);
int query_res = email_query.execute(); if(query_res < 0) ERROR("voicemail: error while fetching
user's email address"); else if(query_res > 0) { cmd.email = email_query.getVal(0,0); DBG("email address for user '%s': <%s>\n", cmd.user.c_str(),cmd.email.c_str()); } } /////////////////////////////////////////////////////// i added column email-address in aliases table:
/////////////////////////////////////////////////////// mysql> select * from aliases; +----------+------------+----------------------+-------------- ---------+----------+---------------------+------+------------
------------------------------------------------> ---------+------+----------------+-----------+-------+-------+
-------------------------+ | username | domain | contact | email_address | received | expires | q | callid | cseq | last_modified | replicate | state | flags | user_agent | +----------+------------+----------------------+-------------- ---------+----------+---------------------+------+------------
------------------------------------------------> ---------+------+----------------+-----------+-------+-------+
-------------------------+ | 85 | nxs.yi.org | sip:bob@nxs.yi.org | gaillacharry@yahoo.fr | NULL | 2005-07-24 18:08:41 | 1.00 | The-Answer-To-The-Ultimate-Question-Of-Life-Universe-And-Everything | 42 | 20050725153201 | 0 | 0 | 128 | SIP Express Router FIFO | | 84 | nxs.yi.org | sip:alice@nxs.yi.org | gaillacharry@yahoo.fr | NULL | 2005-07-24 18:09:19 | 1.00 | The-Answer-To-The-Ultimate-Question-Of-Life-Universe-And-Everything | 42 | 20050725153232 | 0 | 0 | 128 | SIP Express Router FIFO | +----------+------------+----------------------+-------------- ---------+----------+---------------------+------+------------
------------------------------------------------> ---------+------+----------------+-----------+-------+-------+
-------------------------+ 2 rows in set (0.00 sec) ///////////////////////////////////////////////////////
--- harry gaillac gaillacharry@yahoo.fr a écrit :
Hello,
I use ser/serweb-0.9.3 I added tow accounts with numerical aliases. When I dial user1@domain to user2@domain it's ok. if i wish to forward to voicemail sems send me
back
voicemessages. However if i dial alias1@domain to alias2@domain I get
the message below.
How can I solve this problem ?
Harry
______________________________________________________________ _____________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers