I want to check the phone call status with ADB.
the thread Checking the status of a phone call remotely helped, but it only indicate if phone is idle/ringing/active.
I need to get different status code when i dial a call and when next person accepts the call. But above shell command is returning mCallState=2 in both the cases.
Do we have any shell command which return different status when i dial a call and when next person accepts the call ?
Related
I am writing a program for printing images and I can't seem to find a way to check the print job status. I know about the lpstat -W completed and lpstat -W not-completed commands but they don't actually show if the job was successful or not, they show if the job is in queue. For example, if the job failed because there is no ink or papers, the job would be listed as completed. Is there anything i can do to check the status? My printer is Samsung SCX-4300
Thanks in advance
How can I apply queue call confirm in Asterisk using the files .conf
For example:
The client call to the ext 100
two agents could receive the call
one of them take it
The agent listen the announce that say "The call is for sales, 1 to accept the call or 0 to not
If the agent say yes, receive the call
If the agent say no, the call is ringing to the other agent
Could somebody help me?
You can do that via call privacy macro.
In freepbx you have that option in web. If you use plain asterisk you should use M(macroname) param for Dial command and create correct context yourself.
http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
I'm trying to build a python client to interact with my C server. Here's the code for the client:
import socket
s = socket.socket()
s.connect(("127.0.0.1", 12209))
print "preparing to send"
s.send("2")
s.send("mmm2.com")
s.send("mypwd")
s.send("5120")
print "Sent data"
root = s.recv(256)
print root
When I run this code on the interactive shell (the GUI IDLE) of course line by line, everything runs very fine. But when i save this code in a file and try to run it, it hangs and stops responding according to windows, what's it that I'm just not doing?
If you type it line by line, the sent strings are likely received by the server one after another in separate recv() calls.
When you execute it in a script, all the send() calls run immediately after each other without delay and the server will probably receive all the data in one bulk in a single recv() call. So the server will see "2mmm2.commypwd5120", and maybe not handle that correctly. It might wait for more input from the client.
You will need some explicit separation between the values, for example newline characters, so that the server can parse the received data correctly.
I'm writing a user daemon and when the user logs on, I want to make sure that the user is the one who started the daemon. Reason is, that I need some way of running commands which can take a lot of time. Using nohup for this has some drawbacks, like I can not interact with the process anymore, so the daemon should watch these processes and allow me to interact with them.
The problem now is, how can I verify the password, as the user will not have permission to read the shadowfile and the /etc/passwd passwort is not set.
You could use the PAM to check the user / passwd. It's also present in Unix systems. You should check the interfaces which are implemented in HPUX.
https://www.ibm.com/developerworks/linux/library/l-pam/
Im not sure on how to do daemons, but I do know that in C, all you would have to do is, create a string and check whether or not that is what the user types in.
have it accept what the user sets:
// accept
printf("1. login \n 2. create information ");
this gives them the option, then switch the options, case 1 being the information for logging in, and then case 2 being the option that allows them to type in the information, and you saving it in something to be read later, and determining if it already created or not.
Hope this helps!
I recently notice that in my mobile phone wifi settings, there is a DLNA auto-ip option that's already checked. As its description : "Check to use DLNA when no DHCP server is available",
I found that's something the same as APIPA mechanism: "With APIPA (Automatic Private IP Addressing), DHCP clients can automatically self-configure an IP address and subnet mask when a DHCP server isn't available."
What's DLNA meant here and what are the differences between DLNA and APIPA?
Due to the DLNA specification, we have to support auto-IP when
there is no DHCP server.
"dhcpcd" is used by android and it supports auto-IP, but there are 2
designs
inside framework make auto-IP not available.
1. wireless manager timeout is the same as default DHCP discover
timeout.(30s)
2. dhcpcd will set failed property when get auto-IP
We have tried following methods to modify dhcpcd.
1. Using property system
a. When DLNA is on, set property to note its status.
b. dhcpcd reads status property. When status is on, set default DHCP
discover timeout to 10s.
c. Script reads status property. When status is on, set result
property to "ok" for IPv4LL case.
Property system is not for general applications. Thus we can not
accomplish step a.
2-1. Write status file
a. When DLNA is on, write status file in the application folder.
b. dhcpcd read status file. When status is on, set default DHCP
discover timeout to 10s.
c. script read status file. When status is on, set result property
to "ok" for IPv4LL case.
The step c is a script, if condition and file access always cause
error. So we make a change again.
2-2. Write status file and create a new reason for dhcpcd
a. When DLNA is on, write status file in the application folder.
b. dhcpcd read status file. When status is on, set default DHCP
discover timeout to 10s.
c. dhcpcd read status file. When status is on, set reason to new
created one. The case in script is alwayse set result property to
"ok".