Hi,

zhou tianjun wrote:
Hi all,
I'm a beginner with sems and i have make ser and sems work together properly. Because my sip phone can't play any prompting audio in spite of any reply code from ser , so i used announcement app in sems to make the sems play audio to my phone(as caller) when the callee is being busy, and it works fine.
nice.

When i want to record above call-busy event such as call-id, caller/callee name, call time etc to mysql db, i have some trouble, because the sip transaction is processed between ua and sems, ser only relay the INVITE message to sems, and finally sems send BYE message to
if you use record routing, you get all subsequent in-dialog messages through your proxy.

ua. so i think the best way to record above event is using mysql api in sems. Is my solution is
right ?  Can anybody tell me how to realize it ?
you can write a simple DSM script:
-- ---------------------------
import(mod_mysql);
initial state START
 enter {
   mysql.connect(mysql://user:p...@host/db);
mysql.execute(INSERT INTO mytable (callid,caller,callee,callee_user) values (@callid,@remote_uri,@local_uri,@user);

   playFile(busy.wav);
 };

transition "file played" START - noAudioTest / stop(true) -> END;
transition "BYE received" START - hangup / stop(false) -> END;

state END;
-- ---------------------------
of course you should customize that to your needs (play file specially for caller, select language, write more fields into DB etc).

Regards
Stefan


best regard.
by sunny.


------------------------------------------------------------------------

_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems


--
Stefan Sayer
VoIP Services Consulting and Development

Warschauer Str. 24
10243 Berlin

tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]


_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to