<div>Thanks again, Andrew.</div>
<div> </div>
<div>Things are working pretty fine. But i see a spurious errors on the console. I use Cisco 2800 and codecs used are 711ulaw as priority on both sides. May be i'll discuss this in another thread.</div>
<div> </div>
<div>regards,</div>
<div>Sharath </div>
<div>===================================</div>
<div>Executing ParkedCall("SIP/192.168.50.2-088cde00", "366") in new stack<br> -- Channel SIP/192.168.50.2-088cde00 connected to parked call 366<br>Mar 28 17:07:36 WARNING[10027]: chan_sip.c:2692 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
<br>Mar 28 17:07:36 WARNING[10027]: chan_sip.c:2692 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)<br>Mar 28 17:07:36 WARNING[10027]: chan_sip.c:2692 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
<br>Mar 28 17:07:36 WARNING[10027]: chan_sip.c:2692 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)<br>Mar 28 17:07:36 WARNING[10027]: chan_sip.c:2692 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
<br><br><br> </div>
<div><span class="gmail_quote">On 3/27/06, <b class="gmail_sendername">Andrew Kohlsmith</b> <<a href="mailto:akohlsmith-asterisk@benshaw.com">akohlsmith-asterisk@benshaw.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Monday 27 March 2006 04:45, Sharath Chandra wrote:<br>> I downloaded the latest branch as on today 27th March. I tried to access
<br>> the 'PARKEDAT' variable in the following manner, but always the value of<br>> ${PARKEDAT} is displayed blank. Actually i want to access this variable<br>> when dialed on another extension.<br>> Can you give me some sample dialplan showing the usage.
<br><br>> [default]<br>(on a technical note, I'd *never* suggest actually using [default]. Put a<br>matchall that does a Hangup in there and nothing else, and use specific<br>contexts so you never get a call there you're not expecting.)
<br><br>> include => parkedcalls<br><br>Your dialplan looks like a real potential rat's nest... I'd strongly suggest<br>separating things out and saving yourself a world of headaches in the (near)<br>future.<br><br>
> exten => 4170056,1,Answer<br>> exten => 4170056,2,Wait(1)<br>> exten => 4170056,3,Playback(welcome)<br>> exten => 4170056,4,ParkAndAnnounce(|20||default,${EXTEN},5)<br><br>You're not using ParkAndAnnounce correctly at all; You're saying to come back
<br>to "default,${EXTEN},5" if the park times out, but you're not specifying who<br>to call and tell the parking lot to, nor are you specifying a template to<br>announce with. ParkAndAnnounce isn't quite the same as Park().
<br><br>With ParkAndAnnounce, you need to Dial() someone to "announce" the parked<br>call's slot to. This was originally intended to be played out over an<br>overhead paging system, but it's far too useful to just relegate to that
<br>simple task. To use the variable it's easiest to "call" the Local/ channel<br>and deal with it in there:<br><br>exten => 4170056,4,ParkAndAnnounce(PARKED||Local/${EXTEN}@ParkedAt)<br><br>That will "Dial" (
i.e. create a call) to 4170056 in the ParkedAt context and<br>"play" the parking lot # to that extension. We don't care about the audio,<br>but the variable ${PARKEDAT} will arrive there as well, and that's what we're
<br>interested in. I've also eliminated the timeout. So now let's use the<br>variable:<br><br>[ParkedAt]<br>exten => _X.,1,NoOp(Call to ${EXTEN} was parked at ${PARKEDAT})<br>exten => _X.,n,Goto(default,${EXTEN},5)
<br><br>All this does is jump back to your original context (again, don't use default,<br>icky, icky, icky!) at the next priority, and you can take it from here:<br><br>> exten => 4170056,5,NoOp(${PARKEDAT})<br>> exten => 4170056,6,Playback(goodbye)
<br>> exten => 4170056,7,Hungup<br><br>Now you're not doing much. If you want to store it somewhere that something<br>else (another call, perhaps) can use it, you need to put it somewhere, like<br>in AstDB:<br><br>
exten => 4170056,5,Set(DB(LastParkedCall)=${PARKEDAT})<br><br>Now you can use 4170057 to actually pull it and use it:<br><br>exten => 4170057,1,Answer<br>exten => 4170057,n,Wait(1)<br>exten => 4170057,n,Set(PARKEDAT=DB(LastParkedCall))
<br>exten => 4170057,n,Set(DB(LastParkedCall)=)<br>exten => 4170057,n,ParkedCall(${PARKEDAT})<br><br>(Note that the application name is ParkedCall, not ParkedCalls.)<br><br>You can see that I set the channel variable PARKEDAT here to the DB value I
<br>stored, and then I erase the DB value (actually set it to an empty value).<br>If you wanted to be more robust you could check for an empty value and deal<br>with it, or even create some kind of array storage, since every parked call
<br>will "erase" the value of the last one in the DB.<br><br>Clear as mud? :-)<br><br>To Recap: ParkAndAnnounce() parks the call, and then Dial()'s someone to<br>announce where the call is, instead of announcing the parking slot to the
<br>other party (the one who requested the park). It's that Dial()'d someone<br>that not only gets the audio, but also gets the channel variable.<br><br>Another (slightly more complete) example follows. *74 parks the call, *75
<br>picks up the last parked call. If nobody picks up the parked call within 20<br>seconds, the *74 dialplan continues by clearing out the DB entry and calling<br>the receptionist's phone (extension 221 in this example):
<br><br>[foo]<br>exten => *74,1,ParkAndAnnounce(PARKED,20,Local/s@ParkedAt)<br>exten => *74,n,NoOp(Call timed out, erasing Parking Slot Number since call<br>isn't there anymore, it's here)<br>exten => *74,n,Set(DB(LastParkedAt)=)
<br>exten => *74,n,NoOp(Ok, the person you've parked is back here... What are you<br>gonna do?)<br>exten => *74,n,Goto(extensions,221,1)<br><br>exten => *75,1,NoOp(Going to pick up the last parked call)<br>exten => *75,n,Set(PARKEDAT=DB(LastParkedAt))
<br>exten => *75,n,Set(DB(LastParkedAt)=)<br>exten => *75,n,ParkedCall(${PARKEDAT})<br><br>[ParkedAt]<br>exten => s,1,NoOp(Call was parked at ${PARKEDAT})<br>exten => s,n,Set(DB(LastParkedAt)=${PARKEDAT})<br>exten => s,n,Hangup
<br><br>-A.<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>