Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:57:42+00:00 2026-06-02T23:57:42+00:00

Problem : I am attempting a TURN Connection (XEP-0065) using the iOS XMPPFramework and

  • 0

Problem : I am attempting a TURN Connection (XEP-0065) using the iOS XMPPFramework and an OpenFire Server. I want to be able to send and receive files. However, I am receiving a 503 service-unavailable error.

Note : The base of my code is from the following tutorial : http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/

XML Error :

I’ve debugged through TURNSocket.m. It goes into processRequestResponse and has the following XML. (If I am not mistaken, this has been sent from OpenFire to me, rather than vice versa?) …

<iq xmlns="jabber:client"
    type="error" 
    id="03CC977E-2645-4E87-AE78-536D985CA2B5" 
    from="friendsUsername@beta.myCompany.co.uk"
    to="myUsername@beta.myCompany.co.uk/12f10b69">
    <query xmlns="http://jabber.org/protocol/bytestreams" 
        sid="03CC977E-2645-4E87-AE78-536D985CA2B5"
        mode="tcp">
        <streamhost jid="proxy.beta.myCompany.co.uk"
            host="127.0.1.1"
            port="7777"/>
    </query>
    <error code="503"
        type="cancel">
        <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</iq>

Why is there an error?

Update : XEP-0065 says the following. Even though this error looks a little different to mine, is it relevant? If so, what is the problem?

If the Proxy is unable to act as a StreamHost, the Proxy MUST return
an error to the Requester, which SHOULD be <not-allowed/>.

<iq from='requester@example.com/foo'
    id='uj2c15z9'
    to='streamer.example.com'
    type='error'>
  <error type='cancel'>
    <not-allowed 
        xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

Update : At the moment I’m looking into whether the inclusion or exclusion of a JID resource in the various sent and retrieved bits of XML is the problem. Or alternatively, I don’t even have a ‘from’ in the following xml. the docs imply i need this. Is this the issue? I dont see a current way in the code to make a ‘from’ …

<iq type="get" 
    to="beta.myCompany.co.uk"
    id="215784CF-81A8-403E-89BF-455C926BEAE5">
    <query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>

Update 19/04/12 11:00 am : In response to Matt J’s response, I am posting more XML. I’m not sure Matt requested the full XML log of what is sent and retrieved, but just in case, here it is. Note that these logs are not all from the same run-through (because when I debug it to get the XML logs, it causes timeouts so I have to start again)

Sent :

<iq type="get" to="beta.myCompany.co.uk" 
    id="082A1987-384F-43CD-9E7B-A2C0E31F2CA8">
    <query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>

Response :

<iq xmlns="jabber:client" 
    type="result" 
    id="18EED477-B0E4-492D-89CF-CA692FCF13AD"
    from="beta.myCompany.co.uk" 
    to="myUsername@beta.myCompany.co.uk/72d23cd0">
    <query xmlns="http://jabber.org/protocol/disco#items">
        <item jid="pubsub.beta.myCompany.co.uk" 
            name="Publish-Subscribe service"/>
        <item jid="broadcast.beta.myCompany.co.uk" 
            name="Broadcast service"/>
        <item jid="search.beta.myCompany.co.uk" 
            name="User Search"/>
        <item jid="conference.beta.myCompany.co.uk" 
            name="Public Chatrooms"/>
        <item jid="proxy.beta.myCompany.co.uk" 
            name="Socks 5 Bytestreams Proxy"/>
    </query>
</iq>

Sent :

<iq type="get" 
    to="proxy.beta.myCompany.co.uk" 
    id="F1B5370C-234F-4F2D-93E7-D60D2C35D063">
    <query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>

Response :

<iq xmlns="jabber:client" 
    type="result" 
    id="F1B5370C-234F-4F2D-93E7-D60D2C35D063"
    from="proxy.beta.myCompany.co.uk" 
    to="myUsername@beta.myCompany.co.uk/32276f6">
    <query xmlns="http://jabber.org/protocol/disco#info">
        <identity category="proxy" 
            name="SOCKS5 Bytestreams Service" 
            type="bytestreams"/>
            <feature var="http://jabber.org/protocol/bytestreams"/>
            <feature var="http://jabber.org/protocol/disco#info"/>
    </query>
