[mythtv] MythPhone experiments and "features"

Paul Volkaerts paul.volkaerts at lineone.net
Wed Jan 26 17:34:20 EST 2005


> >>> * If SIP proxy registration fails, it is impossible to "ESC" out of
> >>> MythPhone.
> >>
> [snip]
>
> (This is the one I have no explanation or workaround for)
>
> This is not just caused by SIP proxy registration failure, and does not
> always happen. It seems that if any SIP request fails or is refused by
> the proxy, there is a chance that the UI will start to ignore "ESC"... I
> did notice that while in this state, that the ESC key starts to be
> usable to hangup calls, much like "O".
>
> I cannot reliably case this. Whenever I think I've pinned down what
> exactly happened, the problem "times out" and goes back to normal... Let
> me know if there is some debugging I can add to try and trap this.
>
> It is _possible_ that it is down to the SUBSCRIBE configuration having
> been absent as mentioned below...

When you hit ESC it sends a Hangup to the SIP stack then exits. Part of
exiting
is a cleanup of running processes, so it is possibly getting stuck waiting
for a
process (such as the webcam process) to terminate.  I'd stick a "Printf" in
the
~PhoneUI() procedure to see if it is getting there as a first step.

>
> >>> * I was unable to use asterisk's "host=dynamic" facility with
> MythPhone.
> >>> Not sure why, but hard-coding the IP address works okay.
> >>
>
> This was fixed by enabling the SUBSCRIBE feature of Asterisk. by
> creating a "subscribecontext" for the mythphone SIP user.
>
> AFAICT "normal" SIP proxy negotiation is done using the SIP "REGISTER"
> verb, but the MythPhone only seems able to use "SUBSCRIBE". The
> SUBSCRIBE feature only works when explicitly configured as it is a
> potential security risk (Strangers could monitor extension information
> and numbers)

These are two seperate things.  MythPhone REGISTERS to a proxy first of all
to tell that proxy its IP address.  Registration is optional and can be
disabled from setup, but at some point I am going to make it the only
option, as testing two ways of working is a real pain.

Once registered, MythPhone sends a SUBSCRIBE to every client in the
directory, to subscribe to the presence status of that client. That way,
Mythphone displays the red/amber/green availability information of each
client in the directory.

So you REGISTER to a proxy to tell it how to reach you; and you SUBSCRIBE to
other clients to request that they send you presence notifications.


> NOTE: Even though the SUBSCRIBE was failing, the UI was displaying "No
> active calls", rather than leaving the "Not Registered" message in
> place. Perhaps "Not Registered" should take precedence?

The "Not Registered" message only displays for a few seconds because you can
still
make and receive calls when not-registered; if people know your IP address.
As I said above this mode may well disappear at some point and you will HAVE
to register.

>
> >>> * Some of the calls I made were perfect. Mostly outbound
> calls from Myth
> >>> worked very well. Sometimes there was no sound received from
> the remote
> >>> end, even though asterisk reported sending it. For inbound
> calls to Myth
> >>> I never seemed to get any inbound data (I didn't have time to
> do a net.
> >>> trace, so not sure here)
> >>
> >>
> >> With latest CVS, you can hit "i" and get mid-call stats like packet
> >> counters
> >> that are useful for debugging this kind of thing. Usually this is a NAT
> >> issue but if you are only on your LAN I guess this is doubtful.
> >
> I pinned this one down too. It is cause by re"INVITE"s - Setting
> "canreinvite=no" in the asterisk configuration for the Mythphone fixes
> this problem by turing off this (possibly useful) feature.
>
> re-Inviting allows the proxy to send INVITES to phones whenever it sees
> fit to redirect the RTP stream. This (for example) allows 2 phones
> speaking the same codec to be told to direct packets straight to
> eachother rather than via the proxy. If (say) the call is transferred or
> put on hold, another INVITE is sent to redirect the RTP stream once more.
>
> MythPhone does not support this (It is not alone)

Interesting.  I would like to see a SIP trace of this with canreinvite=yes.
Sometimes this is used as a watchdog timer; so a client will automatically
reINVITE every 30 seconds to make sure the far end is still there.


>
> >>> * Hangup without exiting MythPhone.
> >>
> >> With CVS version you can hit "O" (STOP key)
>
> Yes, this is working. Does it mute the speakers though? I seem to get
> some background noise left behind.
>

Will check. I have not noticed this as a problem.


Thanks for your feedback by-the-way, its really useful.




More information about the mythtv-dev mailing list