1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CapiSuite: C/Python wrapper functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
<h1>C/Python wrapper functions</h1>These functions define the python commands you can use in your scripts.
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga0">capisuite_log</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write an informational message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> log. <a href="#ga0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga1">capisuite_error</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write an error message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> error log. <a href="#ga1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga2">capisuite_audio_send</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send an audio file in a speech mode connection. <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga3">capisuite_audio_receive</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Receive an audio file in a speech mode connection. <a href="#ga3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga4">capisuite_fax_receive</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Receive a fax in a fax mode connection. <a href="#ga4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga5">capisuite_fax_send</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send a fax in a fax mode connection. <a href="#ga5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga6">capisuite_disconnect</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disconnect connection. <a href="#ga6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga7">capisuite_reject</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reject an incoming call. <a href="#ga7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga8">capisuite_connect_voice</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Accept an incoming call and connect with voice service. <a href="#ga8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga9">capisuite_connect_faxG3</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Accept an incoming call and connect with fax (analog, group 3) service. <a href="#ga9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga10">capisuite_call_voice</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate an outgoing call with service voice and wait for successful connection. <a href="#ga10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga11">capisuite_call_faxG3</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiate an outgoing call with service faxG3 and wait for successful connection. <a href="#ga11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga12">capisuite_switch_to_faxG3</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Switch a connection from voice mode to fax mode. <a href="#ga12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga13">capisuite_enable_DTMF</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enable recognition of DTMF tones. <a href="#ga13"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga14">capisuite_disable_DTMF</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disable recognition of DTMF tones. <a href="#ga14"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyObject * </td><td class="memItemRight" valign=bottom><a class="el" href="group__python.html#ga15">capisuite_read_DTMF</a> (PyObject *, PyObject *args)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read the received DTMF tones or wait for a certain amount of them. <a href="#ga15"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
These functions define the python commands you can use in your scripts.
<p>
All CapiSuite-commands available in Python will stay in a python module called capisuite. This module and all its functions are defined here.<p>
There's a general scheme for mapping the names of the C wrapper functions to python names:<p>
Python command "capisuite.command()" will be defined in the wrapper function "capisuite_command()".<p>
So you can use this document as reference to all available <a class="el" href="classCapiSuite.html">CapiSuite</a> Python commands. For example, if you read the documentation for the capisuite_audio_send function here, you can use it as capisuite.audio_send in your Python scripts. <hr><h2>Function Documentation</h2>
<a class="anchor" name="ga3" doxytag="capisuitemodule.cpp::capisuite_audio_receive" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_audio_receive </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Receive an audio file in a speech mode connection.
<p>
This functions receives an audio file. It can recognize silence in the signal and timeout after a given period of silence, after a general timeout or after the reception of a DTMF signal.<p>
If the recording was finished because of silence_timeout, the silence will be truncated away.<p>
If DTMF abort is enabled, the command will also abort immediately if DTMF was received before it is called. That allows you to abort subsequent audio receive and send commands with one DTMF signal w/o needing to check for received DTMF after each command.<p>
The connction must be in audio mode (use <a class="el" href="group__python.html#ga8">capisuite_connect_voice()</a>), otherwise an exception will be caused.<p>
The created file will be saved in bit-reversed A-Law format, 8 kHz mono. Use sox to convert it to a normal wav file.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>filename (string)</b> where to save received file</li><li><b>timeout (integer)</b> receive length in seconds (-1 = infinite)</li><li><b>silence_timeout (integer, optional)</b> abort after x seconds of silence (0=off, default)</li><li><b>exit_DTMF (integer, optional)</b> if set to 1, sending is aborted when a DTMF signal is received (0=off, default) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>int containing duration of receive in seconds </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="capisuitemodule.cpp::capisuite_audio_send" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_audio_send </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Send an audio file in a speech mode connection.
<p>
This function sends an audio file. The audio file must be in bit-inversed A-Law format. It can be created for example with sox using the suffix ".la". It supports abortion if DTMF signal is received.<p>
If DTMF abort is enabled, the command will also abort immediately if DTMF was received before it is called. That allows you to abort subsequent audio receive and send commands with one DTMF signal w/o needing to check for received DTMF after each command.<p>
The connction must be in audio mode (use <a class="el" href="group__python.html#ga8">capisuite_connect_voice()</a>), otherwise an exception will be caused.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>filename (string)</b> file to send</li><li><b>exit_DTMF (integer, optional)</b> if set to 1, sending is aborted when a DTMF signal is received (0=off, default) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>int containing duration of send in seconds </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="capisuitemodule.cpp::capisuite_call_faxG3" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_call_faxG3 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Initiate an outgoing call with service faxG3 and wait for successful connection.
<p>
This will initiate an outgoing call and choose fax group 3 as service, so you can use the fax commands (like fax_send and fax_receive) with this connection. After this command has finished, the call is connected successfully or the given timeout has exceeded. The timeout is measured beginning at the moment when the call is signalled (it's "ringing") to the called party.<p>
A python tuple (call,result) is returned by this function. It contains:<ul>
<li><b>call</b> reference to the created call object - use this for subsequent calls like audio_send</li><li><b>result (int)</b> result of the call establishment process.<ul>
<li>0 = connection established</li><li>1 = connection timeout exceeded, no connection was established</li><li>2 = connection wasn't successful and no reason for this failure is available</li><li>0x3301-0x34FF: Error reported by CAPI. For a complete description see the annex of the user manual</li></ul>
</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>capi</b> reference to object of <a class="el" href="classCapi.html">Capi</a> to use (given to the idle function as parameter)</li><li><b>controller (int)</b> ISDN controller ID to use</li><li><b>call_from (string)</b>own number to use</li><li><b>call_to (string)</b>the number to call</li><li><b>timeout (int)</b>timeout to wait for connection establishment in seconds</li><li><b>faxStationID (string)</b>fax station ID</li><li><b>faxHeadline (string)</b> fax headline to print on every page</li><li><b>clir (int, optional)</b>set to 1 to disable sending of own number (0=default) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>tuple (call,result) - see above. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="capisuitemodule.cpp::capisuite_call_voice" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_call_voice </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Initiate an outgoing call with service voice and wait for successful connection.
<p>
This will initiate an outgoing call and choose voice as service, so you can use the audio commands (like audio_receive and audio_send) with this connection. After this command has finished, the call is connected successfully or the given timeout has exceeded. The timeout is measured beginning at the moment when the call is signalled (it's "ringing") to the called party.<p>
A python tuple (call,result) is returned by this function. It contains:<ul>
<li><b>call</b> reference to the created call object - use this for subsequent calls like audio_send</li><li><b>result (int)</b> result of the call establishment process.<ul>
<li>0 = connection established</li><li>1 = connection timeout exceeded, no connection was established</li><li>2 = connection wasn't successful and no reason for this failure is available</li><li>0x3301-0x34FF: Error reported by CAPI. For a complete description see the annex of the user manual</li></ul>
</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>capi</b> reference to object of <a class="el" href="classCapi.html">Capi</a> to use (given to the idle function as parameter)</li><li><b>controller (int)</b> ISDN controller ID to use</li><li><b>call_from (string)</b>own number to use</li><li><b>call_to (string)</b>the number to call</li><li><b>timeout (int)</b>timeout to wait for connection establishment in seconds</li><li><b>clir (int, optional)</b>set to 1 to disable sending of own number (0=default) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>tuple (call,result) - see above. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="capisuitemodule.cpp::capisuite_connect_faxG3" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_connect_faxG3 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Accept an incoming call and connect with fax (analog, group 3) service.
<p>
This will accept an incoming call and choose fax group 3 as service, so you can use the fax commands (like fax_receive) with this connection. After this command has finished, the call is connected successfully.<p>
It's also possible to accept a call with some delay. This is for example useful if you want to have the chance to get a call with your phone before your computer answers it.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>faxStationID (string)</b> the station ID to use</li><li><b>faxHeadline (string)</b> the fax headline to use</li><li><b>delay (integer, optional)</b> delay in seconds _before_ connection will be established (default: 0=immediate connect) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>If faxInfo is available, a tuple (stationID,rate,hiRes,format) otherwise None. Tuple contains:<ul>
<li>fax station ID from the calling party (String)</li><li>bit rate which was used for connecting</li><li>high (1) or low (0) resolution</li><li>transmit format: 0=SFF,black&white, 1=ColorJPEG </li></ul>
</dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="capisuitemodule.cpp::capisuite_connect_voice" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_connect_voice </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Accept an incoming call and connect with voice service.
<p>
This will accept an incoming call and choose voice as service, so you can use the audio commands (like audio_receive and audio_send) with this connection. After this command has finished, the call is connected successfully.<p>
It's also possible to accept a call with some delay. This is for example useful for an answering machine if you want to have the chance to get a call with your phone before your computer answers it.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>delay (integer, optional)</b> delay in seconds _before_ connection will be established (default: 0=immediate connect) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga14" doxytag="capisuitemodule.cpp::capisuite_disable_DTMF" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_disable_DTMF </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Disable recognition of DTMF tones.
<p>
You can disable the recognition of DTMF tones again if you want to.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="capisuitemodule.cpp::capisuite_disconnect" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_disconnect </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Disconnect connection.
<p>
This will cause an immediate disconnection. It should be always the last command in every flow of a script. It will return a tuple of two result values. The first is the disconnect cause of the physical connection, the second the disconnect cause of the logical connection. See CAPI spec for the logical causes and ETS 300 102-01 for the physical causes.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Tuple containing (ReasonPhysical,ReasonLogical) </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga13" doxytag="capisuitemodule.cpp::capisuite_enable_DTMF" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_enable_DTMF </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Enable recognition of DTMF tones.
<p>
You have to enable the recognition of DTMF tones if you want to use them in your script.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="capisuitemodule.cpp::capisuite_error" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_error </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Write an error message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> error log.
<p>
This function writes a message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> error log. It should be used to output error messages so they appear in the normal error log.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameter:<ul>
<li><b>message (string)</b> the log message </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="capisuitemodule.cpp::capisuite_fax_receive" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_fax_receive </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Receive a fax in a fax mode connection.
<p>
This command receives an analog fax (fax group 3). It starts the reception and waits for the end of the connection. So it should be the last command before capisuite_disconnect.<p>
The connction must be in fax mode (use capisuite_connect_faxG3 or capisuite_switch_to_faxG3), otherwise an exception will be caused.<p>
The created file will be saved in the Structured Fax File (SFF) format.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>filename (string)</b> where to save received fax </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="capisuitemodule.cpp::capisuite_fax_send" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_fax_send </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Send a fax in a fax mode connection.
<p>
This command sends an analog fax (fax group 3). It starts the send and waits for the end of the connection. So it should be the last command before capisuite_disconnect.<p>
The connction must be in fax mode (use capisuite_call_faxG3 or capisuite_switch_to_faxG3), otherwise an exception will be caused.<p>
The created file will be saved in the Structured Fax File (SFF) format.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>filename (string)</b> file to send </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga0" doxytag="capisuitemodule.cpp::capisuite_log" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_log </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Write an informational message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> log.
<p>
This function writes a message to the <a class="el" href="classCapiSuite.html">CapiSuite</a> log. It's helpful if you want to write messages in the debug log in your scripts.<p>
The message can be either logged with the general <a class="el" href="classCapiSuite.html">CapiSuite</a> prefix if they are of global nature or with the <a class="el" href="classConnection.html">Connection</a> prefix if they're associated with a special connection.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>message (string)</b> the log message</li><li><b>level (integer)</b> parameter for log_level</li><li><b>call (optional)</b> call reference - if given, the message is logged with <a class="el" href="classConnection.html">Connection</a> prefix </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga15" doxytag="capisuitemodule.cpp::capisuite_read_DTMF" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_read_DTMF </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Read the received DTMF tones or wait for a certain amount of them.
<p>
This function allows to just read in the DTMF tones which were already received. But it also supports to wait for a certain amount of DTMF tones if you want the user to always input some digits at a certain step in your script.<p>
You can specify how much DTMF tones you want in several ways - see the parameter description. To just see if something was entered before, use capisuite.read_DTMF(0). If you want to get at least 1 and mostly 4 digits and want to wait 5 seconds for additional digits, you'll use capisuite.read_DTMF(5,1,4).<p>
Valid DTMF characters are '0'...'9','A'...'D' and two special fax tones: 'X' (CNG), 'Y' (CED)<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>timeout (integer)</b> timeout in seconds after which reading is terminated, only applied when min_digits are reached! (-1 = infinite)</li><li><b>min_digits (integer, optional)</b> minimum number of digits which must be read in ANY case, i.e. timout doesn't count here (default: 0)</li><li><b>max_digits (integer, optional)</b> maximum number of digits to read (aborts immediately if this number is reached) (0=infinite, i.e. only timeout counts, default) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>python string containing the received DTMF characters </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="capisuitemodule.cpp::capisuite_reject" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_reject </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Reject an incoming call.
<p>
If you don't want to accept an incoming call for any reason (e.g. if it has a service or comes from a number you don't want to accept), use this command. There are several reasons you can give when rejecting a call. Some important ones are:<ul>
<li>1=ignore call</li><li>2=normal call clearing</li><li>3=user busy</li><li>7=incompatible destination</li><li>8=destination out of order</li><li>0x34A9=temporary failure</li></ul>
<p>
You can find many more reasons in the ETS 300 201-01 specification or on the web (search for ISDN cause) if you really need them.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>rejectCause (integer)</b> which cause to signal when rejecting call (see above) </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga12" doxytag="capisuitemodule.cpp::capisuite_switch_to_faxG3" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> PyObject* capisuite_switch_to_faxG3 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">PyObject * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>PyObject * </td>
<td class="mdname" nowrap> <em>args</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Switch a connection from voice mode to fax mode.
<p>
This will switch from voice mode to fax group 3 after you have connected, so you can use the fax commands afterwards.<p>
<em><b>Attention:</b></em> This command isn't supported by every ISDN card / CAPI driver!<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>args</em> </td><td>Contains the python parameters. These are:<ul>
<li><b>call</b> Reference to the current call</li><li><b>faxStationID (string)</b> the station ID to use</li><li><b>faxHeadline (string)</b> the fax headline to use </li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>If faxInfo is available, a tuple (stationID,rate,hiRes,format) otherwise None. Tuple contains:<ul>
<li>fax station ID from the calling party (String)</li><li>bit rate which was used for connecting</li><li>high (1) or low (0) resolution</li><li>transmit format: 0=SFF,black&white, 1=ColorJPEG </li></ul>
</dd></dl>
</td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Nov 28 14:37:45 2004 for CapiSuite by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>
|