[SIP Beyond VoIP] Redirecting sip-publish-presence stdout

Owen Lynch owen.lynch at paragon.co.nz
Thu Sep 27 06:43:40 CEST 2012


I discovered pexpect which solves the general problem of running
interactive scripts.

Thanks,
Owen

On 26 September 2012 19:25, Adrian Georgescu <ag at ag-projects.com> wrote:

> That script is designed to work interactive in the console to allow input
> of user commands to change the published info. It is not likely to work the
> way you expect without modifications.
>
> Regards,
> Adrian
>
> On Sep 26, 2012, at 6:38 AM, Owen Lynch wrote:
>
> > Hi,
> >
> > I would like to use sip-publish-presence (and other commands) as python
> sub processes and parse the output. However sip-publish-presence blocks
> after writing 4K when output is directed anywhere but the console. Is there
> a way to prevent this?
> >
> > sip-publish-presence -s -a <account>
> > This works OK, it displays all the initial PUBLISH messages  - output is
> >4K because of digest authentication challenges. Then it waits for user
> input.
> >
> > sip-publish-presence -s -a <account> >logfile
> > This does not work OK, it writes only the first 4K of the initial
> PUBLISH messages. Then it waits for user input. The remainder of the
> initial PUBLISH messages is written after a user enters a command.
> >
> > Could this be fixed by flushing stdout after writes, somewhere in the
> SIP core engine?
> >
> > Thanks,
> > Owen Lynch
> > _______________________________________________
> > SIPBeyondVoIP mailing list
> > SIPBeyondVoIP at lists.ag-projects.com
> > http://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20120927/5f6dde8e/attachment.html>


More information about the SIPBeyondVoIP mailing list