On Mon, 2007-01-22 at 14:31 +0200, Damjan Jovanovic wrote:
> On Mon, 2007-01-22 at 12:48 +0100, Mikael Bjerkeland wrote:
> > 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.
Sorry, that patch doesn't compile, use this one instead.
Still, I am not able to pick up ${RTPAUDIOQOS} from the h extension. I
know that some variables are destroyed before the h extension starts
being executed, and this might be one of them. Asterisk solved this
problem, I don't know whether OpenPBX incorporated that patch or not.
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-SVN/channels/chan_sip.c 2007-01-18 14:25:05.000000000 +0200
+++ openpbx-MOD/channels/chan_sip.c 2007-01-22 15:08:55.000000000 +0200
@@ -3194,6 +3194,7 @@
struct sip_pvt *p = ast->tech_pvt;
int needcancel = 0;
int needdestroy = 0;
+ struct opbx_channel *oldowner = ast;
//struct opbx_flags locflags = {0};
if (!p)
@@ -3320,10 +3321,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