[asterisk-users] DIDs

Alex Balashov abalashov at evaristesys.com
Sat Nov 21 09:24:43 CST 2009


Thomas,

Thomas Perron wrote:

> I have two DID numbers.  I want to configurate my IVR to initiate a 
> context 1 if I dial DID 1.
> If DID2 is dialed then start with context 2.

Assuming that the DID originator sends you the number in the Request 
URI, you can just treat them like "extensions" in Asterisk.  Example: 
if you have DID 6789540670 and 6789540671:

    exten => 6789540670,1,Goto(context_1,${EXTEN},1)
    exten => 6789540671,1,Goto(context_2,${EXTEN},1)

    [context_1]

    ; IVR

    exten => 6789540670,1,Answer
    exten => 6789540670,n,Playback(hello-world)
    exten => 6789540670,n,Hangup

    [context_2]

    exten => 6789540671,1,Dial(SIP/abalashov,30,r)
    exten => 6789540671,n,Congestion

-- Alex

-- 
Alex Balashov - Principal
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671



More information about the asterisk-users mailing list