Hello I tried it and got the following exception Unhandled exception in thread started by <function _worker_thread_main at 0x9b119cc> Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/pjsua.py", line 2807, in _worker_thread_main time.sleep(0.050) File "/usr/local/lib/python2.6/dist-packages/pjsua.py", line 2754, in _cb_on_call_state _lib._cb_on_call_state(call_id) File "/usr/local/lib/python2.6/dist-packages/pjsua.py", line 2652, in _cb_on_call_state if call: File "/usr/local/lib/python2.6/dist-packages/pjsua.py", line 2760, in _cb_on_call_media_state _lib._cb_on_call_media_state(call_id) File "/usr/local/lib/python2.6/dist-packages/pjsua.py", line 2665, in _cb_on_call_media_state call._cb.on_media_state() File "firstTry.py", line 41, in on_media_state if self.call.info().media_state == pj.MediaState.ACTIVE: NameError: global name 'pj' is not defined Any ideas? -----Mensagem original----- De: pjsip-bounces at lists.pjsip.org [mailto:pjsip-bounces at lists.pjsip.org] Em nome de Sa?l Ibarra Enviada: sexta-feira, 14 de Agosto de 2009 10:37 Para: pjsip list Assunto: Re: [pjsip] a few questions On Fri, Aug 14, 2009 at 11:28 AM, Tiago Ferreira<maiaboy at hotmail.com> wrote: > Hello, > > > > I just started using pjsip in python and I was wondering if you could answer > me a few questions. > > > > 1: I tried sending audio with a wave file but I had no success thus far. Can > anyone show me a simple audio tutorial or code sample for python? > Try this: player = self.core.lib.create_player("/tmp/ring.wav", True) lib.conf_connect(lib.player_get_slot(player), 0) > > > 2: I am starting to implement a small script that registers to a server, > answers calls and receives DTMF signals and acts according to what he > received. Bui I just saw the FAQ and from what I understood, using pjsip I > can?t interpret the received DTMF signals, is this true? > I don't think you are able to interpret DTMF tones from the Python API... Regards, -- /Sa?l http://www.saghul.net | http://www.sipdoc.net _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org