In article <[EMAIL PROTECTED]>, Rizwan Hisham <[EMAIL PROTECTED]> wrote: > > same is the case in 1.6, i cant set the variable still.
My guess would be that you have a problem with line endings. All lines received from the manager interface are terminated with \r\n, not just \n. If you only strip the \n off, the channel name you received will contain \r at the end. If you then send that back in the setvar command with a further \r\n to terminate the line, then Asterisk will probably not find a matching channel. Make sure you strip both \r and \n from incoming lines. Cheers Tony > On Thu, May 8, 2008 at 8:43 PM, Tzafrir Cohen <[EMAIL PROTECTED]> > wrote: > > > On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote: > > > Hi all, > > > I am using a simple perl script to connect with ast manager api. the > > script > > > tries to set a channel variable. It extracts the channel name from the > > > events it recieves after dial command. When i try to set the channel > > > variable, asterisk responses with an error saying that the channel does > > not > > > exist. Can anybody tell me why its doing so, coz i can see on cli that > > the > > > channel exists. If i try to set the variable without stating the channel > > > then it sets the global variable, but i want to set the channel variable. > > > Anybody has a solution to this problem? > > > > In 1.6 you can set a channel variable from a diferent context. I don't > > think you can do that in 1.4 . > > > > -- > > Tzafrir Cohen > > icq#16849755 jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > > +972-50-7952406 mailto:[EMAIL PROTECTED] > > http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir > > > > _______________________________________________ > > -- 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 > > > > > > -- > Best Regards > Rizwan Hisham > > -=-=-=-=-=- > [Alternative: text/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 > -=-=-=-=-=- -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org _______________________________________________ -- 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