IVR Question

Hi guys,
Long time haven’t been here.
I have a strange problem with my IVR.
I have create a Misk application in order to reach the IVR by dialing an extension.
We have two FreePBX (computer based FreePBX 13.0.197.28) located in two different locations. Of course we have a trunk between them. All calls are perfect … exept the IVR.
If I try to dial the IVR extension from the phone connected to the FreePBX on which the IVR is created - everything is working just fine.
But If I try to dial the IVR extension from the phone connected to the secong FreePBX am getting a message “The destination cannot be reached”.
What I am doing wrong?
Thanks in advance for all opinions, sugestions … criticism … everithing :blush:

Please create a new topic, please provide screenshots, logs and ws much info possible. This is a 4 year old thread.

Your tie line trunk is from-internal?
the from-internal context does not include ivr’s,
the dialplan includes

Include =>        'from-internal-additional-custom' 

So you could try adding ivr-n (where n is the one you want to be available ) to that context

[from-internal-additional-custom]
include => ivr-n
include => ivr-m

Sorry #dicko, I didn’t get it. Where should I add
[from-internal-additional-custom]
include => ivr-n
include => ivr-m ?

In

/etc/asterisk/extensions_custom.conf

Thank you #dicko. I will try and will tell you the result.
BTW if the attempt is not successful - I will open a new topic. Somebody could have the same problem with using IVR in corporate intranet with more than one FreePBX boxes.
Thanks again.

Don’t. Please don’t create duplicate topics.
As mentioned, post screenshots and logs.

You can post a call trace via pastebin:
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs-PartII

So … finaly what to do/ To create a new topic or to continue here?

Continue here, the posts were already split into a new topic.

O.K. so as #dicko advised me:

  1. I checked the /etc/asterisk/ extensions_additional.conf
    the records say -
    [ivr-1] ; Welcome IVR
    include => ivr-1-custom
    include => from-did-direct-ivr
  2. I add to the /etc/asterisk/extensions_custom.conf
    [from-internal-additional-custom]
    include => ivr-1
  3. So far I do not have responce from the remote office (will have after …may be an hour … people are “too busy to support me in this particurlar moment”.
    But I got some strange effect - if I try to call IVR from the location it is buid (my current location - office 1) first I get a message “We have not receive the valid response. Please try again later.” and immediately after that I can hear the IVR welcome and I can use all IVR options.
    Any Idea why?
    which log or what to search for in the general log?

BTW after i made changes I reload the FreePBX - fwconsole reload

Please undo the custom changes, and please post call traces and screenshots of the trunk config from both servers

Sorry for the delay, we have had a national holiday.
First at all the trunk configuration from both sites:
Trunk configuration for site 1 (main site)

General

Trunk Name: SIP_Trunk_to _Site2

Hide callerID: No

Otbound callerID: empty

CID Options: Allow Any SID

Maximum channel: empty

Asterisk trunk Dial Options: T

System

Continue if Busy: No

Disable Trunk: No

Monitor Trunk Failures: No

Dialed Number Manipulation Rules

Everytimg is empty including Outbound Dial Prefix

Sip settings

Outgoing

Trunk Name: Trunk_to_Site2

PEER Details: host=192.168.20.1

Username=user1

Secret=password

Type=peer

Fromuser=user1

Incoming

USER Context: user2

USER Details: secret=password

Type=user

Context=from-trunk


Outbound Routes

Route Settings

Route Name: SIP_Route_to Site2

Route CID: empty

Override Extension: No

Route Password: empty

Route Type: Nothing chosen

Music On Hold: default

Time Group: Permanent Route

Route Position: No Change

Trunk Sequence for Matched Routes: SIP_Trunk_to_Site2

Optional destination on Congestion: Normal Congestion

Dial Patterns

[prepend] prefix| [32XX]/caller id]

Import/Export Patterns nothing

Notifications

Email to: empty

Email from: [email protected]

Email Subject: PBX: A call has been placed via outbound route: {{ROUTENAME}}

Email Body: bla bla bla

Additional settings

Call recording: Do not care

PIN set: empty

Ibound routes

Nothing set

===========================================================

Trunk configuration for site 2 (secong site)

General

Trunk Name: SIP_Trunk_to _Site1

Hide callerID: No

Otbound callerID: empty

CID Options: Allow Any SID

Maximum channel: empty

Asterisk trunk Dial Options: T

System

Continue if Busy: No

Disable Trunk: No

Monitor Trunk Failures: No

Dialed Number Manipulation Rules

Everytimg is empty including Outbound Dial Prefix

Sip settings

Outgoing

Trunk Name: Trunk_to_Site1

PEER Details: host=192.168.10.1

Username=user2

Secret=password

Type=peer

Fromuser=user2

Incoming

USER Context: user1

USER Details: secret=password

Type=user

Context=from-trunk

Outbound Routes

Route Settings

Route Name: SIP_Route_to Site1

Route CID: empty

Override Extension: No

Route Password: empty

Route Type: Nothing chosen

Music On Hold: default

Time Group: Permanent Route

Route Position: No Change

