IVR won't answer - extensions and ring-groups do

I am using Asterisk 1.6.0.6 on a Centos 5.2 box. My SIP trunk provider is Callcentric. I’ve created a home pbx to learn as much as I can about Asterisk and VOIP.

The system is up and running. I can:

  • Call from ext to ext with soft and hard phones
  • I can call outside numbers
  • I can receive inbound calls
  • I can send inbound calls to 1 extension or a “ring group”
  • VoiceMail is up and running
  • I successfully recorded an IVR menu.wav

But,… When I set my inbound route to my IVR (MainIVR) the call bounces back to the provider (callcentric).

When I use an extension or ring group on my inbound route, for some reason I have to make an entry in extensions_custom.conf like this:

for destination extension - WORKS
[from-callcentric]
exten => s,1,Dial(SIP/6015)

for destination ring group - WORKS
[from-callcentric]
exten => s,1,Dial(local/7005@from-internal)

for destination IVR (MainIVR) - Does NOT Work - rings back to unavailable msg from callcentric
[from-callcentric]
exten => s,1,Dial(local/MainIVR@from-internal)

Can anyone help here?
Why do I have to put stuff in extensions_custom.conf that I have already speced in FreePBX?
Is this a provider/callcentric issue or FreePBX?

Anybody,…Anybody?

You should not need to add anything to extensions_custom.conf to make any of it work.

Something someplace else is wrong. I’m guessing it’s the context you defined when you created the SIP trunk setup for Callcentric. Use from-trunk as the context instead.

I agree that it doesn’t seem like I should be making all these manual entries but the guys at callcentric have gotten me through my last 2 or 3 challenges. The whole reason I decided to install FeePBX was to get a basic system up and running quickly and learn about the stuff “under the hood” along the way. I didn’t think I would have to do anything with a text editor.

But this is all new to me and initially I used them as much as possible because I was desperate to get a system up and running for my friends quickly. Anyway that didn’t pan out so now I guess I want to learn this the right way. I went through a video tutorial and a text based how-to on the IVR through FreePBX and both scenarios ended in a system that wouldn’t answer.

These are the instructions the dude at callcentric gave me. Once again they ivolve the use of a Text Editor which just didn’t seem right when I thought the whole point of FreePBX was to do the grunt work with the GUI.

Mar 6, 2009 08:28 AM | Customer service
Hello,

As you are using the FreePBX in conjunction with your Asterisk, you do not need to define your inbound routes directly on your ‘extensions_custom.conf’ file, rather please try defining your inbound routes via. the FreePBX interface.

As mentioned on the following page (http://www.callcentric.com/support/device/did_trixbox), please add the following lines to your ‘extensions_custom.conf’ file:

[custom-incoming]
exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = “sip:[email protected]”]?extension1,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = “sip:[email protected]”]?ext-did,18662365040,1:4)
exten => h,4,Macro(hangupcall)

[extension1]
exten => s,1,Dial(SIP/6015)

Next, once you have define the above custom application, you will need to define a custom destination within your FreePBX interface by visiting the ‘Tools’ tab of the FreePBX interface, and by clicking on the ‘Custom Destination’ option. From there, please add the custom destination “custom-incoming,s,1” (without the quotations).

Next, please visit the ‘Inbound routes’ page, and create a new inbound route by using the DID number “17772536067”. On that same page, please select your newly created custom destination “custom-incoming,s,1”.

Once you have done that, please create another Inbound route for your 18662365040 phone number; and on the same page, (assuming that you have created your IVR via the FreePBX interface), please select your IVR.

In addition to the above mentioned, you will need to modify a few more settings in order for your inbound routes to function properly, specifically, please change the line “context=from-callcentric” from both your ‘sip_general_custom.conf’ file as well as your Trunk configuration page, to “context=from-pstn”

Once you have performed the above mentioned, you may need to restart the entire Asterisk service in order for the changes to take into effect.

