[asterisk-commits] phsultan: branch phsultan/gmail-voice-video r241502 - in /team/phsultan/gmail...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 20 07:00:20 CST 2010
Author: phsultan
Date: Wed Jan 20 06:37:01 2010
New Revision: 241502
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241502
Log:
Don't advertize video capabilities.
We don't have proper video support yet, so there is no need to advertize
video capabilities in our presence packets. Otherwise, Gmail voice and video
clients will be given the possiblity to chat over video with us, and we cannot
convert the call to a voice only session.
Modified:
team/phsultan/gmail-voice-video/channels/chan_gtalk.c
team/phsultan/gmail-voice-video/res/res_jabber.c
Modified: team/phsultan/gmail-voice-video/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/gmail-voice-video/channels/chan_gtalk.c?view=diff&rev=241502&r1=241501&r2=241502
==============================================================================
--- team/phsultan/gmail-voice-video/channels/chan_gtalk.c (original)
+++ team/phsultan/gmail-voice-video/channels/chan_gtalk.c Wed Jan 20 06:37:01 2010
@@ -604,23 +604,19 @@
static int gtalk_is_answered(struct gtalk *client, ikspak *pak)
{
- struct gtalk_pvt *tmp;
+ struct gtalk_pvt *tmp = NULL;
char *from;
iks *codec;
char s1[BUFSIZ], s2[BUFSIZ], s3[BUFSIZ];
int peernoncodeccapability;
- char *ses, *seses[] = {"session", "ses:session", 0};
ast_log(LOG_DEBUG, "The client is %s\n", client->name);
- /* Make sure our new call doesn't exist yet */
- for (ses = seses[0] ; ses ; ses++) {
- for (tmp = client->p; tmp; tmp = tmp->next) {
- if (iks_find_with_attrib(pak->x, ses, "id", tmp->sid)) {
- break;
- }
- }
-
- if (tmp != 0) {
+
+ /* Make sure our new call does exist */
+ for (tmp = client->p; tmp; tmp = tmp->next) {
+ if (iks_find_with_attrib(pak->x, "session", "id", tmp->sid)) {
+ break;
+ } else if (iks_find_with_attrib(pak->x, "ses:session", "id", tmp->sid)) {
break;
}
}
@@ -1252,11 +1248,10 @@
codec = iks_first_tag(iks_first_tag(iks_first_tag(pak->x)));
while (codec) {
- ast_log(LOG_NOTICE, "iks_name(codec) : %s\n", iks_name(codec));
- if (!strcmp(iks_name(codec), "vid:payload-type")) {
+ if (!strcmp(iks_name(codec), "vid:payload-type") && p->vrtp) {
ast_rtp_codecs_payloads_set_m_type(ast_rtp_instance_get_codecs(p->vrtp), p->vrtp, atoi(iks_find_attrib(codec, "id")));
ast_rtp_codecs_payloads_set_rtpmap_type(ast_rtp_instance_get_codecs(p->vrtp), p->vrtp, atoi(iks_find_attrib(codec, "id")), "video", iks_find_attrib(codec, "name"), 0);
- } else {
+ } else {
ast_rtp_codecs_payloads_set_m_type(ast_rtp_instance_get_codecs(p->rtp), p->rtp, atoi(iks_find_attrib(codec, "id")));
ast_rtp_codecs_payloads_set_rtpmap_type(ast_rtp_instance_get_codecs(p->rtp), p->rtp, atoi(iks_find_attrib(codec, "id")), "audio", iks_find_attrib(codec, "name"), 0);
}
Modified: team/phsultan/gmail-voice-video/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/gmail-voice-video/res/res_jabber.c?view=diff&rev=241502&r1=241501&r2=241502
==============================================================================
--- team/phsultan/gmail-voice-video/res/res_jabber.c (original)
+++ team/phsultan/gmail-voice-video/res/res_jabber.c Wed Jan 20 06:37:01 2010
@@ -3084,7 +3084,10 @@
iks_insert_attrib(cnode, "node", "http://www.asterisk.org/xmpp/client/caps");
iks_insert_attrib(cnode, "ver", "asterisk-xmpp");
if (ast_module_check("chan_gtalk.so") || ast_module_check("chan_gtalk")) {
- iks_insert_attrib(cnode, "ext", "camera-v1 video-v1 voice-v1");
+ /* don't advertized any video capabilities until we have proper support
+ * iks_insert_attrib(cnode, "ext", "camera-v1 video-v1 voice-v1");
+ */
+ iks_insert_attrib(cnode, "ext", "voice-v1");
}
iks_insert_attrib(cnode, "xmlns", "http://jabber.org/protocol/caps");
iks_insert_node(presence, cnode);
More information about the asterisk-commits
mailing list