[Asterisk-Users] Displaying incoming e.164 callers number - how?

Mark Elkins mje at posix.co.za
Wed Jan 5 01:22:19 MST 2005


On Tue, 2005-01-04 at 15:34 +0100, Erik Versaevel wrote:
> Mark Elkins wrote:
> >On Tue, 2005-01-04 at 15:45 +0200, Mark Elkins wrote:
> >>On Tue, 2005-01-04 at 15:20 +0200, Mark Elkins wrote:
> >>>I've got asterisk able to make and receive calls via the Internet via
> >>>E164 lookups. If I get such a call - I'd like to display the original

> >>Playing with myself again.... - that is - I called myself - and
> >>got the caller ID of '27128070590'... not quite what I wanted...
> >>
> >>In my extensions - I have...
> >>[fromaix]
> >>exten => 27128070590,1,Goto(default,s,1)

> >And again - changed the above to...
> >[fromaix]
> >exten => 27128070590,1,GotoIf($[${CALLERIDNUM:0:2} = 27]?2:4)
...
> >Default section looks like...
> >[default]               ; what people will get when they call me.
> >exten => s,1,NoOp(CALLER=${CALLERIDNUM})
> >exten => s,2,Answer()

> how about SetCallerId(12345) ;)
> ie
> exten= 27128070590, 2, setcallerid(0${CALLERIDNUM});

This works fine... Thanks.
Incoming AIX looks like...
[fromaix]
exten => 27128070590,1,GotoIf($[${CALLERIDNUM:0:2} = 27]?2:4)
exten => 27128070590,2,setcallerid(0${CALLERIDNUM:2})
exten => 27128070590,3,Goto(default,s,1)
exten => 27128070590,4,setcallerid(09${CALLERIDNUM})
exten => 27128070590,5,Goto(default,s,1)

... and does the right thing...

Of course - this depends on people making e.164+VoIP calls to me
actually setting their Caller ID according to the format '27128070590' -
ie - No plus signs (as for cell/mobile phones), no '00' (or other access
code for international dialling - just the country dialing code followed
by their whole dialing code...   
-- 
  .  .     ___. .__      Posix Systems - Sth Africa.  e.164 VOIP ready
 /| /|       / /__       mje at posix.co.za  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496




More information about the asterisk-users mailing list