<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK
href="cid:filelist.xml@01C4B071.132C9B60" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
        mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
        mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff size=2>That's
interesting. I'm sure your idea will work (the pre-link event) but keep in
mind that you'll probly have to insert that in multiple places since there are
apps and methods other than app_dial that use
ast_request. </FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff size=2>Yeah
at first I was just mucking around with Asterisk and learning C at the same time
so I got a little fast and lose with the code changes. I do plan on going
back over that stuff and removing all the changes that aren't completely
necessary. </FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff size=2>I
really think that Asterisk needs a built-in call_uid field (or variable) that
ties together mutliple channels into a call "object". As you've noted,
this is a requirement if you want to follow a call throughout it's complete
lifecycle (complete with events and error notification) which is, in turn, a
necessity for implementing 3rd-party call-control, one of my primary goals
for JAsterisk. </FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff size=2>I'd
love to hear your ideas on a non-intrusive solution! </FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff size=2>Should
we take this discussion offline?</FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004><FONT face=Arial color=#0000ff
size=2>Zac</FONT></SPAN></DIV>
<DIV><SPAN class=525045322-12102004></SPAN><FONT face=Tahoma><FONT face=Arial
color=#0000ff size=2></FONT><BR><FONT size=2><SPAN
class=525045322-12102004><FONT face=Arial
color=#0000ff> </FONT></SPAN>-----Original Message-----<BR><B>From:</B>
Brian Roy [mailto:b.t.roy@brianandkelly.ws]<BR><B>Sent:</B> Tuesday, October 12,
2004 3:35 PM<BR><B>To:</B> asterisk-dev@lists.digium.com<BR><B>Subject:</B> RE:
[Asterisk-Dev] Asterisk Manager and app_dial
challenge.<BR><BR></FONT></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=Section1>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Thanks – I was going to
head down the channel path, but I think I have found an even easier way. It
should be possible in the do loop in <SPAN class=SpellE>app_dial</SPAN>
execute function to insert a <SPAN class=SpellE>manager_event</SPAN> command
with both unique ids like the Link event.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I was hoping to avoid
modifying Asterisk any further… but what the
heck.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I would also like to talk
to you about your <SPAN class=SpellE>JAsterisk</SPAN> project and your plan
for VXML and CCXML. I have developed <SPAN class=GramE>an architecture</SPAN>
for a non-intrusive solution which solves for what you are doing, what I am
doing and multiple other uses. It would be pure sip and only requires a sip
proxy (and gateway if needed).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Brian
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><BR
style="mso-special-character: line-break"><![if !supportLineBreakNewLine]><BR
style="mso-special-character: line-break"><![endif]><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">That's exactly the issue I
ran into while working on <SPAN class=SpellE>Jasterisk</SPAN>. My solution was
to modify <SPAN class=SpellE>pbx.ast_request</SPAN> to take an additional
optional parameter that could act as a call identifier and set a predefined
variable in the newly created channel to that variable.<SPAN
style="mso-spacerun: yes"> </SPAN>Then, when I receive a "<SPAN
class=SpellE>newchannel</SPAN>" or "<SPAN class=SpellE>newstate</SPAN>" event,
I can find the channel and check to see if it's already associated with a
"call" object.<SPAN style="mso-spacerun: yes"> </SPAN>Or, I suppose you
could modify the event to include a "<SPAN class=SpellE>Call_UID</SPAN>" field
so you wouldn't have to grab the variable from the channel directly (hey why
didn't I do that?).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Zac</SPAN></FONT></SPAN><FONT
face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>