You could always do something like this, but I think it may pull more proc than on 2 lines:
exten => s,n,Set(CALLERID(num)=${IF($["foo${CALLERID(num)}" = "foo"]? 0000000000:${CALLERID(num)})}) On Jun 13, 2008, at 9:12 PM, Steve Edwards wrote: > On Sat, 14 Jun 2008, Philipp Kempgen wrote: > >> Venefax schrieb: >>> I have two lines in my dialplan that I wish to make it into only >>> one, and I >>> fail >>> X.,n(entrada),Set(CALLERID(num)=${CALLERID(num)}0000000000) >>> X.,n,Set(CALLERID(num)=${CALLERID(num):0:11}) >>> >>> It means: add '0000000000' to the caller id, and then take the >>> first 11 >>> chars from the left. It aims to detect null caller ids and replace >>> them by >>> zeros. How can I write this expression in just one line? >> >> I think it does multiple passes to evaluate ${} so maybe >> Set(CALLERID(num)=${${CALLERID(num)}0000000000:0:11}) >> works. > > Not in 1.2. > > Thanks in advance, > ------------------------------------------------------------------------ > Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 > PST > Newline Fax: > +1-760-731-3000 > > _______________________________________________ > -- 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 > _______________________________________________ -- 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