</iq>

Sent :

<iq type="get" 
    to="proxy.beta.myCompany.co.uk" 
    id="84904B7D-2BB2-4B8E-90BE-BE0F5A934764">
    <query xmlns="http://jabber.org/protocol/bytestreams"/>
</iq>

Response :

<iq xmlns="jabber:client" 
    type="result" 
    id="B412512B-FA27-4531-88BE-2FC0A26E6ED2"
    from="proxy.beta.myCompany.co.uk" 
    to="myUsername@beta.myCompany.co.uk/45ca808d">
    <query xmlns="http://jabber.org/protocol/bytestreams"/>
</iq>

plus we also get a streamhost from the code from the query like this: NSXMLElement *streamhost = [query elementForName:@"streamhost"];

<streamhost xmlns="http://jabber.org/protocol/bytestreams"
    jid="proxy.beta.myCompany.co.uk"
    host="127.0.1.1" 
    port="7777"/>

Sent :

<iq type="set" 
    to="friendsUsername@beta.myCompany.co.uk/spark" 
    id="DD96A581-BFA3-47BC-A3C0-D26AD48D7442">
    <query xmlns="http://jabber.org/protocol/bytestreams" 
        sid="DD96A581-BFA3-47BC-A3C0-D26AD48D7442" 
        mode="tcp">
        <streamhost xmlns="http://jabber.org/protocol/bytestreams"
            jid="proxy.beta.myCompany.co.uk" 
            host="127.0.1.1"
            port="7777"/>
    </query>
</iq>

This gives no response, but it looks ok to me when I compare to example 17 of XEP-0065. HOWEVER, if don’t include a resource on the jID passed into TurnSocket.m (friendsUsername@beta.myCompany.co.uk rather than friendsUsername@beta.myCompany.co.uk/spark), then this send request changes appropriately

<iq type="set"
     to="friendsUsername@beta.myCompany.co.uk" **LOOK! NO RESOURCE!**
     id="5D08B85E-CA78-4AA8-A893-C1DC571A9808">
     <query xmlns="http://jabber.org/protocol/bytestreams" 
        sid="5D08B85E-CA78-4AA8-A893-C1DC571A9808" 
        mode="tcp">
        <streamhost xmlns="http://jabber.org/protocol/bytestreams"
            jid="proxy.beta.myCompany.co.uk"
            host="127.0.1.1"
            port="7777"/>
      </query>
</iq>

and the XML in my original question above is returned! (with the 503 error code). Furthermore, I notice that this xml contains ‘streamhost’, but at this stage should it actually contain ‘streamhost-used’? Why is there an error? Should or shouldn’t I include the resource in the ‘to’?

Minor Update 19/04/2012 15:07 : I have added xmpp.proxy.transfer.required as false on OpenFire. This is due to these discussions: here and here. I didn’t set up this server (my colleague did) and I don’t understand what it means, but it doesn’t seem to have made any difference to my problem.

Update 20/04/2012 10:00 : My 503 error I think is correctly there when I don’t include the resource (according to this). Even if this is so though, I’m unsure why I get no response with a full jID.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:57:43+00:00Added an answer on June 2, 2026 at 11:57 pm

    The 503 error was due to the fact that I was not providing the full JID. e.g I was providing friendsUsername@domain rather than friendsUsername@domain/resource.

    However, I still haven’t made a successful connection, and have opened a new question here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem : How can I get a successful TURN Connection using the iOS XMPPFramework
I have a problem when attempting to serialize class on a server, send it
I'm having a strange problem while attempting to transform a blocking socket server into
Problem: I'm attempting to disable a radio button by using the code below. This
I'm attempting to use Python's logging module to send emails containing logs. The problem
I'm hit a problem when attempting to deploy a MVC app as a sub-application
I have sort of a tricky problem I'm attempting to solve. First of all,
I'm attempting to solve the Project Euler Problem 8 with C++, and the problem
I'm having a problem with a simple form where i'm attempting to fire an
I'm attempting to connect to an Asterisk manager interface, and I'm having a problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.