Calls to Avayn over VPN!

siptrunk
Tags: #<Tag:0x00007f7027dcb3f8>

(Abdulbaset Alanesi) #1

Hello Everyone,

I have 2 Avaya IP500 (one local and the other one is remote but connected via VPN) and they can call each other.
I also have FreePBX local. I created a SIP trunk between the FreePBX and Avaya 1 (the local). working like a charm.
I created another SIP trunk between the FreePBX and Avaya 2 (the remote) but I have an issue with the calls they don’t go through. No tune and I hear a message (The number is not answering)

Both servers FreePBX and Avaya 2 can ping each other via the VPN successfully
Both are showing that the SIP trunk is up and running.
I had the same configurations on both Avayas (1 & 2)
Also same configurations on both SIP trunks on the FreePBX minding the IP addresses.

PEER Details Avaya 1:
host=10.1.4.10
nat=yes
type=friend

PEER Details for Avaya 2:
host=172.16.10.10
nat=yes
type=friend

What am I missing?


#2

If the connection is over VPN, you should not use NAT, and you need to define the network as local.


(Abdulbaset Alanesi) #3

Thank you for your reply @arielgrin
I did that but still the same issue.


(James Zhu) #4

If there is a VPN, no NAT anymore, they are in same LAN. Coud you please show the debug info?


(Abdulbaset Alanesi) #5

Thanks, James,

Is this the one?

