[Asterisk-Users] Processing incoming calls with multiple contextstover PRI

Lyle Giese lyle at lcrcomputer.net
Sun Jan 30 19:20:34 MST 2005


In zaptel.conf, put the line associated with 8350 in the context bpns-external and when an external call comes in on 8350, it will drop to the s step in bpns-external.  I would suggest that you do something with the call if they don't bother to dial an extension, like send to a general voice mail box or ring all phones then drop int the general voice mail.

Lyle

  ----- Original Message ----- 
  From: Jason Brown 
  To: asterisk-users at lists.digium.com 
  Sent: Sunday, January 30, 2005 7:59 PM
  Subject: [Asterisk-Users] Processing incoming calls with multiple contextstover PRI


  So I have a problem. A customer of mine wants a PBX, owns an office building. I want to sell him on asterisk.  He has 4 tenants. I am using my asterisk box to simulate it. My asterisk box has a TDM400P card, not a PRI card. Don't know if it makes any difference.

   

  Anyway, I want to route incoming phone calls to different contexts based on the phone number being called.

   

  Here is my extensions.conf

   

  [incoming-calls]

  exten => _4078698350,1,Goto,bpns-external|${EXTEN}|1

  exten => _4078698353,1,Goto,demo1-external|${EXTEN}|1

  exten => _4078698359,1,Goto,demo2-external|${EXTEN}|1

  exten => _4078698360,1,Goto,demo3-external|${EXTEN}|1

   

  [outgoing-calls]

  exten => _407NXXXXXX,1,Dial(ZAP/g1/${EXTEN},60)

  exten => _321NXXXXXX,1,Dial(ZAP/g1/${EXTEN},60)

  exten => _1800NXXXXXX,1,DIal(ZAP/g1/${EXTEN},60)

  exten => _1866NXXXXXX,1,Dial(ZAP/g1/${EXTEN},60)

  exten => _1877NXXXXXX,1,Dial(ZAP/g1/${EXTEN},60)

  exten => _1888NXXXXXX,1,Dial(ZAP/g1/${EXTEN},60)

  exten => _1NXXNXXXXXX,1,Dial(IAX2/402 at voipjet/${EXTEN},60)      ;voipjet NANPA

  exten => _011.,1,Dial(IAX2/402 at voipjet/${EXTEN},60)             ;voipjet WORLD

   

  [bpns-external]

  exten => s,1,Playback,bpnsmenu

  exten => 1,1,Dial(SIP/1003,20,tr)

  exten => 1,2,Voicemail,u1003

  exten => 1,102,Voicemail,b1003

  exten => 2,1,Dial(SIP/1001,20,tr)

  exten => 2,2,Voicemail,u1001

  exten => 2,102,Voicemail,b1001

  exten => 3,1,Dial(SIP/1002,20,tr)

  exten => 3,2,VOicemail,u1002

  exten => 3,102,Voicemail,b1002

  exten => 1001,1,Dial(SIP/1001,20,tr)

  exten => 1001,2,Voicemail,u1001

  exten => 1001,102,VOicemail,b1002

  exten => 1002,1,Dial(SIP/1002,20,tr)

  exten => 1002,2,Voicemail,u1002

  exten => 1002,102,Voicemail,b1002

  exten => 1003,1,Dial(SIP/1003,20,tr)

  exten => 1003,2,Voicemail,u1003

  exten => 1003,102,Voicemail,b1003

  exten => 8500,1,VoicemailMain

  exten => t,1,Hangup

   

  [bpns-internal]

  include => outgoing-calls

  exten => 1001,1,Dial(SIP/1001,20,tr)

  exten => 1001,2,Voicemail,u1002

  exten => 1001,102,Voicemail,b1002

  exten => 1002,1,Dial(SIP/1002,20,tr)

  exten => 1002,2,Voicemail,u1002

  exten => 1002,102,Voicemail,u1002

  exten => 1003,1,Dial(SIP/1003,20,tr)

  exten => 1003,2,Voicemail,u1003

  exten => 1003,103,Voicemail,b1003

  exten => 1767,1,Dial(SIP/1001,20,tr)

  exten => 1767,2,Voicemail,u1001

  exten => 1767,102,Voicemail,b1001

  exten => 8500,1,VoicemailMain

   

  [demo1-external]

  exten => s,1,Dial(SIP/1010,20,tr)

  exten => s,2,Voicemail,u1010

  exten => s,102,Voicemail,b1010

  exten => 8500,1,VoicemailMain

   

  [demo1-internal]

  include => demo1-external

  include => bpns-internal

  include => outgoing-calls

   

  [demo2-external]

  exten => s,1,Dial(SIP/1030,20,tr)

  exten => s,2,Voicemail,u1030

  exten => s,102,Voicemail,b1030

  exten => 8500,1,VoicemailMain

   

  [demo2-internal]

  include => demo2-external

  include => bpns-internal

  include => outgoing-calls

   

  [demo3-external]

  exten => s,1,Dial(SIP/2000,20,tr)

  exten => s,2,Voicemail,u2000

  exten => s,102,Voicemail,b2000

  exten => 8500,1,VoicemailMain

   

  [demo3-internal]

  include => demo3-external

  include => bpns-internal

  include => outgoing-calls

   

  It doesn't work. I have a couple asterisk guru friends who swear it should work. Here is what asterisk tells me in verbose mode:

   

   

      -- Starting simple switch on 'Zap/1-1'

  Jan 30 20:46:02 WARNING[7140]: chan_zap.c:5586 ss_thread: CallerID returned with error on channel 'Zap/1-1'

    == Starting Zap/1-1 at incoming-calls,s,1 failed so falling back to exten 's'

    == Starting Zap/1-1 at incoming-calls,s,1 still failed so falling back to context 'default'

  Jan 30 20:46:02 WARNING[7140]: pbx.c:1942 ast_pbx_run: Channel 'Zap/1-1' sent into invalid extension 's' in context 'default', but no invalid handler

  n       Hungup 'Zap/1-1'  

   

  Now I understand it is looking for the startup point. I don't understand why. 2 other asterisk guys I know swear it's supposed to work, although they are using sip/iax and not zap for input.

   

  Anyone have any ideas?

   

  Thanks



------------------------------------------------------------------------------


  _______________________________________________
  Asterisk-Users mailing list
  Asterisk-Users at lists.digium.com
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
     http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050130/259764a3/attachment.htm


More information about the asterisk-users mailing list