On Sep 29, 2009, at 7:06 AM, Paul Witty <[email protected]> wrote:
Pedro Melo wrote:
Hi,
On 2009/09/29, at 11:20, Paul Witty wrote:
As a bit of background on what I'm trying to do, I'm implementing
a SIP to XMPP/Jingle gateway. The gateway is connected to the
XMPP server as a component (e.g. sipgw.xmppserver.com) and so the
Jingle client can make a call to [email protected],
which then routes this to sip://1.2.3.4. However, in the other
direction, a SIP call to sip://p...@sipgw can be routed by the SIP
gateway to the JID [email protected], but without presence
information this is insufficient to make a Jingle call.
The two solutions to this I can see is either for the SIP gateway
to have privileges which allow it access to presence information
for clients registered to its server through sending a presence
probe for any user (but which I assume is not supported), or to
have the gateway send a presence subscription request each time a
call comes to a previously uncalled user, and maintaining the
roster, which is clunky both on the gateway side and for the user
experience.
Clients that want to use the SIP gateway must register with it
using XEP-0100. In the process, the service subscribes the user
presence.
I think you really need the registration part, so that the SIP
gateway knows how to map p...@sipgw to p...@xmppserver.
At the moment we just map sip://usern...@sipgw to xmpp://
[email protected], which, for within a closed company system
(such as those to which we sell SIP equipment), works perfectly well
to provide SIP -> Jingle calling with zero configuration. Requiring
registration means that it doesn't "just work", and also means that
the client needs to have the ability to register to the gateway, so
that we can't just support any Jingle-capable client.
What about using the xmpp jid resource for the sip name instead of the
user portion? xmpp:[email protected]/1.2.3.4. This means that you
only have to add one thing to your roster and the component can send
presence from whatever resourse it wants. Using a username portion
prevents clients from assuming incorrect, special behavior.
-Nathan Fritz (cellphone)