IAX Extensions

Hello,

Actually, this is my first time to use IAX. I’m going to connect to FreePBXs via IAX trunks. The setup will be:

CloudPBX: All SIP trunk from ITSPs will be registered here. All DIDs will go to IVR.
PBX1: Will have internal extensions, DAHDI channels.
PBX2: Same as PBX1

The workflow is: If someone calls any DID, it will go to CloudPBX, then if the caller presses an option, it should take the call over the IAX to either PBX1 or PBX2 (Depending on which extension is the target).

Now, shall I create any extensions on CloudPBX? What destinations for IVR in CloudPBX should be?

I’ve done it two ways:

  1. Set up “custom” extensions that use a DIAL string the routes the call explicitly to the correct server and extension. This is nice because you can set both servers up EXACTLY the same and differentiate the extensions based on which server they are on - 500 on server 1 is extension 123, 500 on server 2 is 326. You can also set it up so that you don’t have job security and make it so that the extensions on the remote machines match the local extensions.

  2. Use outbound route matches to send the calls to the appropriate server. Most people set these up with (for example) extension 500-599 on server 1 and 600-699 on server 2. Makes the outbound routes very simple. You can add more “targeted” extensions if someone has a specific number they want on the “wrong” server. For example, Dave in HR wants ‘666’ but his building is on Server 1. Add his extension specifically to the outbound routes and send it to server 1.

Note that you can carry this out to a ridiculous level, Add server 3 with 700-799 and also add IAX2 links between them and set up the same outbound routes on each of the machines that you did on the “cloud” server.

So, yeah, you can do that.

OK, I think method 2 is easier and more organized. Please take me step by step.

1- I have created an outbound route on CloudPBX to PBX1. I have set the dial pattern to be a wildcard “.”. So all calls from any IVR on CloudPBX will go to PBX1.
2- I have created an IVR on CloudPBX and now it answers perfectly.
3- On PBX1 I have extensions 1101, 1102, 1103, 1104.
4- I need anyone who calls IVR on CloudPBX to:
*press 1, then it goes to 1101 on PBX1.
*press 2, then it goes to 1102 on PBX1.
*press 3, then it goes to 1103 on PBX1.
*press 4, then it goes to 1104 on PBX1.

So please take me from step 4. What shall I do? Create extensions on CloudPBX? How would the IVR know how to route the input to PBX1?

Here’s what I reached:

1- I have created an outbound route on CloudPBX to PBX1. I have set the dial pattern to be a wildcard “.”. So all calls from any IVR on CloudPBX will go to PBX1.
2- I have created an IVR on CloudPBX and now it answers perfectly.
3- On PBX1 I have extensions 1101, 1102, 1103, 1104.
4- I need anyone who calls IVR on CloudPBX to:
*press 1, then it goes to 1101 on PBX1.
*press 2, then it goes to 1102 on PBX1.
*press 3, then it goes to 1103 on PBX1.
*press 4, then it goes to 1104 on PBX1.
5- Created a misc destination, dial pattern is IAX2/Cloud-JED/30.
6- Created an IVR entry, digit is 0, destination is misc destination/tech works operator.
7- When I place a test call, I get all circuits are busy.

I think IAX trunk is good:

cloudpbx*CLI> iax2 show peers
Name/Username Host Mask Port Status Description
Cloud-JED/pbx 209.159.151.198 (S) 255.255.255.255 4569 (T) (E) OK (205 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]

