[Sems] [Serusers] accounting
harry gaillac
gaillacharry at yahoo.fr
Sun Aug 7 00:20:33 CEST 2005
Hello,
You solution don't solve my problem !
I can't do what i expect with ser+serweb+sems with
your solution.
I want any account like username/password may received
calls from PSTN so I use aliases table + email_address
column.
I use serweb "forward to voicemail" features but
voicemail module just query subscriber table so I
can't forward call to voicemail .
I set to "lookup("aliases")" in route blocks too.
I want to set accounts like this
account: username/password where username=alice
=> sip:alice at domain
=> sip:123456 at domain (aliase)
=> sip:s.alice at domain (aliase)
Thanks for help if somebody could povide a shortest
way
Regards
Harry
--- Stefan Sayer <sayer at fokus.fraunhofer.de> a écrit :
>
> hello,
>
> if you really want to do that in sems (for whatever
> reason) and if you
> have the same email address for the user in
> subscriber and aliases
> table you probably can do the same without modifying
> the DB by joining
> the two tables (assuming USERCOL = "username"):
>
> select subscriber.email_address from (subscriber
> join aliases on
> subscriber.username = aliases.username and
> subscriber.domain =
> aliases.domain) where aliases.username = cmd.user
>
> (not 100%sure about whether sql syntax is correct -
> do we need the
> brackets?)
>
> which would translate into
> ...
> SerDBQuery email_query("(subscriber join
> aliases on
> subscriber.username = aliases.username and
> subscriber.domain =
> aliases.domain)");
>
> email_query.addKey("subscriber.email_address");
>
> email_query.addWhereClause("aliases.username = \"" +
> cmd.user + "\"");
>
> int query_res = email_query.execute();
> ...
>
>
> Stefan
>
> harry gaillac wrote:
> > Hello,
> >
> > If somebody is interested to send voicemessages to
> > both user account and their aliases:
> > sip:alice at mydomain or sip:123456789 at mydomain or
> > sip:s.alice at 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 at nxs.yi.org |
> > gaillacharry at 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 at nxs.yi.org |
> > gaillacharry at 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 at yahoo.fr> a écrit
> :
> >>
> >>
> >>>Hello,
> >>>
> >>>I use ser/serweb-0.9.3 I added tow accounts with
> >>>numerical aliases.
> >>>When I dial user1 at domain to user2 at domain it's ok.
> >>>if i wish to forward to voicemail sems send me
> >>
> >>back
> >>
> >>>voicemessages.
> >>>However if i dial alias1 at domain to alias2 at 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
> >
> > _______________________________________________
> > Sems mailing list
> > sems at lists.iptel.org
> >
> http://lists.iptel.org/cgi-bin/mailman/listinfo/sems
> >
>
>
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
More information about the sr-users
mailing list