[Asterisk-Dev] ParkAndAnnounce() - trying to add var to indicate parked exten

Steve Blair blairs at isc.upenn.edu
Tue Dec 13 14:26:16 MST 2005


I may have missed the point but this description sounds so much like what I
encountered I had to reply.

I use Asterisk for voicemail only. SER does the call routing and 
registration.
I wanted to add call park to the Asterisk machine but once the called
IP phone blind transfered the call to the parking lot number there was 
no way
for the annouce piece of ParkAndAnnouce to call back.

Well it turns out there is. In my case I needed the Referred-By user. I 
got it
this way:


;
; Call Park
exten => _700,1,Answer
exten => _700,2,Wait(1)
exten => _700,3,SIPGetHeader(REFBY=Referred-By)
exten => 
_700,6,ParkAndAnnounce(parkedcall16:PARKED|7200|SIP/${REFBY:5:5}@12.1.6.3:5060|default|${EXTEN}|3)


Hope this helps,
_Steve

Andrew Latham wrote:

>I looked at this.... I am playing with an Idea for a fix....
>they problem is fun.... :)
>
>On 10/15/05, Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com> wrote:
>  
>
>>On Saturday 15 October 2005 00:28, Andrew Kohlsmith wrote:
>>    
>>
>>>Subject line says it all.  I thought this would be a trivial modification
>>>to ParkAndAnnounce, but it's proving difficult and I can't figure out why.
>>>      
>>>
>>Well I figured out why pbx_builtin_setvar_helper() isn't cutting it, but I'm
>>still no farther ahead.
>>
>>ast_request_and_dial doesn't return until AFTER the channel's been created and
>>dialled, so pbx_builtin_setvar_helper() is too late.
>>
>>No problem, I create an outgoing_helper structure and write the variable in
>>the vars structure pointer and use __ast_request_and_dial instead of
>>ast_request_and_dial:
>>
>>        snprintf(buf, sizeof(buf), "%i", lot);
>>        memset(&oh, 0, sizeof(struct outgoing_helper));
>>        oh.vars = ast_variable_new("PARKEDAT", buf);
>>
>>        dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR,
>>dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
>>
>>So now I'm creating the variable before the channel is connected to Dial, so I
>>should be able to see the PARKEDAT variable...  Unfortunately this isn't
>>true.
>>
>>This is truly baffling.  Can anyone help?
>>
>>-A.
>>_______________________________________________
>>Asterisk-Dev mailing list
>>Asterisk-Dev at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-dev
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>>
>>    
>>
>
>
>--
>---
>Andrew Latham - AKA: LATHAMA (lay-th-ham-eh)
>lathama at lathama.com - lathama at yahoo.com - lathama at gmail.com
>If any of the above are down we have bigger problems than my email!
>---
>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>Asterisk-Dev mailing list
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>  
>



More information about the asterisk-dev mailing list