The logs are:
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Goto(“SIP/voxbeam_inbound-00000210”, “ext-miscdests,1,1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (ext-miscdests,1,1)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] NoOp(“SIP/voxbeam_inbound-00000210”, “MiscDest: Tech Works Operator”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Goto(“SIP/voxbeam_inbound-00000210”, “from-internal,IAX2/Cloud-JED/30,1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (from-internal,IAX2/Cloud-JED/30,1)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:1] Macro(“SIP/voxbeam_inbound-00000210”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Set(“SIP/voxbeam_inbound-00000210”, “TOUCH_MONITOR=1497562305.529”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Set(“SIP/voxbeam_inbound-00000210”, “AMPUSER=+966560555543”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?report”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:4] ExecIf(“SIP/voxbeam_inbound-00000210”, “1?Set(REALCALLERIDNUM=+966560555543)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:5] Set(“SIP/voxbeam_inbound-00000210”, “AMPUSER=”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:6] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?limit”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:7] Set(“SIP/voxbeam_inbound-00000210”, “AMPUSERCIDNAME=”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:8] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?report”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-user-callerid,s,15)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:15] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?continue”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-user-callerid,s,29)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:29] Set(“SIP/voxbeam_inbound-00000210”, “CALLERID(number)=+966560555543”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:30] Set(“SIP/voxbeam_inbound-00000210”, “CALLERID(name)=+966560555543”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:31] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?cnum”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:32] Set(“SIP/voxbeam_inbound-00000210”, “CDR(cnam)=+966560555543”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:33] Set(“SIP/voxbeam_inbound-00000210”, “CDR(cnum)=+966560555543”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:34] Set(“SIP/voxbeam_inbound-00000210”, “CHANNEL(language)=en”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:2] Gosub(“SIP/voxbeam_inbound-00000210”, “sub-record-check,s,1(out,IAX2/Cloud-JED/30,force)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/voxbeam_inbound-00000210”, “13?initialized”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,s,10)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:10] NoOp(“SIP/voxbeam_inbound-00000210”, “Recordings initialized”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:11] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(ARG3=dontcare)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:12] Set(“SIP/voxbeam_inbound-00000210”, “REC_POLICY_MODE_SAVE=”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:13] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(REC_STATUS=NO)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:14] GotoIf(“SIP/voxbeam_inbound-00000210”, “3?checkaction”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,s,17)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:17] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?sub-record-check,out,1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,out,1)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] NoOp(“SIP/voxbeam_inbound-00000210”, “Outbound Recording Check from +966560555543 to IAX2/Cloud-JED/30”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Set(“SIP/voxbeam_inbound-00000210”, “RECMODE=”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/voxbeam_inbound-00000210”, “1?Goto(routewins)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,out,7)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:7] Gosub(“SIP/voxbeam_inbound-00000210”, “recordcheck,1(force,out,IAX2/Cloud-JED/30)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] NoOp(“SIP/voxbeam_inbound-00000210”, “Starting recording check against force”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Goto(“SIP/voxbeam_inbound-00000210”, “force”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,recordcheck,5)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:5] Set(“SIP/voxbeam_inbound-00000210”, “__REC_POLICY_MODE=FORCE”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:6] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?startrec”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (sub-record-check,recordcheck,16)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:16] NoOp(“SIP/voxbeam_inbound-00000210”, “Starting recording: out, IAX2/Cloud-JED/30”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:17] Set(“SIP/voxbeam_inbound-00000210”, “AUDIOHOOK_INHERIT(MixMonitor)=yes”) in new stack
[2017-06-16 00:31:53] NOTICE[8401][C-00000217] func_audiohookinherit.c: AUDIOHOOK_INHERIT is deprecated and now does nothing.
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:18] Set(“SIP/voxbeam_inbound-00000210”, “__CALLFILENAME=out-IAX2/Cloud-JED/30-+966560555543-20170616-003145-1497562305.529”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:19] MixMonitor(“SIP/voxbeam_inbound-00000210”, “2017/06/16/out-IAX2/Cloud-JED/30-+966560555543-20170616-003145-1497562305.529.wav,abi(LOCAL_MIXMON_ID),”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:20] Set(“SIP/voxbeam_inbound-00000210”, “__MIXMON_ID=0x1780d70”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:21] Set(“SIP/voxbeam_inbound-00000210”, “__RECORD_ID=SIP/voxbeam_inbound-00000210”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:22] Set(“SIP/voxbeam_inbound-00000210”, “__REC_STATUS=RECORDING”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:23] Set(“SIP/voxbeam_inbound-00000210”, “CDR(recordingfile)=out-IAX2/Cloud-JED/30-+966560555543-20170616-003145-1497562305.529.wav”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:24] Return(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:8] Return(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:53] VERBOSE[8404][C-00000217] app_mixmonitor.c: Begin MixMonitor Recording SIP/voxbeam_inbound-00000210
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:3] ExecIf(“SIP/voxbeam_inbound-00000210”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:4] Set(“SIP/voxbeam_inbound-00000210”, “INTRACOMPANYROUTE=YES”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:5] Set(“SIP/voxbeam_inbound-00000210”, “MOHCLASS=techworksonholdmessageeng”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:6] Set(“SIP/voxbeam_inbound-00000210”, “_NODEST=”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:7] Macro(“SIP/voxbeam_inbound-00000210”, “dialout-trunk,1,IAX2/Cloud-JED/30,off”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Set(“SIP/voxbeam_inbound-00000210”, “DIAL_TRUNK=1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] GosubIf(“SIP/voxbeam_inbound-00000210”, “0?sub-pincheck,s,1()”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?disabletrunk,1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:4] Set(“SIP/voxbeam_inbound-00000210”, “DIAL_NUMBER=IAX2/Cloud-JED/30”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:5] Set(“SIP/voxbeam_inbound-00000210”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:6] Set(“SIP/voxbeam_inbound-00000210”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:7] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?nomax”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,s,9)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:9] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?skipoutcid”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:12] GosubIf(“SIP/voxbeam_inbound-00000210”, “0?sub-flp-1,s,1()”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:13] Set(“SIP/voxbeam_inbound-00000210”, “OUTNUM=IAX2/Cloud-JED/30”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:14] Set(“SIP/voxbeam_inbound-00000210”, “custom=IAX2/Cloud-JED”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:15] ExecIf(“SIP/voxbeam_inbound-00000210”, “1?Set(DIAL_TRUNK_OPTIONS=M(setmusic^techworksonholdmessageeng)Ttr)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:16] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^techworksonholdmessageeng)TtrM(confirm))”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:17] Macro(“SIP/voxbeam_inbound-00000210”, “dialout-trunk-predial-hook,”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] MacroExit(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:18] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?skipcrm”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,s,24)
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:24] NoOp(“SIP/voxbeam_inbound-00000210”, “CRM Finished”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:25] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?bypass,1”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:26] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(CONNECTEDLINE(num,i)=IAX2/Cloud-JED/30)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:27] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(CONNECTEDLINE(name,i)=CID:+966560555543)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:28] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+966560555543)”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:29] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?customtrunk”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:30] Dial(“SIP/voxbeam_inbound-00000210”, “IAX2/Cloud-JED/IAX2/Cloud-JED/30,300,M(setmusic^techworksonholdmessageeng)Ttr”) in new stack
[2017-06-16 00:31:53] VERBOSE[8401][C-00000217] app_dial.c: Called IAX2/Cloud-JED/IAX2/Cloud-JED/30
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] chan_iax2.c: Hungup ‘IAX2/Cloud-JED-26021’
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:31] NoOp(“SIP/voxbeam_inbound-00000210”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 50”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:32] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Set(“SIP/voxbeam_inbound-00000210”, “RC=50”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Goto(“SIP/voxbeam_inbound-00000210”, “50,1”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,50,1)
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Goto(“SIP/voxbeam_inbound-00000210”, “continue,1”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] NoOp(“SIP/voxbeam_inbound-00000210”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 50 - failing through to other trunks”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(CALLERID(number)=)”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [IAX2/Cloud-JED/[email protected]:8] Macro(“SIP/voxbeam_inbound-00000210”, “outisbusy,”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Progress(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?emergency,1”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?intracompany,1”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-outisbusy,intracompany,1)
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Playback(“SIP/voxbeam_inbound-00000210”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
[2017-06-16 00:31:55] VERBOSE[8401][C-00000217] file.c: <SIP/voxbeam_inbound-00000210> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
[2017-06-16 00:31:57] VERBOSE[8401][C-00000217] file.c: <SIP/voxbeam_inbound-00000210> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] Congestion(“SIP/voxbeam_inbound-00000210”, “20”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] app_macro.c: Spawn extension (macro-outisbusy, intracompany, 2) exited non-zero on ‘SIP/voxbeam_inbound-00000210’ in macro ‘outisbusy’
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Spawn extension (from-internal, IAX2/Cloud-JED/30, 8) exited non-zero on ‘SIP/voxbeam_inbound-00000210’
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] Macro(“SIP/voxbeam_inbound-00000210”, “hangupcall”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/voxbeam_inbound-00000210”, “1?theend”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(CDR(recordingfile)=)”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:4] Hangup(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/voxbeam_inbound-00000210’ in macro ‘hangupcall’
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/voxbeam_inbound-00000210’
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] app_stack.c: SIP/voxbeam_inbound-00000210 Internal Gosub(crm-hangup,s,1) start
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:1] NoOp(“SIP/voxbeam_inbound-00000210”, “Sending Hangup to CRM”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:2] NoOp(“SIP/voxbeam_inbound-00000210”, “HANGUP CAUSE: 50”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/voxbeam_inbound-00000210”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:4] NoOp(“SIP/voxbeam_inbound-00000210”, “MASTER CHANNEL: 1497562305.529 = 1497562305.529”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/voxbeam_inbound-00000210”, “0?return”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:6] Set(“SIP/voxbeam_inbound-00000210”, “__CRM_HANGUP=1”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:7] AGI(“SIP/voxbeam_inbound-00000210”, “sangomacrm.agi”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2017-06-16 00:31:59] WARNING[2171] chan_sip.c: Retransmission timeout reached on transmission 3415dd419b89d254f66627ce38993ee1 for seqno 1 (Critical Response) – See
Packet timed out after 32000ms with no response
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] res_agi.c: <SIP/voxbeam_inbound-00000210>AGI Script sangomacrm.agi completed, returning 0
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] pbx.c: Executing [[email protected]:8] Return(“SIP/voxbeam_inbound-00000210”, “”) in new stack
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/voxbeam_inbound-00000210’
[2017-06-16 00:31:59] VERBOSE[8401][C-00000217] app_stack.c: SIP/voxbeam_inbound-00000210 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Nope. Create your “matching pattern” on the outbound so that it matches 11NN. That way, only calls from 1100 to 1199 will be sent to Server 1

