środa, 3 października 2012

Asterisk CallerID - kilka numerów na jednym trunku



Zawartość /etc/asterisk/extensions.conf

exten => _X.,1,GotoIf($["${CALLERID(num)}" = "101"]?dial101)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "102"]?dial102)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "103"]?dial103)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "104"]?dial104)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "105"]?dial105)
exten => _X.,n(dial101),Set(CALLERID(all)=48xXxXx50)
exten => _X.,n,Dial(SIP/trunk/${EXTEN},,r)
exten => _X.,n,Hangup()
exten => _X.,n(dial102),Set(CALLERID(all)=48xXxXx51)
exten => _X.,n,Dial(SIP/trunk/${EXTEN},,r)
exten => _X.,n,Hangup()
exten => _X.,n(dial103),Set(CALLERID(all)=48xXxXx53)
exten => _X.,n,Dial(SIP/trunk/${EXTEN},,r)
exten => _X.,n,Hangup()
exten => _X.,n(dial103),Set(CALLERID(all)=48xXxXx52)
exten => _X.,n,Dial(SIP/trunk/${EXTEN},,r)
exten => _X.,n,Hangup()
exten => _X.,n(dial105),Set(CALLERID(all)=48xXxXx54)
exten => _X.,n,Dial(SIP/trunk/${EXTEN},,r)
exten => _X.,n,Hangup()