Re: How to end outgoing voice call in python

Michal Čihař <[email protected]> Thu, 30 Mar 2017 11:36:53 +0200
Newsgroups gmane.linux.drivers.gammu
Message-ID <[email protected]>
Sylvain píše v Čt 30. 03. 2017 v 11:24 +0200:
> Le 30/03/2017 à 10:35, Michal Čihař a écrit :
> > Hi
> > 
> > Sylvain píše v St 29. 03. 2017 v 18:29 +0200:
> > > I'm trying to make a program in python using gammu 1.37.4
> > > installed
> > > on
> > > ubuntu 16.04. The device I use is a Huawei E180 modem.
> > > 
> > > I'm able to start a voice call with dialVoice, but I can't figure
> > > out
> > > how to stop or hang-up the call. I tried with Abort and Terminate
> > > but
> > > it
> > > doesn't work, my program continues but the voice call is still
> > > active.
> > > Almost all call related functions are for incoming calls.
> > > 
> > > Is it doable in python? Any pointers?
> > 
> > CancelCall should do that:
> > 
> > https://wammu.eu/docs/manual/python/gammu.html#gammu.StateMachine.C
> > ance
> > lCall
> > 
> 
> I tried but it requires the ID of the call as parameter but
> DialVoice 
> only returns None. I see a lot of functions that use the ID of the
> call 
> as parameter but none that returns it. How can I get the call ID?

Use anything as call ID and pass True as second parameter. That should
do it.

-- 
	Michal Čihař | https://cihar.com/ | https://weblate.org/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh+Zzr4P2w6DDRMjD9KoinU1YwkUFAljc0bUACgkQ9KoinU1Y
wkVuEA/5AQ+rOgm5qXNn+Oh8xC3tAeySIjaNKZHljktx+GkgqLeFsqHgmd5YWReK
HiEed5uOlWBf+IVZ5ihJqTHRrMPweoi2ms/HpWNXzzGxiY1lDE9/09sZbj27yRR+
gTpGpmYC5C6GlpapZEPtXFTI9wh9qK4JOYlK62JvcSOZeWofNus8ZvTF1Q0ZaYZd
BhsZmS6iyj+P20gEGVVeGD+cVLo3fbCCNx459eccWIqnhaoXRimg/cG6vlTp0b9U
TSueCc476Anhw6X/rY2LIVLFEdr8fs34xFyefDkg9TdmAkZYBqiFRCR+zxX18cW8
n6NXZLViPD3t4MsGNV6bY3JGOGHtO/eN5Ayf4MAkWpuTrSMFATxLbsNYgpMusEAW
a6ugMNFzyOC/qtFHBbbvIISwS4rXnhh1mOig0DRDPFUOCxjvKRUmRb5nYvnBr1HF
eOro9YNchcn4KAqBdzh2sCmh5VfYAXRM6oXQ9M1+aEO6P9Y8UzROct0TcBM6zNtc
FtzIYaPTW9blJydjYpZV7Jz15netS55NVflYUIHnmPQjjTUrzqIwanjoCqMtIDqr
tjotwTOvO3ZoO83o41SLEkzyweUdapdoKcC8uFl4MNRMGFPfpZZsdyXXHSs6VkuG
c3ji47zeE8z2Fn47tF19ysWTsjO7IgUeSoltkZ2vrs24c1XlS2I=
=89xr
-----END PGP SIGNATURE-----