Good.

Try calling amongst themselves and make sure they work.]

OK - set up the IVR so that option 1 goes to "extension 1101’, 2 goes to ‘extension 1102’, etc.

No - that’s not going to help you. In fact, I’m certain it’s going to completely hose everything you’ve done to this point.

That’s fine, because you are implementing what I suggested in “Option 1”

Yup that makes sense.

I need it this way. I need all calls from CloudPBX to go to PBX1. So let’s leave it like that.[quote=“cynjut, post:5, topic:41972”]
Try calling amongst themselves and make sure they work.]
[/quote]

This is an old setup. All extensions are on the same box (PBX1) and I know it is working.

The IVR is on CloudPBX. So I must set either a custom extension or misc destination. I need your help here.[quote=“cynjut, post:5, topic:41972”]
No - that’s not going to help you. In fact, I’m certain it’s going to completely hose everything you’ve done to this point.
[/quote]

So I need your help here how to make IVR inputs go over IAX trunk.[quote=“cynjut, post:5, topic:41972”]
Yup that makes sense.
[/quote]

Please help making this work.

I would suggest a real sip proxy ,( I use Kamailio) where you put your CloudPBX, that would likley sort out a bunch of downline problems you might well encounter. Better done with SIP, why do you want to use IAX or IAX2 ?

