$50Bounty:remote extension dialing with IVR

Problem (freepbx 2.4) : when calling from the outside and entering the ivr, the user can’t dial the remote branch extensions 1xx. They receive I am sorry this is not a valid extension.

SETUP: We have two locations, NYC and LI.
The two servers are connected via aix2 trunks.

Previously i was able to make these brach office calls through the ivr by adding these two lines in extensions_custom.conf
[ext-local-custom]
exten => _1xx,1,dial(iax2/SYOSSET/${EXTEN}

Since upgrading to 2.4 it stopped working. Not sure if it was the upgrade or something else i goofed on that broke it.
I have search freepbs website and seen others use dundi to get this functionality, but i don’t believe that’s the route i would like to take.

I am able to make interoffice calls with no problem. I have even created misc destinations and that works as well.
How can i enable branch office dialing within the IVR module?
Why is the custom line not being loaded into the ivr menu?
Another question is: Why after putting in the above custom line, calls seem to come from device 1XX and not John Doe 1xx?
Which logs should i look at to help me find the source of the problem.
Thanks in advance.

nycvoipCLI> set verbose 3
Verbosity was 1 and is now 3
nycvoip
CLI>
– Accepting call from ‘516XXXXXXX’ to ‘4627’ on channel 0/1, span 1
– Executing Set(“Zap/1-1”, “DID=4627”) in new stack
– Executing Goto(“Zap/1-1”, “s|1”) in new stack
– Goto (from-zaptel,s,1)
– Executing NoOp(“Zap/1-1”, “Entering from-zaptel with DID == 4627”) in new stack
– Executing Ringing(“Zap/1-1”, “”) in new stack
– Executing Set(“Zap/1-1”, “DID=4627”) in new stack
– Executing NoOp(“Zap/1-1”, “DID is now 4627”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?zapok:notzap”) in new stack
– Goto (from-zaptel,s,8)
– Executing NoOp(“Zap/1-1”, “Is a Zaptel Channel”) in new stack
– Executing Set(“Zap/1-1”, “CHAN=1-1”) in new stack
– Executing Set(“Zap/1-1”, “CHAN=1”) in new stack
– Executing Macro(“Zap/1-1”, “from-zaptel-1|4627|1”) in new stack
– Executing NoOp(“Zap/1-1”, “Returned from Macro from-zaptel-1”) in new stack
– Executing Goto(“Zap/1-1”, “from-pstn|4627|1”) in new stack
– Goto (from-pstn,4627,1)
– Executing Set(“Zap/1-1”, “__FROM_DID=4627”) in new stack
– Executing Gosub(“Zap/1-1”, “app-blacklist-check|s|1”) in new stack
– Executing LookupBlacklist(“Zap/1-1”, “”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?blacklisted”) in new stack
– Executing Return(“Zap/1-1”, “”) in new stack
– Executing GotoIf(“Zap/1-1”, “0 ?cidok”) in new stack
– Executing Set(“Zap/1-1”, “CALLERID(name)=516XXXXXXX”) in new stack
– Executing NoOp(“Zap/1-1”, “CallerID is “516XXXXXXX” <516XXXXXXX>”) in new stack
– Executing Goto(“Zap/1-1”, “ivr-8|s|1”) in new stack
– Goto (ivr-8,s,1)
– Executing Set(“Zap/1-1”, “LOOPCOUNT=0”) in new stack
– Executing Set(“Zap/1-1”, “__DIR-CONTEXT=default”) in new stack
– Executing Set(“Zap/1-1”, “_IVR_CONTEXT_ivr-8=”) in new stack
– Executing Set(“Zap/1-1”, “_IVR_CONTEXT=ivr-8”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?begin”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing Wait(“Zap/1-1”, “1”) in new stack
– Executing Set(“Zap/1-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/1-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“Zap/1-1”, “custom/Greeting&custom/MainMenu”) in new stack
– Playing ‘custom/Greeting’ (language ‘en’)
– Invalid extension ‘1’ in context ‘ivr-8’ on Zap/1-1
== CDR updated on Zap/1-1
– Executing Playback(“Zap/1-1”, “invalid”) in new stack
– Playing ‘invalid’ (language ‘en’)
– Executing Goto(“Zap/1-1”, “loop|1”) in new stack
– Goto (ivr-8,loop,1)
– Executing Set(“Zap/1-1”, “LOOPCOUNT=1”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?hang|1”) in new stack
– Executing Goto(“Zap/1-1”, “ivr-8|s|begin”) in new stack
– Goto (ivr-8,s,8)
– Executing Set(“Zap/1-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/1-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“Zap/1-1”, “custom/Greeting&custom/MainMenu”) in new stack
– Playing ‘custom/Greeting’ (language ‘en’)
– Channel 0/1, span 1 got hangup request, cause 16
== Spawn extension (ivr-8, s, 10) exited non-zero on ‘Zap/1-1’
– Executing Hangup(“Zap/1-1”, “”) in new stack
== Spawn extension (ivr-8, h, 1) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’

after playing around i figured why not add my custom line to the [ivr-#-custom] context
so i went back to extension_custom.conf and added my line:
[ivr-8-custom]
exten => _1xx,1,dial(iax2/SYOSSET/${EXTEN}
reloaded asterisk/freepbx
called from the outside and it works. :smiley:

I guess my question now is: Is this the proper way to implement this?

You might want to consider using DUNDi for this instead… i;ve not actually used it myself before, but I believe it would be the “proper” solution for you.

I have to agree with the statement of use DUNDI. We use it between offices and it just KNOWS which extensions are at wich office (assuming you don’t have a overlapping dial plan, i.e. same extension number in two offices). Both office IVR’s see the other offices extensions with no special programming or extra work past setting up DUNDI.

I’ve been running this configuration since 2.1 without a problem. I’ve even tweaked the directory code and with a pair or small scripts have it sync’ing the IVR recorded names between the systems so if you use the directory in one office system you can find the extensions of the other office and they just dial who they want and arrive at the other end without knowing they crossed 100 miles, and ended up in a different phone system.

which tutorial did you use to configure dundi, i was under the impression that dundi is to allow callers to use your system to make external calls
also for the sync’ing script, have you posted that script?
That sounds like something we could really use
Since we don’t have overlapping dial plan
sounds very exciting

there is a dundi setup on this site. Can’t remember exactly where… Oh look it’s bookmarked… This is where I started… http://www.freepbx.org/trac/wiki/DundiClusterHack

As for the hacking of the directories together yes I have it is in the bug track. The only piece missing is a simple rsync which I can’t remember at this moment if I documented it or not. IF not add to the bug track and I’ll get a notice and fill it in. But it has worked nicely for a year with otu a single complaint.

Does anyone know if this will work on a Asterisk 1.4 / FreePBX 2.4 based system? I am planning on testing a DUNDI setup and would like to implement this to enable a unified company directory.

Thanks

Glenn

This is a million $ post and saved my 1000 miles journy…
Currently i hv used, the solution given here, but looking for a permanent solution and thinking of checking the Dundi setup.
Apparently, with latest asterisk 1.4.21.1 Dundi.conf looks to be missing…

Here is an excellent tutorial that will help with the dundi setup. http://cohutta.com/Dundi_How_to.pdf

If you follow it from start to end you can have your systems talking in under 20 minutes.