Hi,
I am having a few dial plan problems which I wondered if anyone would be
able to help with.
Firstly, I wanted to send 0800 calls through 1 sip provider and other
08xx calls through another. I have this:
exten => _0800.,1,Dial(SIP/${EXTEN}@provider1,30)
exten => _0800.,2,Congestion
exten => _08.,1,Dial(SIP/${EXTEN}@provider2,30)
exten => _08.,2,Congestion
However, whichever way round I put these, 0800 calls still seem to go
out of provider2.
I fixed this as follows:
exten => _08[1-9].,1,Dial(SIP/${EXTEN}@provider2,30)
exten => _08[1-9].,2,Congestion
..but, is there another way of getting this working without putting
exceptions into other dial plan rules? - it works in this example but
would be a pain in anything more complicated.
For example, I had the same problem with a provider who has some service
numbers in the format 09XX but the dial plan for these was not getting
detected because of my _0. dial plan for national phone calls.
Am I missing something here?
Also, I can't seem to get the invalid extension working. I have a
context which has some incoming calls sent to it. I then have an
extension for each number. What I want is to play an invalid message if
anyone comes into that context on another number.
I tried this by commenting the entries for 1 of my working numbers out
and putting this in:
exten => i,1,Playback(invalid)
exten => i,2,Hangup
.. but when I call the number I commented out, Asterisk doesn't see the
call (no logging) - I just get a beep and the call ends. If I put the
extension for that number back in, it works fine.
Any ideas?
Thanks!
--ian
http://www.voip-info.org/wiki-Asterisk+config+extensions.conf+sorting
Erik
-----Oorspronkelijk bericht-----
Van: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] Namens Ian Chilton
Verzonden: dinsdag 14 december 2004 11:33
Aan: asterisk-users@lists.digium.com
Onderwerp: [Asterisk-Users] Dial Plan Problems
Hi,
I am having a few dial plan problems which I wondered if anyone would be
able to help with.
Firstly, I wanted to send 0800 calls through 1 sip provider and other
08xx calls through another. I have this:
exten => _0800.,1,Dial(SIP/${EXTEN}@provider1,30)
exten => _0800.,2,Congestion
exten => _08.,1,Dial(SIP/${EXTEN}@provider2,30)
exten => _08.,2,Congestion
However, whichever way round I put these, 0800 calls still seem to go
out of provider2.
I fixed this as follows:
exten => _08[1-9].,1,Dial(SIP/${EXTEN}@provider2,30)
exten => _08[1-9].,2,Congestion
..but, is there another way of getting this working without putting
exceptions into other dial plan rules? - it works in this example but
would be a pain in anything more complicated.
For example, I had the same problem with a provider who has some service
numbers in the format 09XX but the dial plan for these was not getting
detected because of my _0. dial plan for national phone calls.
Am I missing something here?
Also, I can't seem to get the invalid extension working. I have a
context which has some incoming calls sent to it. I then have an
extension for each number. What I want is to play an invalid message if
anyone comes into that context on another number.
I tried this by commenting the entries for 1 of my working numbers out
and putting this in:
exten => i,1,Playback(invalid)
exten => i,2,Hangup
.. but when I call the number I commented out, Asterisk doesn't see the
call (no logging) - I just get a beep and the call ends. If I put the
extension for that number back in, it works fine.
Any ideas?
Thanks!
--ian
_______________________________________________
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
On Tue, 2004-12-14 at 21:32, Ian Chilton wrote:> Hi, > > I am having a few dial plan problems which I wondered if anyone would be > able to help with. > > Firstly, I wanted to send 0800 calls through 1 sip provider and other > 08xx calls through another. I have this: > > exten => _0800.,1,Dial(SIP/${EXTEN}@provider1,30) > exten => _0800.,2,Congestion > > exten => _08.,1,Dial(SIP/${EXTEN}@provider2,30) > exten => _08.,2,Congestion > > However, whichever way round I put these, 0800 calls still seem to go > out of provider2. > > I fixed this as follows: > > exten => _08[1-9].,1,Dial(SIP/${EXTEN}@provider2,30) > exten => _08[1-9].,2,CongestionYep, this works...> ..but, is there another way of getting this working without putting > exceptions into other dial plan rules? - it works in this example but > would be a pain in anything more complicated.Consider that asterisk will always take the 'easiest' path, or the path of least resistance, kinda like water. If you have a really generic pattern, then asterisk will match that first. So, either you don't have a more generic pattern as you have done, or you tell asterisk that your patterns actually have priorities/levels of importance. You do this something like this: [freecall-dialout] include => freecall-dialout-other exten => _0800.,1,Dial(SIP/${EXTEN}@provider1,30) exten => _0800.,2,Congestion [freecall-dialout-other] exten => _08.,1,Dial(SIP/${EXTEN}@provider2,30) exten => _08.,2,Congestion Asterisk will try to match the extensions in the current context first, before trying to match the extensions in included contexts.> For example, I had the same problem with a provider who has some service > numbers in the format 09XX but the dial plan for these was not getting > detected because of my _0. dial plan for national phone calls. > > Am I missing something here?Yep, see the wiki, I am sure this would be covered there. Look at extensions.conf sections.> Also, I can't seem to get the invalid extension working. I have a > context which has some incoming calls sent to it. I then have an > extension for each number. What I want is to play an invalid message if > anyone comes into that context on another number. > > I tried this by commenting the entries for 1 of my working numbers out > and putting this in: > > exten => i,1,Playback(invalid) > exten => i,2,Hangup > > .. but when I call the number I commented out, Asterisk doesn't see the > call (no logging) - I just get a beep and the call ends. If I put the > extension for that number back in, it works fine. > > Any ideas?yes, I imagine you are trying to dial-in with a 'unconfigured' DID, which won't work. Asterisk will reject the call, rather than answer and send to i exten. To get what you want, you will need to match your 'unconfigured' DID's, and Goto(i,1) I suppose the i exten is designed for someone who is traversing IVR menus and tries to get to a wrong menu option etc... I hope this helps you a bit.... Regards, Adam