I have many reasons.
1- Our ISP where PBX1 located do filter SIP and then I have to use VPN. I want to avoid that.
2- CloudPBX is a VM hosted on a leased server. I do not have physical access.

Do they filter SIP (via DPI) or just port 5060?
Does the VM only allow FreePBX?

The ISP blocks any SIP port.
The VM is on a physical server that we own. We can build any other VM as needed.

I don’t know if this pertains

If it does you might want to quietly inform your VSP/ISP

I prefer to do it over IAX or SIP. IAX is more flexible and I can use any port needed.

No problem, but realize that asterisk is a back2back user agent, so be careful of re-entrancy

can anyone help me even with paid work?

Paid support is always an option if there is budget:

1 Like

Ok. Can anyone tell me why Im getting cercuit busy when IVR entrt on CloudPBX tries to use IAX trunk to reach PBX1?

I think Im stuck here. How to setup an option on IVR to call an extension on another PBX?

Maybe this is the issue? Any one can help?

enable IAX2 debugging, check these fora and others (google perhaps ?) for “IAX2 cause 50” it is usually a badly formed extension on the trunk or an inappropriate AUTH method (also check your “calltokens policies both ends”)

thanks for the info. here’s how I dial the extension from CloudPBX to PBX1:
IAX2/Cloud-JED/30 (no “DIAL” before "IAX2)

Here is the config on CloudPBX:

Outgoing trunk name: [trunk1]
username=pbx
secret=password
host=PBX1
type=friend
context=from-internal
qualify=yes
qualifyfreqok=25000
transfer=no
trunk=yes
forceencryption=yes
encryption=yes
auth=md5

Incoming trunk settings: nothing

Here’s the config on PBX1:

Outgoing trunk name: [trunk2]
username=pbx
secret=password
host=CloudPBX
type=friend
context=from-internal
qualify=yes
qualifyfreqok=25000
transfer=no
trunk=yes
forceencryption=yes
encryption=yes
auth=md5

Incoming trunk settings: nothing

any recommendations?