[SIP SIMPLE client] Possible changes to use SIPclient in testcases?
Jacob Svensson
jaqob84 at gmail.com
Wed Jan 28 12:54:07 CET 2009
Hello
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
sip_im_message.py
diff build/scripts-2.5/sip_im_session /usr/bin/sip_im_session
211c211
< def __init__(self, acceptor, console, session_factory, ringer=None):
---
> def __init__(self, acceptor, console, session_factory, ringer=None, auto_accept=False):
213a214
> self.auto_accept = auto_accept
234a236,237
> if self.auto_accept:
> return True
324c327
< auto_accept_files=False, route=None, relay=None,
msrp_tls=True):
---
> auto_accept_files=False, auto_accept_chat_requests=False, route=None, relay=None, msrp_tls=True):
331a335
> self.auto_accept_chat_requests = auto_accept_chat_requests
458c462
< 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)
522a527
> 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