Hi,
zhou tianjun wrote:
Hi Stefan,
Thanks very much. the DSM script is new to me and it seems powerful. In
your DSM script, does the " import(mod_mysql) " mean that the sems has its
mysql module or API and we can use the db module or api directly ?
this is a DSM module. See the DSM documentation (doc/dsm/*), and the
modules' Readme files (in apps/dsm/mods/*/Readme.* )
see also the DSM examples (unfortunately, so far only small snippets)
in doc/dsm/examples
those simple things work in sems 1.2.1 perfectly, but if you are using
DSM, I would really recommend to use git master version.
As for announcement app, can we make announcement app to accept the
"P-App-Param" to make the announcement app play special file? for example,
announcement app play busy.wav when accept "486" param, play NotFound.wav
when "404" . I know announcement app in current sems can't accept
the "P-App-Param", but is it the right way to rewrite the announcement
usually, you could rewrite the RURI-user to the file you would want to
play (e.g. sip:[email protected]).
app to
support playing different files ?
you can set set_param_variables in dsm.conf:
# set_param_variables controls whether application parameters
# from the P-App-Param header are set as variables in the DSM
# dialog. Default: no
#
set_param_variables=yes
and then you get the variables right from the header in your call. So,
e.g. you have got
P-App-Param: filename=busy.wav; fr_code=486; fr_reason=busy)
then you can do
playFile($filename);
(and also, if you want to do it in early media:
dlg.reply($fr_code, $fr_reason);
have a look at
doc/dsm/examples/early_media.dsm )
Stefan
P.S: please keep the list in the loop.
2010/7/1 Stefan Sayer <[email protected]
<mailto:[email protected]>>
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] <mailto:[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] <mailto:sip%[email protected]>
email/xmpp:[email protected] <mailto:xmpp%[email protected]>
--
With best regards
周 工
------------------------------------------------------------------------------------------------------------
煤炭科学研究总院重庆研究院(国家煤矿安全技术工程研究中心)
地址:重庆市沙坪坝区上桥三村55号 邮编:400037
网址:www.cqccri.com <http://www.cqccri.com>
Chongqing Branch of China Coal Research Institute(National Engineering
Research Center of Mine Safety Technology),No.55,Shangqiao Shapingba
District,Chongqing,China,400037
Cell:15923029791(office mobile) MSN:zhou.tj
<http://zhou.tj>@hotmail.com <http://hotmail.com>
--
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