[Freeswitch-users] Sending messages with mod_dingaling
Gonzalo Servat
gservat at gmail.com
Sun Nov 16 19:09:46 PST 2008
Hi
1) I'm trying to get the hang of mod_dingaling and I noticed that when I
send a message from gservat at gmail.com to znog at gmail.com (the latter being
the client profile setup on FS), mod_dingaling tries to send another message
again from the same sender/recipient which the google talk server rejects
with the error shown below. Any ideas why this is?
-------------------------------------------------------------------------------
<message to="znog at gmail.com" type="chat" id="4BF947C10A146B61_2"
iconset="classic" from="gservat at gmail.com/gmail.988E8E36">
<body>testing</body>
<met:google-mail-signature
xmlns:met="google:metadata">12b790b93955e670</met:google-mail-signature>
<cha:active xmlns:cha="http://jabber.org/protocol/chatstates
"></cha:active>
<nos:x value="disabled" xmlns:nos="google:nosave"></nos:x>
<arc:record otr="false" xmlns:arc="http://jabber.org/protocol/archive
"></arc:record>
</message>
2008-11-17 00:57:40 [NOTICE] libdingaling.c:1276 on_log() SecSEND:
-------------------------------------------------------------------------------
<message to="znog at gmail.com" type="chat" from="
gservat at gmail.com/gmail.988E8E36">
<body>testing</body>
</message>
2008-11-17 00:57:41 [INFO] libdingaling.c:1274 on_log() SecRECV:
-------------------------------------------------------------------------------
<message to="gservat at gmail.com/gmail.988E8E36" type="error" from="
znog at gmail.com">
<body>testing</body>
<error code="400" type="modify">
<bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></bad-request>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">If set, the 'from'
attribute must be set to the user's full JID.</text>
</error>
-------------------------------------------------------------------------------
2) I was trying to use the "chat jingle" interface to send a message to a
contact and it didn't work. I used the following command:
FreeSWITCH> chat jingle|znog at gmail.com|gservat at gmail.com|testing
-------------------------------------------------------------------------------
<message to="gservat at gmail.com" type="chat"
from="dp+znog at gmail.com<dp%2Bznog at gmail.com>
">
<body>testing</body>
</message>
2008-11-17 01:02:34 [INFO] libdingaling.c:1274 on_log() SecRECV:
-------------------------------------------------------------------------------
<message to="dp+znog at gmail.com <dp%2Bznog at gmail.com>" type="error" from="
gservat at gmail.com">
<body>testing</body>
<error code="400" type="modify">
<bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></bad-request>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">If set, the 'from'
attribute must be set to the user's full JID.</text>
</error>
</message>
-------------------------------------------------------------------------------
I tried modifying mod_dingaling.c's chat_send() function to see if the "dp+"
part was annoying the Google Talk server (ie. forced it to leave the "from"
as is) but it didn't help.
Just for the record, my jingle client profile looks like this:
<include>
<!-- Client Profile (Original mode) -->
<profile type="client">
<param name="name" value="znog at gmail.com"/>
<param name="login" value="znog at gmail.com/gtalk"/>
<param name="password" value="pass-goes-here"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="message" value="Call me"/>
<param name="rtp-ip" value="$${bind_server_ip}"/>
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="auto-login" value="true"/>
<!-- <param name="auto-reply" value="auto-reply looks disabled in the
mod_dingaling.c code"/> -->
<!-- SASL "plain" or "md5" -->
<param name="sasl" value="plain"/>
<!-- if the server where the jabber is hosted is not the same as the one
in the jid -->
<param name="server" value="talk.google.com"/>
<!-- Enable TLS or not -->
<param name="tls" value="true"/>
<!-- disable to trade async for more calls -->
<param name="use-rtp-timer" value="true"/>
<!-- default extension (if one cannot be determined) -->
<param name="exten" value="inbound_gtalk"/>
<!-- VAD choose one -->
<!-- <param name="vad" value="in"/> -->
<!-- <param name="vad" value="out"/> -->
<param name="vad" value="both"/>
<!--<param name="avatar" value="/path/to/tiny.jpg"/>-->
<!--<param name="candidate-acl" value="dl-candidates"/>-->
</profile>
</include>
Any help would be appreciated and in return I will update the mod_dingaling
WIKI page :-)
Regards,
Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081117/b9f4a263/attachment-0002.html
More information about the FreeSWITCH-users
mailing list