Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
How can add a new contact to my jabber id in asp.net using matrix
Page:  1  2  next
Avatar
shamsher.savi #1
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Subject: How can add a new contact to my jabber id in asp.net using matrix
Dear Sir,

I am new to xmpp programming. Presently  I am working on Live Chat API. I want to add a new contact in my jabber id dynamically using matrix. How it can be done.

Thanks
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
see here:
http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…
Avatar
shamsher.savi #3
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Subject: How can add a new contact to my jabber id in asp.net using matrix
Dear Sir,


Thanks for quick reply.

I have already studied the tutorial which you sent by link.
Actually I want to add new gtalk user to my jid as roster. and want to send him a chat invitation, so that he can choose yes or no for chat. How i can resolve this problem.

Thanks.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you have to add the contact and ask for subscription, as described in the tutorial. The other contact gets an incoming subscription request which he has to accept or deny. Once the contact accepted the request you can send messages. Google does not route messages until the request was accepted. I guess this is what you want.

For 1:1 conversations there are no invitations in XMPP. When you are subscribed you can start them at any time you want. If you need invitations for 1:1 chats you have to implement you own extension for this.

Alex
Avatar
shamsher.savi #5
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Subject: How to send to user that i am online
Thanks for your reply. I have successfully sent the subscription to the user. And the user accepted it but enable to send message to that user. This user showing me unavailable. how i can send my presence to him that i am online.

Thanking you.
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MatriX sets the presence automatically after login. If you get no presence then I assume that there is still something wrong with the subscription. Please check the Subscription property on both sides, or post the Xml snippet of the RosterItem here. Subscription should be both.

Alex
Avatar
shamsher.savi #7
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Dear Sir,
My code for sending the sub is given below. what is wrong with that. how to specify sub type as both.

Thanks.



 void AddRoster(string jid)
    {
        rm = new RosterManager(xmppClient);
        pm = new PresenceManager(xmppClient);
       
        Matrix.Jid jid = jid;
        rm.Add(jid, "Live Chat", "Friends");
       
        pm.Subscribe(jid,"Hello","LiveChat");
       
    }
Avatar
Alex #8
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this code is correct. I told you to post the Xml log where I can see your roster.
see: http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…
Avatar
shamsher.savi #9
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Dear Sir,

Here is my log text.

<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" ><stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="F4D0C6DA22075799" version="1.0" xmlns="jabber:client" ><stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls">
    <required />
  </starttls>
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>X-GOOGLE-TOKEN</mechanism>
    <mechanism>X-OAUTH2</mechanism>
  </mechanisms>
</stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" ><stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="0991AB82C50C740C" version="1.0" xmlns="jabber:client" ><stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
    <mechanism>X-GOOGLE-TOKEN</mechanism>
    <mechanism>X-OAUTH2</mechanism>
  </mechanisms>
</stream:features><auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" /><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="gmail.com" version="1.0" ><stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" id="B4ADF0F65BBB7F31" version="1.0" xmlns="jabber:client" ><stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
</stream:features><iq id="MX_1" type="set" xmlns="jabber:client">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
    <resource>MatriX</resource>
  </bind>
</iq>
This post was edited on 2012-12-14, 12:04 by Alex.
Avatar
Alex #10
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this log is incomplete, stops after resource binding before any roster is received.

Alex
Avatar
shamsher.savi #11
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
In reply to post #9
Events Those fired.

OnSendXml
OnReceiveXml
OnReceiveXml
OnSendXml
OnReceiveXml
OnSendXml
OnReceiveXml
OnReceiveXml
OnBeforeSasl
OnSendXml
OnReceiveXml
OnLogin
OnSendXml
OnReceiveXml
OnReceiveXml
OnSendXml
Avatar
shamsher.savi #12
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Nothing is happening after that.
Avatar
Alex #13
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by shamsher.savi:
Nothing is happening after that.

the server must reply to the resource bind request.
What happens when you login with the MiniClient example?

Alex
Avatar
shamsher.savi #14
User title: Shamsher Singh
Member since Dec 2012 · 11 posts · Location: Gurgaon, Haryana, India
Group memberships: Members
Show profile · Link to this post
Dear Sir,

Thanks for your kind help.

I am using signalr with matrix lib. How can i connect to mychat hub  which is located in a folder on another website eg. www.abc.com/chathub. And my javascript chatbox is on clientwebsite eg. www.xyz.com

Regards,
Shamsher Singh
Avatar
Alex #15
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please read this blog post:
http://www.ag-software.net/2012/08/20/web-clients-with-mat…

and study the SignalR example which comes with the MatriX download.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next