[SIP SIMPLE client] Possible changes to use SIPclient in testcases?

Jacob Svensson jaqob84 at gmail.com
Wed Jan 28 12:54:07 CET 2009


I have some questions, or wishes, related to the possibility to use
sipclient in an automated test environment.
Its mainly the sip_im_message testcase I am interested in.

1. Would it be possible to have a commandline parameter to auto accept
incoming requests. I think this one should be easy. I started working
on a patch, but i have to admit that I don't really understand the
parse_options part. (Dont know python). I include the needed parts for

diff build/scripts-2.5/sip_im_session /usr/bin/sip_im_session
<     def __init__(self, acceptor, console, session_factory, ringer=None):
>     def __init__(self, acceptor, console, session_factory, ringer=None, auto_accept=False):
>         self.auto_accept = auto_accept
>         if self.auto_accept:
>             return True
<                  auto_accept_files=False, route=None, relay=None,
>                  auto_accept_files=False, auto_accept_chat_requests=False, route=None, relay=None, msrp_tls=True):
>         self.auto_accept_chat_requests = auto_accept_chat_requests
<         chat = IncomingChatHandler(get_acceptor, self.console,
new_chat_session, inbound_ringer)
>         chat = IncomingChatHandler(get_acceptor, self.console, new_chat_session, inbound_ringer, auto_accept=self.auto_accept_chat_requests)
>                                   options.auto_accept_chat_requests,

When looking in config.py, there is an outcommented line that looks
like something like this has been considered.
 #parser.add_option("-y", '--auto-accept-all', action='store_true',
default=False, help=SUPPRESS_HELP)

2. A command line parameter that makes the server just echo the
messages from the client.

Then a simple question about the functionality. How do you do to send
files in the sip_im_message testcase? The --auto-accept-files flag
suggest that it should be possible, but i cant find any examples.

Thanks for your great work!

Best Regards
Jacob Svensson

More information about the SIPBeyondVoIP mailing list