7053[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_stack.c: SIP/Avaya_Out_DXB-00000002 Internal Gosub(func-apply-sipheaders,s,1(4)) start

7054[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack

7055[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp(“SIP/Avaya_Out_DXB-00000002”, “Applying SIP Headers to channel SIP/Avaya_Out_DXB-00000002”) in new stack

7056[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:3] Set(“SIP/Avaya_Out_DXB-00000002”, “TECH=SIP”) in new stack

7057[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:4] Set(“SIP/Avaya_Out_DXB-00000002”, “SIPHEADERKEYS=Alert-Info”) in new stack

7058[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:5] While(“SIP/Avaya_Out_DXB-00000002”, “1”) in new stack

7059[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:6] Set(“SIP/Avaya_Out_DXB-00000002”, “sipheader=unset”) in new stack

7060[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “1?SIPRemoveHeader(Alert-Info:)”) in new stack

7061[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack

7062[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?Set(sipheader=<http://127.0.0.1>;info=unset)”) in new stack

7063[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?Set(sipheader=<http://127.0.0.1>unset)”) in new stack

7064[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:11] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?SIPAddHeader(Alert-Info:unset)”) in new stack

7065[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:12] ExecIf(“SIP/Avaya_Out_DXB-00000002”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack

7066[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:13] EndWhile(“SIP/Avaya_Out_DXB-00000002”, “”) in new stack

7067[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:5] While(“SIP/Avaya_Out_DXB-00000002”, “0”) in new stack

7068[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:14] Return(“SIP/Avaya_Out_DXB-00000002”, “”) in new stack

7069[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_stack.c: Spawn extension (from-trunk-sip-Avaya_Out_DXB, 5120, 1) exited non-zero on ‘SIP/Avaya_Out_DXB-00000002’

7070[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_stack.c: SIP/Avaya_Out_DXB-00000002 Internal Gosub(func-apply-sipheaders,s,1(4)) complete GOSUB_RETVAL=

7071[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_dial.c: Called SIP/Avaya_Out_DXB/120

7072[2020-12-28 10:53:40] VERBOSE[10349][C-00000006] chan_sip.c: Got SIP response 503 “Service Unavailable” back from 172.16.10.10:5060

7073[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_dial.c: SIP/Avaya_Out_DXB-00000002 is circuit-busy

7074[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)

7075[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:35] NoOp(“PJSIP/107-00000005”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in new stack

7076[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:36] GotoIf(“PJSIP/107-00000005”, “0?continue,1:s-CONGESTION,1”) in new stack

7077[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx_builtins.c: Goto (macro-dialout-trunk,s-CONGESTION,1)

7078[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“PJSIP/107-00000005”, “RC=34”) in new stack

7079[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“PJSIP/107-00000005”, “34,1”) in new stack

7080[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx_builtins.c: Goto (macro-dialout-trunk,34,1)

7081[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [34@macro-dialout-trunk:1] Goto(“PJSIP/107-00000005”, “continue,1”) in new stack

7082[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)

7083[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [continue@macro-dialout-trunk:1] GotoIf(“PJSIP/107-00000005”, “0?noreport”) in new stack

7084[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [continue@macro-dialout-trunk:2] AGI(“PJSIP/107-00000005”, “agi://127.0.0.1/Avaya_DXB_Trunk”) in new stack

7085[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] res_agi.c: <PJSIP/107-00000005>AGI Script agi://127.0.0.1/Avaya_DXB_Trunk completed, returning 0

7086[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [continue@macro-dialout-trunk:3] NoOp(“PJSIP/107-00000005”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks”) in new stack

7087[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [continue@macro-dialout-trunk:4] ExecIf(“PJSIP/107-00000005”, “1?Set(CALLERID(number)=107)”) in new stack

7088[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [5120@restrictedroute-d3205b316e68a2d08b83b5785cabb27a:12] Macro(“PJSIP/107-00000005”, “outisbusy,”) in new stack

7089[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-outisbusy:1] Progress(“PJSIP/107-00000005”, “”) in new stack

7090[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-outisbusy:2] GotoIf(“PJSIP/107-00000005”, “0?emergency,1”) in new stack

7091[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-outisbusy:3] GotoIf(“PJSIP/107-00000005”, “0?intracompany,1”) in new stack

7092[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] pbx.c: Executing [s@macro-outisbusy:4] Playback(“PJSIP/107-00000005”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack

7093[2020-12-28 10:53:40] VERBOSE[11774][C-00000006] file.c: <PJSIP/107-00000005> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)

7094[2020-12-28 10:53:42] VERBOSE[11774][C-00000006] file.c: <PJSIP/107-00000005> Playing ‘please-try-call-later.ulaw’ (language ‘en’)

7095[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [h@restrictedroute-d3205b316e68a2d08b83b5785cabb27a:1] Hangup(“PJSIP/107-00000005”, “”) in new stack

7096[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Spawn extension (restrictedroute-d3205b316e68a2d08b83b5785cabb27a, h, 1) exited non-zero on ‘PJSIP/107-00000005’

7097[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] app_stack.c: PJSIP/107-00000005 Internal Gosub(crm-hangup,s,1) start

7098[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/107-00000005”, “Sending Hangup to CRM”) in new stack

7099[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/107-00000005”, “HANGUP CAUSE: 34”) in new stack

7100[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/107-00000005”, “0?Set(__CRM_VOICEMAIL=)”) in new stack

7101[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/107-00000005”, “MASTER CHANNEL: 1609142020.7 = 1609142020.7”) in new stack

7102[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/107-00000005”, “0?return”) in new stack

7103[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/107-00000005”, “__CRM_HANGUP=1”) in new stack

7104[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/107-00000005”, “agi://127.0.0.1/sangomacrm.agi”) in new stack

7105[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] res_agi.c: <PJSIP/107-00000005>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0

7106[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/107-00000005”, “”) in new stack

7107[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] app_stack.c: Spawn extension (restrictedroute-d3205b316e68a2d08b83b5785cabb27a, h, 1) exited non-zero on ‘PJSIP/107-00000005’

7108[2020-12-28 10:53:43] VERBOSE[11774][C-00000006] app_stack.c: PJSIP/107-00000005 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=


(Abdulbaset Alanesi) #6

I found the issue.

There was a SIP trunk license issue on the remote Avaya.
The license is already there but somehow it’s not active.
I contacted the supplier to fix it.


(James Zhu) #7

:grinning: