Added two examples
This commit is contained in:
30
README.md
30
README.md
@@ -29,3 +29,33 @@ from the last hour
|
||||
All files contain "USER", "PASS".
|
||||
These values should be replaced by real credentials.
|
||||
Otherwise the connection fails.
|
||||
|
||||
## Examples
|
||||
|
||||
### Library
|
||||
|
||||
``` python
|
||||
from lmwsip import LmwSip
|
||||
|
||||
lmwsip = LmwSip(ssl=True, host="sip-lmw.ad.rws.nl", port=443)
|
||||
lmwsip.send("LI user,pass\r")
|
||||
print("< [%s]" % (lmwsip.recv().strip('\r')))
|
||||
lmwsip.send("TI LMW\r")
|
||||
print("< [%s]" % (lmwsip.recv().strip('\r')))
|
||||
lmwsip.send("LO\r")
|
||||
print("< [%s]" % (lmwsip.recv().strip('\r')))
|
||||
```
|
||||
|
||||
### siprun
|
||||
|
||||
```
|
||||
$ ./siprun -h sip-lmw.ad.rws.nl -s -p 443 hoek-h10.sip
|
||||
> [LI USER,PASS]
|
||||
< [! ]
|
||||
> [TI LMW]
|
||||
< [! 05-SEP-19 08:24:43]
|
||||
> [WN LMW,HOEK,H10,-25:00,05-09-2019,08:10,DATA]
|
||||
< [? 0211 Waarnemingen vallen buiten opslag range]
|
||||
> [LO]
|
||||
< [! ]
|
||||
```
|
||||
|
Reference in New Issue
Block a user