kjcsb
2007-Feb-26 18:20 UTC
[asterisk-users] Playback uses channel's language, background doesn't
I have the following in the dialplan: [macro-systemrecording] exten => s,1,Goto(${ARG1},1) exten => dorecord,1,Record(/tmp/${CALLERID(number)}-ivrrecording:wav) exten => dorecord,n,Wait(1) exten => dorecord,n,Goto(confmenu,1) exten => docheck,1,Playback(/tmp/${CALLERID(number)}-ivrrecording) exten => docheck,n,Wait(1) exten => docheck,n,Goto(confmenu,1) exten => confmenu,1,Background(to-listen-to-it&press-1&to-rerecord-it&press-star|m||macro-systemrecording) exten => confmenu,n,Read(RECRESULT||1|||4) exten => confmenu,n,GotoIf($["x${RECRESULT}"="x*"]?dorecord,1) exten => confmenu,n,GotoIf($["x${RECRESULT}"="x1"]?docheck,1) exten => confmenu,n,Goto(1) exten => 1,1,Goto(docheck,1) exten => *,1,Goto(dorecord,1) exten => t,1,Playback(goodbye) exten => t,n,Hangup exten => i,1,Playback(pm-invalid-option) exten => i,n,Goto(confmenu,1) exten => h,1,Hangup When this is called the following is shown in the CLI -- Goto (macro-systemrecording,docheck,1) -- Executing Playback("SIP/223344-0928bbb8", "/tmp/2595-ivrrecording") in new stack -- Playing '/tmp/2595-ivrrecording' (language 'nz') -- Executing Wait("SIP/223344-0928bbb8", "1") in new stack -- Executing Goto("SIP/223344-0928bbb8", "confmenu|1") in new stack -- Goto (macro-systemrecording,confmenu,1) -- Executing BackGround("SIP/223344-0928bbb8", "to-listen-to-it&press-1&to-rerecord-it&press-star|m||macro-systemrecording") in new stack -- Playing 'to-listen-to-it' (language '') As can be seen, Playback uses the channel's language 'nz' but BackGround does not. Could anyone advise what I'm doing wrong? Thanks Cameron ___________________________________________________________ New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070226/47866227/attachment.htm
Moises Silva
2007-Feb-26 18:35 UTC
[asterisk-users] Playback uses channel's language, background doesn't
it may be a bug, try creating a simple test script with only 2 extensions, one with playback the other one with background and see how it works, also post here the asterisk version you are using. Regards On 2/26/07, kjcsb <kjcsb@yahoo.com> wrote:> > I have the following in the dialplan: > [macro-systemrecording] > exten => s,1,Goto(${ARG1},1) > exten => > dorecord,1,Record(/tmp/${CALLERID(number)}-ivrrecording:wav) > exten => dorecord,n,Wait(1) > exten => dorecord,n,Goto(confmenu,1) > exten => > docheck,1,Playback(/tmp/${CALLERID(number)}-ivrrecording) > exten => docheck,n,Wait(1) > exten => docheck,n,Goto(confmenu,1) > exten => > confmenu,1,Background(to-listen-to-it&press-1&to-rerecord-it&press-star|m||macro-systemrecording) > exten => confmenu,n,Read(RECRESULT||1|||4) > exten => > confmenu,n,GotoIf($["x${RECRESULT}"="x*"]?dorecord,1) > exten => > confmenu,n,GotoIf($["x${RECRESULT}"="x1"]?docheck,1) > exten => confmenu,n,Goto(1) > exten => 1,1,Goto(docheck,1) > exten => *,1,Goto(dorecord,1) > exten => t,1,Playback(goodbye) > exten => t,n,Hangup > exten => i,1,Playback(pm-invalid-option) > exten => i,n,Goto(confmenu,1) > exten => h,1,Hangup > > When this is called the following is shown in the CLI > -- Goto (macro-systemrecording,docheck,1) > -- Executing Playback("SIP/223344-0928bbb8", "/tmp/2595-ivrrecording") > in new stack > -- Playing '/tmp/2595-ivrrecording' (language 'nz') > -- Executing Wait("SIP/223344-0928bbb8", "1") in new stack > -- Executing Goto("SIP/223344-0928bbb8", "confmenu|1") in new stack > -- Goto (macro-systemrecording,confmenu,1) > -- Executing BackGround("SIP/223344-0928bbb8", > "to-listen-to-it&press-1&to-rerecord-it&press-star|m||macro-systemrecording") > in new stack > -- Playing 'to-listen-to-it' (language '') > > As can be seen, Playback uses the channel's language 'nz' but BackGround > does not. Could anyone advise what I'm doing wrong? > > Thanks > > Cameron > ________________________________ > New Yahoo! Mail is the ultimate force in competitive emailing. Find out > more at the Yahoo! Mail Championships. Plus: play games and win prizes. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
kjcsb
2007-Feb-26 21:24 UTC
[asterisk-users] Playback uses channel's language, background doesn't
>it may be a bug, try creating a simple test script with only 2 >extensions, one with playback the other one with background and see >how it works, also post here the asterisk version you are using.Asterisk 1.2.13 exten => 98765,1,Playback(to-listen-to-it) exten => 98764,1,Background(to-listen-to-it|m||macro-systemrecording) exten => 98763,1,Background(to-listen-to-it) -- Executing Playback("SIP/112233-09289b40", "to-listen-to-it") in new stack -- Playing 'to-listen-to-it' (language 'nz') -- Executing Hangup("SIP/112233-09289b40", "") in new stack == Spawn extension (1100006-2000, h, 1) exited non-zero on 'SIP/112233-09289b40' -- Executing BackGround("SIP/112233-09289b40", "to-listen-to-it|m||macro-systemrecording") in new stack -- Playing 'to-listen-to-it' (language '') -- Executing Hangup("SIP/112233-09289b40", "") in new stack == Spawn extension (1100006-2000, h, 1) exited non-zero on 'SIP/112233-09289b40' -- Executing BackGround("SIP/112233-09289b40", "to-listen-to-it") in new stack -- Playing 'to-listen-to-it' (language 'nz') -- Executing Hangup("SIP/112233-09289b40", "") in new stack == Spawn extension (1100006-2000, h, 1) exited non-zero on 'SIP/112233-09289b40' So it seems assume that since I passed a blank language override to the Background application, that I want a blank language. Any ideas on how to get background to use the default language? Regards Cameron ___________________________________________________________ What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070226/80a96642/attachment.htm
kjcsb
2007-Feb-28 18:40 UTC
[asterisk-users] Playback uses channel's language, background doesn't
>http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetLanguage>There you can found how you can get the current language ( the same >used by playback ), so you can set a local variable to the current >language and use it instead of the blank valueThis works: exten => 98764,1,Background(to-listen-to-it|m|${LANGUAGE()}|macro-systemrecording) Wiki updated. Thanks Cameron ___________________________________________________________ All New Yahoo! Mail ? Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070228/0af3b844/attachment.htm