This code executes just fine, and leaves the SIP peer's mailbox setting from sip.conf in variable target. exten => 1,1,Set(target=${CHANNEL:4}-) exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox}) exten => 1,n,VoiceMailMain(${target}) However, every time it runs I get an error in the CLI as follows WARNING[5629]: pbx.c:1366 ast_func_read: Can't find trailing parenthesis? This happens right after it executes the first line of code, then execution continues normally. I've looked at this until my eyes crossed at don't see any unbalanced parens or brackets. Perhaps I shouldn't worry since it seems to work, but what's going on here? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060505/9b4e5323/attachment.htm
Did you mean to have the dash inside the braces -- this may be your problem. on Friday 05/05/2006 David L. West(nntp@deskoptional.com) wrote > This code executes just fine, and leaves the SIP peer's mailbox setting from sip.conf in variable target. > > exten => 1,1,Set(target=${CHANNEL:4}-) > exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox}) > exten => 1,n,VoiceMailMain(${target}) > > However, every time it runs I get an error in the CLI as follows > > WARNING[5629]: pbx.c:1366 ast_func_read: Can't find trailing parenthesis? > > This happens right after it executes the first line of code, then execution continues normally. I've looked at this until my eyes crossed at don't see any unbalanced parens or brackets. Perhaps I shouldn't worry since it seems to work, but what's going on here? > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> > <META content="MSHTML 6.00.5346.5" name=GENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY> > <DIV><FONT face="Courier New" size=2>This code executes just fine, and leaves > the SIP peer's mailbox setting from sip.conf in variable target.</FONT></DIV> > <DIV><FONT face="Courier New" size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2> exten => > 1,1,Set(target=${CHANNEL:4}-)<BR> exten => > 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox})<BR> exten > => 1,n,VoiceMailMain(${target}) </FONT></DIV> > <DIV><FONT face="Courier New" size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2>However, every time it runs I get an error > in the CLI as follows </FONT></DIV> > <DIV><FONT face="Courier New" size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2> WARNING[5629]: > pbx.c:1366 ast_func_read: Can't find trailing parenthesis?</FONT></DIV> > <DIV><FONT face="Courier New" size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2>This happens right after it executes > the first line of code, then execution continues normally. </FONT><FONT > face=Arial size=2><FONT face="Courier New">I've looked at this until my</FONT> > <FONT face="Courier New">eyes crossed at don't see any unbalanced parens or > brackets. Perhaps I shouldn't worry since it seems to work, but what's going on > here?</FONT><BR></FONT></DIV></BODY></HTML> > _______________________________________________ > --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 -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com
At 02:06 PM 5/5/2006, you wrote:> exten => 1,1,Set(target=${CHANNEL:4}-) > >However, every time it runs I get an error in the CLI as follows > > WARNING[5629]: pbx.c:1366 ast_func_read: Can't find trailing parenthesis? > >This happens right after it executes the first line of code, then >execution continues normally. I've looked at this until my eyes >crossed at don't see any unbalanced parens or brackets. Perhaps I >shouldn't worry since it seems to work, but what's going on here?I guess I'd have to ask, what's in CHANNEL? Ira
On Fri, May 05, 2006 at 03:06:43PM -0600, David L. West spake thusly:> This code executes just fine, and leaves the SIP peer's mailbox setting from sip.conf in variable target. > > exten => 1,1,Set(target=${CHANNEL:4}-) > exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox})^ ^ ^ " " There's definitely a ) missing in this line! A good text editor with bracket matching (I'm using vim now) makes it a lot easier to find this sort of thing. -- Jon-o Addleman - http://redowl.dyndns.org
Oh, on the off chance that it's interesting to anybody what I'm actually doing here. I have two SIP devices, "dave" and "dave-laptop". I want to have one voicemail box but be able to check it from either one. In sip.conf, both devices have "mailbox=dave". It's this setting that I'm retrieving with the code below and passing into VoiceMailMain. "David L. West" <nntp@deskoptional.com> wrote in message news:e3gep4$os9$1@sea.gmane.org... This code executes just fine, and leaves the SIP peer's mailbox setting from sip.conf in variable target. exten => 1,1,Set(target=${CHANNEL:4}-) exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox}) exten => 1,n,VoiceMailMain(${target}) However, every time it runs I get an error in the CLI as follows WARNING[5629]: pbx.c:1366 ast_func_read: Can't find trailing parenthesis? This happens right after it executes the first line of code, then execution continues normally. I've looked at this until my eyes crossed at don't see any unbalanced parens or brackets. Perhaps I shouldn't worry since it seems to work, but what's going on here? ------------------------------------------------------------------------------ _______________________________________________ --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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060505/7fd5212b/attachment.htm
On 5/5/06 10:45 PM, "David L. West" wisely said:>> exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}:mailbox})Well: Exten => 1,n,Set(target=${SIPPEER(${CUT(target,,1)}):mailbox}) It looks like you didn?t end the parenthesis for SIPPEER(). Maybe? ~~Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060505/dd3a9c3a/attachment.htm