Rajeev Natarajan
2007-Dec-03 10:16 UTC
[asterisk-users] Problem: Using timelimit (L) and Macro (M) in Dial from AGI
Am using perl AGI to invoke the dial command thus: $AGI->exec('Dial',"$numtodial2|30|L($maxcall:$msgtime)|M(conn^1002)"); What I expected that this will do is: 1. call the number using the string $numtodial2 - works OK 2. Set call limit to $maxcall and play a message $msgtime milliseconds before the call - works OK 3. On connect of the call send it to the macro conn -extension s,1 with a parameter 1002 - Doesn't work I noticed that if I interchange the L and M to read thus: $AGI->exec('Dial',"$numtodial2|30|M(conn^1002)|L($maxcall:$msgtime)"); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071203/aa65ab76/attachment.htm
Rajeev Natarajan
2007-Dec-03 10:20 UTC
[asterisk-users] Problem: Using timelimit (L) and Macro (M) in Dial from AGI
Am using perl AGI to invoke the dial command thus: $AGI->exec('Dial',"$numtodial2|30|L($maxcall:$msgtime)|M(conn^1002)"); What I expected that this will do is: 1. call the number using the string $numtodial2 - works OK 2. Set call limit to $maxcall and play a message $msgtime milliseconds before the call - works OK 3. On connect of the call send it to the macro conn -extension s,1 with a parameter 1002 - **does not work** I noticed that if I interchange the L and M to read thus: $AGI->exec('Dial',"$numtodial2|30|M(conn^1002)|L($maxcall:$msgtime)"); 1. It dials fine 2. Transfers the call to the macro 3. ** does not** set timelimit How can I do both - set timelimit and pass call to the Macro - is there something that is mutually exclusive about the two functions that it does not let me do this? thanks rajeev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071203/959fcaad/attachment.htm
Mark Michelson
2007-Dec-03 15:01 UTC
[asterisk-users] Problem: Using timelimit (L) and Macro (M) in Dial from AGI
Rajeev Natarajan wrote:> Am using perl AGI to invoke the dial command thus: > > $AGI->exec('Dial',"$numtodial2|30|L($maxcall:$msgtime)|M(conn^1002)");The problem is that you have one too many pipes ('|') in your Dial string. Change it to this: $AGI->exec('Dial',"$numtodial2|30|L($maxcall:$msgtime)M(conn^1002)"); and it should work. Notice that the pipe between the L and M options has been removed. Mark Michelson