Trunk Sequence for Matched Routes: SIP_Trunk_to_Site1

Optional destination on Congestion: Normal Congestion

Dial Patterns

[prepend] prefix| [34XX]/caller id]

Import/Export Patterns nothing

Notifications

Email to: empty

Email from: [email protected]

Email Subject: PBX: A call has been placed via outbound route: {{ROUTENAME}}

Email Body: bla bla bla

Additional settings

Call recording: Do not care

PIN set: empty

Ibound routes

Nothing set

And there is the log from Site2 trying to call the IVR on Site1:
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] netsock2.c: Using SIP VIDEO TOS bits 136
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] netsock2.c: Using SIP VIDEO CoS mark 6
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] netsock2.c: Using SIP RTP TOS bits 184
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] netsock2.c: Using SIP RTP CoS mark 5
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: SIP/Trunk_to_Site1-0000000e Internal Gosub(func-apply-sipheaders,s,1(3)) start
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:1] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:2] NoOp(“SIP/Trunk_to_Site1-0000000e”, “Applying SIP Headers to channel SIP/Trunk_to_Site1-0000000e”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:3] Set(“SIP/Trunk_to_Site1-0000000e”, “TECH=SIP”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:4] Set(“SIP/Trunk_to_Site1-0000000e”, “SIPHEADERKEYS=Alert-Info”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:5] While(“SIP/Trunk_to_Site1-0000000e”, “1”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/Trunk_to_Site1-0000000e”, “sipheader=unset”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:7] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “1?SIPRemoveHeader(Alert-Info:)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:8] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:9] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?Set(sipheader=http://127.0.0.1;info=unset)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:10] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?Set(sipheader=http://127.0.0.1unset)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:11] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?SIPAddHeader(Alert-Info:unset)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:12] ExecIf(“SIP/Trunk_to_Site1-0000000e”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:13] EndWhile(“SIP/Trunk_to_Site1-0000000e”, “”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:5] While(“SIP/Trunk_to_Site1-0000000e”, “0”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:14] Return(“SIP/Trunk_to_Site1-0000000e”, “”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: Spawn extension (from-trunk-sip-Trunk_to_Site1, 3400, 1) exited non-zero on ‘SIP/Trunk_to_Site1-0000000e’
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: SIP/Trunk_to_Site1-0000000e Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_dial.c: Called SIP/Trunk_to_Site1/3400
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_dial.c: SIP/Trunk_to_Site1-0000000e answered SIP/3222-0000000d
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: SIP/Trunk_to_Site1-0000000e Internal Gosub(sub-send-obroute-email,s,1(3400,3400,3,1614850334,col. S.Paskalev,3222)) start
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/Trunk_to_Site1-0000000e”, “0?sendEmail”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:2] NoOp(“SIP/Trunk_to_Site1-0000000e”, “email notifications disabled…exiting.”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:3] Return(“SIP/Trunk_to_Site1-0000000e”, “”) in new stack
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: Spawn extension (from-trunk-sip-Trunk_to_Site1, , 1) exited non-zero on ‘SIP/Trunk_to_Site1-0000000e’
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] app_stack.c: SIP/Trunk_to_Site1-0000000e Internal Gosub(sub-send-obroute-email,s,1(3400,3400,3,1614850334,col. S.Paskalev,3222)) complete GOSUB_RETVAL=
[2021-03-04 11:32:15] VERBOSE[15290][C-00000007] bridge_channel.c: Channel SIP/Trunk_to_Site1-0000000e joined ‘simple_bridge’ basic-bridge <0692f1c7-49eb-498d-98f6-68c3eac9ba7f>
[2021-03-04 11:32:15] VERBOSE[15264][C-00000007] bridge_channel.c: Channel SIP/3222-0000000d joined ‘simple_bridge’ basic-bridge <0692f1c7-49eb-498d-98f6-68c3eac9ba7f>
[2021-03-04 11:32:26] VERBOSE[15290][C-00000007] bridge_channel.c: Channel SIP/Trunk_to_Site1-0000000e left ‘simple_bridge’ basic-bridge <0692f1c7-49eb-498d-98f6-68c3eac9ba7f>
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] bridge_channel.c: Channel SIP/3222-0000000d left ‘simple_bridge’ basic-bridge <0692f1c7-49eb-498d-98f6-68c3eac9ba7f>
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] app_macro.c: Spawn extension (macro-dialout-trunk, s, 33) exited non-zero on ‘SIP/3222-0000000d’ in macro ‘dialout-trunk’
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Spawn extension (from-internal, 3400, 11) exited non-zero on ‘SIP/3222-0000000d’
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:1] Macro(“SIP/3222-0000000d”, “hangupcall”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/3222-0000000d”, “1?theend”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/3222-0000000d”, “0?Set(CDR(recordingfile)=)”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:4] Hangup(“SIP/3222-0000000d”, “”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/3222-0000000d’ in macro ‘hangupcall’
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/3222-0000000d’
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] app_stack.c: SIP/3222-0000000d Internal Gosub(crm-hangup,s,1) start
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/3222-0000000d”, “Sending Hangup to CRM”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:2] NoOp(“SIP/3222-0000000d”, “HANGUP CAUSE: 16”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/3222-0000000d”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:4] NoOp(“SIP/3222-0000000d”, “MASTER CHANNEL: 1614850334.13 = 1614850334.13”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/3222-0000000d”, “0?return”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/3222-0000000d”, “__CRM_HANGUP=1”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:7] AGI(“SIP/3222-0000000d”, “sangomacrm.agi”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] res_agi.c: <SIP/3222-0000000d>AGI Script sangomacrm.agi completed, returning 0
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] pbx.c: Executing [[email protected]:8] Return(“SIP/3222-0000000d”, “”) in new stack
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/3222-0000000d’
[2021-03-04 11:32:26] VERBOSE[15264][C-00000007] app_stack.c: SIP/3222-0000000d Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