Should you continue to experience any issues, or if you have any other questions, please let us know.

– Executing [s@from-pstn:1] NoOp(“SIP/17772536067-b7603480”, “No DID or CID Match”) in new stack
– Executing [s@from-pstn:2] Answer(“SIP/17772536067-b7603480”, “”) in new stack
– Executing [s@from-pstn:3] Wait(“SIP/17772536067-b7603480”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“SIP/17772536067-b7603480”, “ss-noservice”) in new stack
– <SIP/17772536067-b7603480> Playing ‘ss-noservice.gsm’ (language ‘en’)
– Executing [s@from-pstn:5] SayAlpha(“SIP/17772536067-b7603480”, “”) in new stack
– Executing [s@from-pstn:6] Hangup(“SIP/17772536067-b7603480”, “”) in new stack
== Spawn extension (from-pstn, s, 6) exited non-zero on ‘SIP/17772536067-b7603480’
– Executing [h@from-pstn:1] Hangup(“SIP/17772536067-b7603480”, “”) in new stack
== Spawn extension (from-pstn, h, 1) exited non-zero on ‘SIP/17772536067-b7603480’

see http://www.freepbx.org/forum/freepbx/installation/resolved-multiple-phone-numbers-same-did and the links to callcentric on how to do it inside freepbx

Please do NOT add this information to the FreePBX site.

From a quick review of their instructions, it appears to me that they have a lack of understanding of at least part of the way that FreePBX does things. (This is not unusual amongst carriers…)

They do not send you the DID in a way that Asterisk likes to see the DID and for that reason, they are correct that you will need to extract that DID from the TO field and use that information to send the call to the “from-pstn” context in a way that FreePBX likes to see the calls. As far as some of their other instructions such as the “Dial(SIP/6015)” I don’t really know what they are talking about, why they want you to do that, and in any event it is WRONG as you should never dial an extension like they are indicating in FreePBX. (And in fact, that may not even be extension 6015 that you are reaching depending on how you have configured your system).

If your provider is sending you a 10 digit DID in the To header, than you will need to put in a line that looks something like this:

  1. set the context=from-sip-provider in the trunk configuration
  2. create a dialplan that looks something like this in extensions_custom.conf (which may need tweaking depending on the exact format of how they are sending you the call):
[from-sip-provider] 
exten => _.,1,Goto(from-pstn,${SIP_HEADER(TO):5:10},1) 

If the format of the TO header is not static (always 10 digits like in this case) then you will have to get more particular about you logic to accommodate. If the IP address they are sending the call from is un-deterministic, then you may have a harder problem routing the calls to a context that has this routing in it.

That is one option, the other option is choosing one of many other providers that will send you the DID in a way that Asterisk likes better and not having to jump through any hoops like you are having to do here. There is no good reason why the carrier can’t modify the INVITE to you to get it in a more amicable format to the liking of Asterisk. (Although - as indicated above, it is not that big of a deal to consume their format either).

I thought the carrier/provider (Callcentric) was doing something “hinkey”. They have great support but it’s obvious that they are doing things FreePBX/Asterisk doesn’t like or they wouldn’t be having me do 1/2 my setup with VI.

For now I have created a workaround by sending inbound to a ring group 1st and having that fall through to the IVR. When I do that it seems to work, “most” of the time.

I am sorry if I posted something “inappropriate”. I am trying to learn Asterisk/FreePBX by trial and error and learn the ground rules of these forums along the way.

If you are a 20 year veteran of the IT sector like me you know 1/2 the battle in any debug involving multiple vendors/providers is figuring out who or what is causing the problem you are trying to fix. If you are in your personal area of expertise it’s usually easy to figure out who or what is creating your problem but I’m out of my comfort zone trying to learn something new (Asterisk).

Anyway,…I have come to the conclusion that, although CallCentric has great cusomer service and tech support they are not a good choice to provice a SIP trunk for an Asterisk Box in a business environment.

Thanks again for your input,

Michael