Hi,

Антон Загорский wrote:
Hi.

I'm writing a serviceline with IVR, voicemail with pin promt, Fax2Mail and
some other services.
Currently I'm doing this by Python scripting, but many SEMS examples are
written on C++.
Could you please explain me benefits of C++ way? DSM way?
personally, I have used Python ivr only for some proof of concepts, because
 - its way slower
 - takes much more memory
 - it's difficult to debug
- because of the GIL, you can effectively not use multi processor power for application logic processing

and, it was difficult to bring all of the C++ API to ivr.

After doing a lot in plain C++ with the event handlers, and making state machines in every application, I started to write DSM, and have never since wanted to do anything else. - state machines for service logic is what you usually draw in the planning phase of a project anyway, to understand and document how exactly the service should look like - a state machine is the most accurate representation, and you will not miss unforeseen events - you can implement your service much faster (e.g. scripts for a complete voicemail/voicebox system took me 1-2 days) - if you want to have your service improved, you can just change the script, and do live reload on the running server, and voila new calls get the new version - DSMs are reusable - write some small ones (like, number entry etc), and reuse them everywhere (callDSM/jumpFSM) - the C++ code you write for your actions and conditions is reusable, just import the module - the C++ code you write is much simpler to understand and test, because the actions and conditions are not so complex and self-contained; you get a lot less bugs - monitoring the servers is much better - just query the current states of all calls from 'monitoring', and query the full state and transition sequence for those that interest you.

You can also use Python in DSM with mod_py, even though I would not recommend it.

Nowadays, most (if not all) of what you do with C++ with sems you can also do with DSM, and you can do much more with DSM much more easily which you'd need to reimplement in C++. Also, on the application side, this is where most development has happened lately.

Please use the git master version of DSM. There have been a lot of improvements compared to 1.2.

Fax2Mail will be a completely different thing. Have a look at spandsp (www.soft-switch.org), you will find a complete fax library for integration there.


Also, I noticed that if I'll fast press keys, the IVR module will "lost"
some DTMF signals and onDtmf event will not called for all pressed keys. If
I'll write IVR on C++ will I get the same situation?
this was fixed recently. if you are using 1.2.*, try using AmDtmfDetector.cpp / AmDtmfDetector.h of git master. If you are still having problems, please mail me a log compiled with EXCESSIVE_DTMF_DEBUGINFO and a corresponding tcpdump trace.

hth
Stefan





_______________________________________________
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