[Asterisk-Users] SIP & ALERT_INFO for distinctive ring

Cirelle Enterprises gcirino at cirelle.com
Fri Nov 12 14:32:45 MST 2004


>----- Original Message ----- 
>From: "Kubat, Philip" <pkubat at kubat.com>
>To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" <asterisk-users at lists.digium.com>
>Sent: Friday, November 12, 2004 1:08 PM
>Subject: RE: [Asterisk-Users] SIP & ALERT_INFO for distinctive ring
>

>Agreed, works fine on creating calls, e.g outbound.
>
>What I am looking for; is there means to capture this (maybe via a variable)
>on call into Asterisk?

This may or may not work for you but this is what we have:

Scenario:

4 inbound lines using a TDM 4 FXO and 4 SIP extensions.

when a call comes in on line 1 ( give a standard ring),
line2 (ring2) , and line3 etc...


[zaptel.conf]
span=1,1,0,esf,b8zs,yellow
nethdlc=1-24                                                                                                                        
fxsks=25-28        <<< 4 pots lines                                                                                                       
loadzone = us
defaultzone=us


[zapata.conf]
;fxsks=25
callerid=asreceived
context => incoming-line1
musiconhold = line1moh
signalling=fxs_ks 
channel => 25

;fxsks=26
callerid=asreceived
context => incoming-line2
musiconhold = line2moh
signalling=fxs_ks
channel => 26

;fxsks=27
callerid=asreceived
context => incoming-line3
musiconhold = line3moh
signalling=fxs_ks
channel => 27

;fxsks=28
callerid=asreceived
context => incoming-line4
musiconhold = line4moh
signalling=fxs_ks
channel => 28

loadzone=us
defaultzone=us


[extensions.conf]
...
[incoming-line1]
exten => s,1,NoOp() 
exten => s,2,zapateller()
exten => s,3,SetGlobalVar(CALLSOURCE=121)
exten => s,4,Goto(${CALLSOURCE},${CALLSOURCE},1)
exten => s,5,Hangup

[incoming-line2]
exten => s,1,NoOp() 
exten => s,2,zapateller()
exten => s,3,SetGlobalVar(CALLSOURCE=122)
exten => s,4,Goto(${CALLSOURCE},${CALLSOURCE},1)
exten => s,5,Hangup

(repeat for lines 3 and 4)
...

[121]
exten => 121,1,SetVar(Ext=121)
exten => 121,2,SetVar(Ext2=122)
exten => 121,3,SetVar(ALERT_INFO=Bellcore-r2) <<<<< set the ring for calls from FXO- line1
exten => 121,4,SetMusicOnHold,homeline 
exten => 121,5,Dial(SIP/${Ext}&SIP/${Ext2},15,Tr)
exten => 121,6,goto(s-${DIALSTATUS},1 )
; go here for no anwer
exten => s-NOANSWER,1,Goto(s-${DIALSTATUS},2)
exten => s-NOANSWER,2,Wait(3)
exten => s-NOANSWER,4,Goto(s-${DIALSTATUS},5)
exten => s-NOANSWER,5,Voicemail(${Ext})
exten => s-NOANSWER,6,Goto(${${Ext}.9)
;go here for a busy line
exten => s-BUSY,1,Goto(s-BUSY,2)
exten => s-BUSY,2,Wait(3)
exten => s-BUSY,4,Goto(s-BUSY,5)
exten => s-BUSY,5,Voicemail(${Ext})
exten => s-BUSY,6,Goto(40852,9)
;done
exten => 40852,9,Hangup

etc... etc... etc... for each extension.


What this does for us is to separate the rings coming from specific pots lines
could also be adapted to other lines (iax, etc...) I believe.

Hope this helps

Greg




More information about the asterisk-users mailing list