[asterisk-users] Parking calls

Sebastian scgm at adinet.com.uy
Wed Dec 3 11:27:28 CST 2008


The thing is I have to wait checking a database value to change the state,
that duration is not long, but on any case I don't know when will be ready
to go on.
If I use MusicOnHold app the dialplan get stuck there and there's no further
movement on my dialplan lines.
I will have a while loop checking for a database value to change, if it
changes the call will go on through the dialplan depending on the result,
but I can't make the call wait without any sound (I thought PlayTones could
be a possibility but I prefere MOH).
For these reasons I can't use a shell script launched in background.
Is there any way to launch in background some app like Background but follow
with the next dialplan line while it plays the sound??
(Just like Ringing does on my solution), I know making a local channel is
not the best solution, but at this moment I can't think on a different one
that not involves agi.

Any idea??


Thanks!

Sebastian


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Atis Lezdins
Sent: miércoles, 03 de diciembre de 2008 03:04 p.m.
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Parking calls

On Wed, Dec 3, 2008 at 1:47 AM, Sebastian <scgm at adinet.com.uy> wrote:
> I found other solution, I can use cannel local to dial to an extension
with
> m parameter, then I can put Ringing as the first thing to do that will
> follow processing the next lines of the dialplan, with the m option MOH
will
> sound instead of ringing, and I can do the heavy work there till I finish
> and do other things with the call.
>
> Thanks!
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Danny
Nicholas
> Sent: martes, 02 de diciembre de 2008 07:37 p.m.
> To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
> Subject: Re: [asterisk-users] Parking calls
>
> This seems to be an AGI/Music on Hold solution to me.  For parking to
work,
> you would have to know which lot you parked the call in and pick it back
up
> when done, assuming that another user did not pick it up and that the
caller
> did not hang up.
>
> From the dialplan, you would call an AGI.  The AGI would do something like
> this:
> print STDOUT "EXEC background /var/lib/asterisk/sounds/wait-moment \n"
> system("program2.agi &")
> exit;
>
> program 2 would run while the sound played.
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Eric
> "ManxPower" Wieling
> Sent: Tuesday, December 02, 2008 3:20 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Parking calls
>
> It is not a parking solution.
>
> Sebastian wrote:
>> Any idea? Please I need advice.
>>
>> Thanks!
>>
>>
>>
>> From: asterisk-users-bounces at lists.digium.com
>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Sebastian
>> Sent: lunes, 01 de diciembre de 2008 11:58 p.m.
>> To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
>> Subject: [asterisk-users] Parking calls
>>
>>
>>
>>
>>
>> Hi,
>>
>>
>>
>> How can I park a call from dialplan and get going??
>>
>>
>>
>> Example:
>>
>>
>>
>>
>>
>> 1.       Answer
>>
>> 2.       While follow = false
>>
>> 3.       ParkCall
>>
>> 4.       Checksomthing à follow = true
>>
>> 5.       Endwhile
>>
>> 6.       UnParkCall
>>
>> 7.       Go on
..
>>
>>
>>
>> The idea is let the call waiting while I do some things on the dialplan,
> is
>> it possible?? Maybe is not parking the solution??
>
>
> --
> Consulting and design services for LAN, WAN, voice and data.  Based near
> Birmingham, AL.  Now accepting clients worldwide. Contact me for Tellabs
> echo canceling systems.  Also see http://www.fnords.org/skillslist.html
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 3659 (20081202) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 3659 (20081202) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>

Hi,

You can try to use MusicOnHold() application to do this. However docs
don't say how to terminate it. I presume that Playback(silence/1)
would stop it, you're welcome to try it out :) That should be better
solution than creating child channel etc.

Also, i'm curious what kind of "massive processing" you need in
dialplan? It's best practice to don't do anything that may delay call
for long, as caller can get bored/angry etc.

If you just have to do something heavy for each call and you don't use
result of that operation to determine next step of call, you can do:

System((/usr/bin/do-something.sh)&)

note, the ampersand after first brackets will make to run shell
command in background.

If you need the result of some operation to send call further, you
should optimize that as much as possible by creating some kind of
cache.

Also, there's a trick - you can launch background shell command at
beginning of call, then send customer to IVR or even Dial() and at
later point check results. For example you can add G or M argument to
Dial() to execute part of dialplan macro/gosub upon answer.

Hope that my explanation helps :)

Regards,
Atis


-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

__________ Information from ESET Smart Security, version of virus signature
database 3660 (20081203) __________

The message was checked by ESET Smart Security.

http://www.eset.com






More information about the asterisk-users mailing list