Jason Brown
2005-Jan-30 18:59 UTC
[Asterisk-Users] Processing incoming calls with multiple contextst over 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@voipjet/${EXTEN},60) ;voipjet
NANPA
exten => _011.,1,Dial(IAX2/402@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
* 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20050130/44b06e71/attachment.htm
el Flynn
2005-Jan-30 19:09 UTC
[Asterisk-Users] Processing incoming calls with multiple contextst over PRI
Jason Brown wrote:> 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. ><snip> Just a guess about your problems, but if you have a PRI line incoming, wouldn't you need to connect it to a PRI card and not the TDM400P (which is for analog POTS lines)?? Flynn
Kevin P. Fleming
2005-Jan-30 19:09 UTC
[Asterisk-Users] Processing incoming calls with multiple contextst over PRI
Jason Brown wrote:> 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.And why would you think those would act similarly? They don't. Zap channels without ISDN or R2 signaling don't have a target extension to deliver to. They have no idea what phone number was called to make that channel ring, they only know the channel is ringing. They send the call to the "s" extension in whatever context you direct them to. For now, you can simulate what you want by making each channel on the TDM400 go to a separate inbound context, and then using Goto() to go from there to the desired "incoming number" in your "incoming" context. With a PRI (which is what you would likely install in a real application of this type), you would actually receive the dialed number from the telco, and could route the call based on that.
david
2005-Jan-30 19:18 UTC
[Asterisk-Users] Processing incoming calls with multiple contextstover PRI
Hi,Jason,
The TDM400P card failed to get the Callee number or DID, so the * don't
know how to route the call. There are something difference between the analog
line and the PRI line.
Regards.
David
http://www.iaxtalk.com
----- Original Message -----
From: Jason Brown
To: asterisk-users@lists.digium.com
Sent: Monday, January 31, 2005 9:59 AM
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@voipjet/${EXTEN},60) ;voipjet
NANPA
exten => _011.,1,Dial(IAX2/402@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@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/f75c98ca/attachment.htm
Lyle Giese
2005-Jan-30 19:20 UTC
[Asterisk-Users] Processing incoming calls with multiple contextstover PRI
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@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@voipjet/${EXTEN},60) ;voipjet
NANPA
exten => _011.,1,Dial(IAX2/402@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@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