On Mon, 2007-01-22 at 12:48 +0100, Mikael Bjerkeland wrote:
> Hi Damjan,
> 
> first of all I want to say thank you for your contribution to
> OpenPBX.org.

It's a pleasure, I'm glad you find it useful.

> As I asked you on IRC, why is this a global variable and not a channel
> variable? In my humble opinion it sounds more reasonable that this is a
> channel variable since it is related to a specific call. Is there
> anything preventing setting this as a channel variable instead of a
> global variable?

> I would like to insert the RTPAUDIOQOS channel variable to the CDR for
> the specific call with cdr_pgsql_custom.

Great.

> Can you take a look and see how
> you can make this patch create a channel variable instead of a global
> variable?

I'm attaching a patch to make it a channel variable instead of a global.
Apply it on top of the previous patch.

> 
> Mikael
> 

Damjan


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--- openpbx/channels/chan_sip.c	2007-01-18 14:25:05.000000000 +0200
+++ openpbx-NEW/channels/chan_sip.c	2007-01-22 14:26:30.000000000 +0200
@@ -3320,10 +3320,10 @@
                         append_history(p, "RTCPvideo", buffer);
                     }
                 }
-                if (p->rtp)
-                    pbx_builtin_setvar_helper(p->owner, "RTPAUDIOQOS", audioqos);
-                if (p->vrtp)
-                    pbx_builtin_setvar_helper(p->owner, "RTPVIDEOQOS", videoqos);
+                if (p->rtp && oldowner)
+                    pbx_builtin_setvar_helper(oldowner, "RTPAUDIOQOS", audioqos);
+                if (p->vrtp && oldowner)
+                    pbx_builtin_setvar_helper(oldowner, "RTPVIDEOQOS", videoqos);
             }
             else
             {
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to