[Asterisk-Users] Incoming context based on ISDN MSN

Robert Sprockeels rsp+asterisk at boat.be
Tue Feb 24 16:28:54 MST 2004


Jean-Denis,

Great! Why didn't I think of that! Merci beaucoup, I'll try it out
tomorrow (it's a little too late now ;-)).

I did some tests on my own, and came up with another method that seems
to work, based on GoToIf() and the DNID variable. It goes something like
this:

[isnd-in]
exten => s,1,GoToIf(${DNID} = 2225512?201:2)
;--- professional part
exten => s,2,Dial(${PHONE1}&${PHONE2}&${PHONE3},20,tm)
exten => s,3,Voicemail(u${PROVOICEMAIL})
exten => s,4,Hangup
exten => s,103,Voicemail(b${PROVOICEMAIL})
exten => s,104,Hangup
;--- private part
exten => s,201,Dial(${PHONE10},20,tm)
exten => s,202,Voicemail(u${PRIVVOICEMAIL})
exten => s,203,Hangup
exten => s,302,Voicemail(b${PRIVVOICEMAIL})
exten => s,303,Hangup

Thanks for your help.

Robert

> > My question: is there a way of detecting and using the MSN number on
> > which the call was received to be able to route it into a certain
> > context? I mean for example MSN 2225511 => professional context, 2225512
> > => private context, and why not, 2225513 => fax/data context.

> This is the dialplan I use on my single ISDN line with numbers 541295, 
> 541296 541297, 541298, 541299. Incoming ISDN is sent to context rnis in 
> modem.conf. Normal calls are received on 541295 541296. I use 541299 to 
> check voicemail from outside, 51297 for echo test...
> 
> Hope that helps,
> 
> [rnis]
> exten => s,1,SetMusicOnHold(default)
> 
> ; -------------------------------- Appel de la maison
> exten => s/483527,2,Wait(0)
> exten => s/483527,3,Dial(${SIP1},20,m)
> 
> ; -------------------------------- Défaut
> exten => s,2,Playback(esoft/bienvenue)
> exten => s,3,Dial(${JACK0}&${PC1}&${PC2}&${SIP1}&${SIP2},20,mt)
> exten => s,4,Playback(fr/vm-intro)
> exten => s,5,Voicemail2(s1000)		; Nobody here...
> exten => s,6,Playback(esoft/merci)
> exten => s,7,Hangup
> exten => s,104,Playback(fr/vm-intro)
> exten => s,105,Voicemail2(s1000)	; Busy
> exten => s,106,Goto,8
> 
> ; -------------------------------- Appel au 541297 => Test echo
> exten => 1297,1,Goto(echotest,s,1)
> exten => 1297,2,Hangup
> 
> ; -------------------------------- Appel au 541298
> exten => 1298,1,Wait,1
> exten => 1298,2,Answer
> exten => 1298,3,Agi(auth.agi)
> exten => 1298,4,Hangup
> 
> ; -------------------------------- Appel au 541299 => Ecoute Voicemail
> ;exten => 1299,1,VoicemailMain(1000)
> exten => 1299,1,VoicemailMain2(1000)
> exten => 1299,2,Hangup






More information about the asterisk-users mailing list