1 msgRTCP NTP clock skew detected
3 msgqozap and zt_alarm_notify_no_master_change
2 msgOnce Touch Recording
3 msgSTDERR in AGI
2 msghotline with Polycom
1 msgLooking to buy VoIP or Hosting Company
1 msgConsole channels with two sound cards?
4 msgUse of ChanSpy
3 msgCDR

Bug in Ex-Girlfriend logic?
\ Douglas Garstang (21 Jun 2007)

1 msgForward to my phones the domain of the CALLERID...
2 msgTDM800P - zaptel service startup problem
1 msgRe: identifying what a user pressed to reach my...
3 msgidentifying what a user pressed to reach my phone
1 msgENC: Action Originate (Asterisk Manager) XMonit...
4 msgZaptel wct2xxp driver causes LEDs to go black a...
1 msgretreiving callid of call from the dial applica...
8 msgAudioCodes Gateway and Asterisk
1 msgUsing Queue - Zap problems (PRI)
3 msgTDM400 one way calls
Subject:Bug in Ex-Girlfriend logic?
Group:Asterisk-users
From:Douglas Garstang
Date:21 Jun 2007


 


I have this in my dialplan...



[general]

static=yes

writeprotect=no

clearglobalvars=no



[start]

exten => 5000,1,Answer

exten => 5000,n,Wait(1)

exten => 5000,n,NoOp(${CALLERID(num)})

exten => 5000,n,Playback(tt-monkeys)



which, when I dial 5000, executes this...



== Parsing '/etc/asterisk/sip_notify.conf': Found

-- Executing [5000@start:1] Answer("SIP/5000-0a281f80", "") in new
stack

-- Executing [5000@start:2] Wait("SIP/5000-0a281f80", "1") in new
stack

-- Executing [5000@start:3] NoOp("SIP/5000-0a281f80", "19256002182")
in new stack

-- Executing [5000@start:4] Playback("SIP/5000-0a281f80",
"tt-monkeys") in new stack

-- <SIP/5000-0a281f80> Playing 'tt-monkeys' (language 'en')



However, when I change the extension match to:



exten => 5000/19256002182,1,Answer

exten => 5000/19256002182,n,Wait(1)

exten => 5000/19256002182,n,NoOp(${CALLERID(num)})

exten => 5000/19256002182,n,Playback(tt-monkeys)



nothing appears on the console and I get no match. You can see the
caller id number is 19256002182 from the NoOp() when it does work.



This had me stumped for a while, until I realized that the following
_DOES_ work:



[general]

static=yes

writeprotect=no

clearglobalvars=no



[start]

exten => 5000,1,NoOp(Foo)



exten => 5000/19256002182,1,Answer

exten => 5000/19256002182,n,Wait(1)

exten => 5000/19256002182,n,NoOp(${CALLERID(num)})

exten => 5000/19256002182,n,Playback(tt-monkeys)



Yes. That's right. In order for the ex-girlfriend logic to match a
caller id of 19256002182 against 5000, the same context also needs to
have an extension for 5000, even if you intend to do nothing with it.
I'd never noticed this before, because normally you'd provision the 5000
extension FIRST and then the 5000/19256002182 after that.



Seems like a bug to me.... Problem was reproduced in 1.2.13, 1.2.19 and
1.4.4.



Doug.






_______________________________________________
--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


© 2004-2008 readlist.com