[Asterisk-Dev] How to pass a complex tone to Playtones

Martin Pycko martinp at digium.com
Tue Jun 17 08:05:54 MST 2003


The playtones application takes for arguments the *names*
of the tones defined in indications.conf config file.
Furthermore it's not related to the way extensions.conf parsing
works.

regards
Martin

On Tue, 17 Jun 2003, Stephen Davies wrote:

> Hi,
>
> Is there an explanation of how extensions.conf is parsed?
>
> I've just been trying to figure out how to pass a complex tone into
> Playtones?
>
> Doing:
>
>   exten => 3,1,Playtones(400*33/400,0/200,400*33/400,0/2000)
>
> (The * is something I'm working on)
>
> The commas are treated as parameter separators.  By the time the
> argument gets to handle_playtones in res/res_indications.c, it looks
> like 400*33/400|0/200|400*33/400|0/2000.
>
> If I do:
>
>   exten => 3,1,Playtones,400*33/400,0/200,400*33/400,0/2000
>
> Then handle_playtones only sees 400*33/400 - the rest is gone
>
>   exten => 3,1,Playtones("400*33/400,0/200,400*33/400,0/2000")
>
> results in handle_playtones getting the whole contents of the
> () including the quotes, which handles_playtones doesn't handle.
>
> I eventually found that:
>
>   exten => 3,1,Playtones,"400*33/400,0/200,400*33/400,0/2000"
>
> worked...
>
> It all seems pretty inconsistent to me.  Perhaps it shows that I
> really don't understand how extensions.conf is parsed...
>
> (The *, by the way, gets the one tone modulating the other.  Needed to
> match some countries' indications.  Patch coming)
>
> Thanks,
> Steve
>
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>




More information about the asterisk-dev mailing list