[Asterisk-Users] CALLERIDNUM::3 do not working on 1.2.1

trixter aka Bret McDanel trixter at 0xdecafbad.com
Sat Jan 14 07:17:31 MST 2006


On Sat, 2006-01-14 at 14:49 +0100, Pisac wrote:
> I maked mistake in my previous e-mail, but in my dialplan I didn't make
> this mistake. So, my intention in previous e-mail was to write:
> 
> ${CALLERIDNUM:3} erase first 3 digits
> ${CALLERIDNUM::3} returns first 3 digits
> ${CALLERIDNUM:3:3} should erase first 3 digits and return next 3 digits
> 
> So,
> if
> ${CALLERIDNUM}=0123456789
> Then
> ${CALLERIDNUM:3} returns 3456789
> ${CALLERDINUM::3} returns 012
> ${CALLERIDNUM:3:3} returns 345

using SVN-branch-1.2-r7847M+trxtel (no modifications to this part per
the +trxtel stuff) I get

-- Executing NoOp("SIP/31-f1eb", "19164048307") in new stack
-- Executing NoOp("SIP/31-f1eb", "64048307") in new stack
-- Executing NoOp("SIP/31-f1eb", "19164048307") in new stack
-- Executing NoOp("SIP/31-f1eb", "640") in new stack
-- Executing NoOp("SIP/31-4f86", "191") in new stack

from
exten => 4,1,noop(${CALLERIDNUM})
exten => 4,2,noop(${CALLERIDNUM:3})
exten => 4,3,noop(${CALLERIDNUM::3})
exten => 4,4,noop(${CALLERIDNUM:3:3})
exten => 4,5,noop(${CALLERIDNUM:0:3})

The only one that didnt work as you described was the '::3' and once I
implicitly stated '0' as the starting offset it works as you
described.  

What version of 1.2 are you using?

-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
http://www.sacaug.org/ Sacramento Asterisk Users Group
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060114/38b2d55e/attachment.pgp


More information about the asterisk-users mailing list