The voice responce (the one site2 hear) is something like - “he line is connected. The number is not in service”

And may be I have to expain that the extension 3222 from Site 2 is trying to call extension 3400 on Site1. The 3400 is a Misc application on Site1 with the next settings:
Enable: Yes
Description: reach IVR by extension
Feature Code: 3400
Destination: IVR
Welcome IVR

I’ve forgotten to place the log file from Site1.
There it is:
[2021-03-04 11:32:15] VERBOSE[1985][C-00000030] netsock2.c: Using SIP VIDEO TOS bits 136
[2021-03-04 11:32:15] VERBOSE[1985][C-00000030] netsock2.c: Using SIP VIDEO CoS mark 6
[2021-03-04 11:32:15] VERBOSE[1985][C-00000030] netsock2.c: Using SIP RTP TOS bits 184
[2021-03-04 11:32:15] VERBOSE[1985][C-00000030] netsock2.c: Using SIP RTP CoS mark 5
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:1] Set(“SIP/user2-00000041”, “__FROM_DID=3400”) in new stack
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:2] NoOp(“SIP/user2-00000041”, “Received an unknown call with DID set to 3400”) in new stack
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:3] Goto(“SIP/user2-00000041”, “s,a2”) in new stack
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx_builtins.c: Goto (from-trunk,s,2)
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:2] Answer(“SIP/user2-00000041”, “”) in new stack
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:3] Log(“SIP/user2-00000041”, “WARNING,Friendly Scanner from 10.150.33.2”) in new stack
[2021-03-04 11:32:15] WARNING[4732][C-00000030] Ext. s: Friendly Scanner from 10.150.33.2
[2021-03-04 11:32:15] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:4] Wait(“SIP/user2-00000041”, “2”) in new stack
[2021-03-04 11:32:17] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:5] Playback(“SIP/user2-00000041”, “ss-noservice”) in new stack
[2021-03-04 11:32:17] VERBOSE[4732][C-00000030] file.c: <SIP/user2-00000041> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2021-03-04 11:32:22] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:6] SayAlpha(“SIP/user2-00000041”, “3400”) in new stack
[2021-03-04 11:32:22] VERBOSE[4732][C-00000030] file.c: <SIP/user2-00000041> Playing ‘digits/3.ulaw’ (language ‘en’)
[2021-03-04 11:32:23] VERBOSE[4732][C-00000030] file.c: <SIP/user2-00000041> Playing ‘digits/4.ulaw’ (language ‘en’)
[2021-03-04 11:32:24] VERBOSE[4732][C-00000030] file.c: <SIP/user2-00000041> Playing ‘digits/0.ulaw’ (language ‘en’)
[2021-03-04 11:32:25] VERBOSE[4732][C-00000030] file.c: <SIP/user2-00000041> Playing ‘digits/0.ulaw’ (language ‘en’)
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:7] Hangup(“SIP/user2-00000041”, “”) in new stack
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Spawn extension (from-trunk, s, 7) exited non-zero on ‘SIP/user2-00000041’
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:1] Macro(“SIP/user2-00000041”, “hangupcall,”) in new stack
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/user2-00000041”, “1?theend”) in new stack
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/user2-00000041”, “0?Set(CDR(recordingfile)=)”) in new stack
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Executing [[email protected]:4] Hangup(“SIP/user2-00000041”, “”) in new stack
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/user2-00000041’ in macro ‘hangupcall’
[2021-03-04 11:32:26] VERBOSE[4732][C-00000030] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/user2-00000041’
[2021-03-04 11:37:02] VERBOSE[1911] asterisk.c: Remote UNIX connection
[2021-03-04 11:37:02] VERBOSE[5117] asterisk.c: Remote UNIX connection disconnected
[2021-03-04 11:37:02] VERBOSE[1911] asterisk.c: Remote UNIX connection
[2021-03-04 11:37:02] VERBOSE[5119] asterisk.c: Remote UNIX connection disconnected

Sorry Igaetz, but here no one answer to my question. I will open a new topic with a hope … somebody to read and anwer to it :wink:

On Site 1, create an Inbound Route with DID Number set to 3400 and CallerID Number left blank. Set the Destination to the desired IVR. Test.

I have already split all these posts off into a new topic. Don’t create a new one for this one issue.

edit: /sigh

2 Likes