[asterisk-dev] testsuite CEL pjsua
Matthew Jordan
mjordan at digium.com
Mon Jun 25 09:10:24 CDT 2012
----- Original Message -----
> From: "Marek Cervenka" <cervajs at fpf.slu.cz>
> To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
> Sent: Monday, June 25, 2012 8:52:22 AM
> Subject: [asterisk-dev] testsuite CEL pjsua
>
> hi,
>
> i'm making asterisk testsuite scenario for CEL
If you haven't already found it, you may want to check out the cel module in
the Asterisk Test Suite. Its a relatively recent addition, and, much like the
cdr module, helps to validate CEL entries. For an example of its usage, check
out the iax2/basic-call test.
> i want see some ringtime in CEL ( i cant use pjsua --auto-answer=200)
> is it possible answer the call with
> self.pja.stdin.write("a\n")
> howto "catch" incoming call event in pjsua subprocess?
That is really a function of pjsua, and not the Test Suite. The Test Suite
is merely spawning a pjsua process and interacting with it in the same manner
that you would interact with it if you were doing so in a shell. You may
want to work out what needs to occur to have pjsua act in the fashion that you
want before trying to integrate it with the Test Suite. If you can get it
to behave in the fashion that you want through the interactive console, you
can replicate those actions in the Test Suite by writing to the process you've
spawned in the same fashion.
Alternatively, this may not be a task for pjsua. We've typically used pjsua
when we needed particular SIP transactions that were difficult to orchestrate
with SIPp and wouldn't be appropriate for Asterisk, as the unit under test, to
generate. If all you'd like to do is test out CEL entries, you can probably
achieve this easier if you use two instances of Asterisk - one to generate the
calls, and the other to receive them. This would give you more control over when
things are answered.
> why is not used pjsua python binding in asterisk testsuite?
There actually is a test that uses the pjsua python bindings, channels/SIP/
refer_replaces_to_self. Using the python bindings would be more preferable than
running pjsua as an external process. We have not yet had a chance to go back
and re-work the tests that launch pjsua as an external process to use the python
bindings instead.
> thanks
>
> --
> ---------------------------------------
> Marek Cervenka
> =======================================
>
>
--
Matthew Jordan
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev
mailing list