FreePBX | Register | Issues | Wiki | Portal | Support

Difficulties with the dial plan


(Brasil) #1

Hello. Sorry about my English.
I have a central pabx with E1 and stem anologicos (working in a hospital), I got an asterisk16.1 with guidine from freepbx 14 to attend an affiliated clinic, and I connected via sip, I did not put it into production yet because I have a problem that every link external that I try to perform of the extensions created in the asterisk falls directly in the telephone operator of the other exchange, and the cellular number that I was testing that in the case and my personnel of the message that the number is wrong and nor get to direct to the other central, I already modified the plan of dialing forms, I got to delete everything and reinstall from scratch, but it did not solve.


#2

What is the make/model of the hospital PBX?

I assume that the clinic FreePBX is connected via a SIP trunk to the hospital PBX, but does not have any direct connections to the PSTN. Also, that the two PBXes use a different range of extension numbers. If not, please provide details.

Please explain what happens for each of these cases (it works, or what goes wrong):

  1. From an extension on the clinic PBX, dial an extension on the hospital PBX.
  2. From an extension on the hospital PBX, dial an extension on the clinic PBX.
  3. From an extension on the clinic PBX, dial an outside number.
  4. An outside caller dials a number on your E1 that is assigned to an extension in the clinic.

I am having some trouble understanding your English. Possibly, Google will do better. Please write in clear and direct Portuguese and post both the original and the English translation from Google Translate.


(Brasil) #3

Modelo do pbx do hospital é uma ision4000 marca leucotron ramais de 6100 - 6399
No freepbx ramais de 8000 - 8099, esta conectada por meio de tronco sip como mencionou.
Ligações entre ramais de um pbx para outro esta funcionando.
Ligações para numeros fixo ou movel o freepbx encaminha a ligação para o pbx do hospital mas não sai
pelo tronco E1 a ligação sai para o ramal da telefonista do hospital.

Hospital pbx model is an ision4000 brand leucotron extensions from 6100 - 6399 In the freepbx extensions of 8000 - 8099, it is connected via sip trunk as mentioned.
Connections between extensions from one PBX to another is working.
Connections for fixed or mobile numbers the freepbx forwards the call to the pbx of the hospital but does not leave through the trunk E1 the call goes out to the extension of the telephone operator of the hospital.


#4

I know nothing about the ision, so can give only general advice. I suspect that either the dialed number is not formatted correctly on the trunk, or that the call is forbidden (because of restrictions configured in the ision) and diverted to the operator.

Look at the Asterisk log for a failed call. You should see a line that contains something like:
Called SIP/trunkname/00312155555555
(calling 55555555 in Rio de Janeiro and assuming that a hospital user dials 0 before an outside number)
If the trunk is pjsip, you’ll see PJSIP instead of SIP.
The number following the second slash is what got sent to the hospital PBX, after any translations by your Outbound Route and trunk settings. I assume that it should be the same as what a hospital user would dial.

If it’s correct, then the problem is most likely with the configuration at the hospital end. If wrong, check how the Outbound Route is set up and any Dialed Number Manipulation Rules and/or Outbound Dial Prefix in the FreePBX trunk settings.

If you still have trouble, describe how numbers are dialed by the user, what you are passing to the trunk, and what needs to be sent on the E1 line.


(Brasil) #5

Bom dia, na rota de saida coloquei da seguinte forma, prefix= 0 , match pattern= 9XXXXXXXX
numero discado utilizando x-lite 0999185223

number dialed using x-lite 0999185223

Good morning, on the exit route I put the following , prefix = 0, match pattern = 9XXXXXXXX
for mobile numbers

Ip do freepbx 10.0.60.175
Ip do ision 10.0.64.14

e acompanhei pelo CLI>

and I followed the CLI>

Setting global variable ‘SIPDOMAIN’ to ‘10.0.60.175’
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Executing [0999185223@from-internal:1] Macro(“PJSIP/8000-00000049”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“PJSIP/8000-00000049”, “TOUCH_MONITOR=1549964473.231”) in new stack
– Executing [s@macro-user-callerid:2] Set(“PJSIP/8000-00000049”, “AMPUSER=8000”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“PJSIP/8000-00000049”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“PJSIP/8000-00000049”, “1?Set(REALCALLERIDNUM=8000)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“PJSIP/8000-00000049”, “AMPUSER=8000”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“PJSIP/8000-00000049”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“PJSIP/8000-00000049”, “AMPUSERCIDNAME=8000”) in new stack
– Executing [s@macro-user-callerid:8] ExecIf(“PJSIP/8000-00000049”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“PJSIP/8000-00000049”, “0?report”) in new stack
– Executing [s@macro-user-callerid:10] Set(“PJSIP/8000-00000049”, “AMPUSERCID=8000”) in new stack
– Executing [s@macro-user-callerid:11] Set(“PJSIP/8000-00000049”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-user-callerid:12] Set(“PJSIP/8000-00000049”, “CALLERID(all)=“8000” <8000>”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/8000-00000049”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/8000-00000049”, “1?Set(GROUP(concurrency_limit)=8000)”) in new stack
– Executing [s@macro-user-callerid:15] NoOp(“PJSIP/8000-00000049”, “Macro Depth is 1”) in new stack
– Executing [s@macro-user-callerid:16] GotoIf(“PJSIP/8000-00000049”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,17)
– Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/8000-00000049”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,35)
– Executing [s@macro-user-callerid:35] Set(“PJSIP/8000-00000049”, “CALLERID(number)=8000”) in new stack
– Executing [s@macro-user-callerid:36] Set(“PJSIP/8000-00000049”, “CALLERID(name)=8000”) in new stack
– Executing [s@macro-user-callerid:37] GotoIf(“PJSIP/8000-00000049”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:38] Set(“PJSIP/8000-00000049”, “CDR(cnam)=8000”) in new stack
– Executing [s@macro-user-callerid:39] Set(“PJSIP/8000-00000049”, “CDR(cnum)=8000”) in new stack
– Executing [s@macro-user-callerid:40] Set(“PJSIP/8000-00000049”, “CHANNEL(language)=en”) in new stack
– Executing [0999185223@from-internal:2] Gosub(“PJSIP/8000-00000049”, “sub-record-check,s,1(out,0999185223,no)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“PJSIP/8000-00000049”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“PJSIP/8000-00000049”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“PJSIP/8000-00000049”, “NOW=1549964473”) in new stack
– Executing [s@sub-record-check:4] Set(“PJSIP/8000-00000049”, “__DAY=12”) in new stack
– Executing [s@sub-record-check:5] Set(“PJSIP/8000-00000049”, “__MONTH=02”) in new stack
– Executing [s@sub-record-check:6] Set(“PJSIP/8000-00000049”, “__YEAR=2019”) in new stack
– Executing [s@sub-record-check:7] Set(“PJSIP/8000-00000049”, “__TIMESTR=20190212-074113”) in new stack
– Executing [s@sub-record-check:8] Set(“PJSIP/8000-00000049”, “__FROMEXTEN=8000”) in new stack
– Executing [s@sub-record-check:9] Set(“PJSIP/8000-00000049”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“PJSIP/8000-00000049”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“PJSIP/8000-00000049”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“PJSIP/8000-00000049”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“PJSIP/8000-00000049”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“PJSIP/8000-00000049”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“PJSIP/8000-00000049”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] NoOp(“PJSIP/8000-00000049”, “Outbound Recording Check from 8000 to 0999185223”) in new st ack
– Executing [out@sub-record-check:2] Set(“PJSIP/8000-00000049”, “RECMODE=dontcare”) in new stack
– Executing [out@sub-record-check:3] ExecIf(“PJSIP/8000-00000049”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [out@sub-record-check:7] Gosub(“PJSIP/8000-00000049”, “recordcheck,1(no,out,0999185223)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/8000-00000049”, “Starting recording check against no”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/8000-00000049”, “no”) in new stack
– Goto (sub-record-check,recordcheck,12)
– Executing [recordcheck@sub-record-check:12] Set(“PJSIP/8000-00000049”, “__REC_POLICY_MODE=NO”) in new stack
– Executing [recordcheck@sub-record-check:13] Return(“PJSIP/8000-00000049”, “”) in new stack
– Executing [out@sub-record-check:8] Return(“PJSIP/8000-00000049”, “”) in new stack
– Executing [0999185223@from-internal:3] Set(“PJSIP/8000-00000049”, “MOHCLASS=default”) in new stack
– Executing [0999185223@from-internal:4] Set(“PJSIP/8000-00000049”, “_NODEST=”) in new stack
– Executing [0999185223@from-internal:5] Macro(“PJSIP/8000-00000049”, “dialout-trunk,1,0999185223,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“PJSIP/8000-00000049”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] ExecIf(“PJSIP/8000-00000049”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
– Executing [s@macro-dialout-trunk:3] GosubIf(“PJSIP/8000-00000049”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:4] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERID(num)=8000)”) in new stack
– Executing [s@macro-dialout-trunk:5] GotoIf(“PJSIP/8000-00000049”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“PJSIP/8000-00000049”, “DIAL_NUMBER=0999185223”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“PJSIP/8000-00000049”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-dialout-trunk:8] Set(“PJSIP/8000-00000049”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:9] Set(“PJSIP/8000-00000049”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“PJSIP/8000-00000049”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,12)
– Executing [s@macro-dialout-trunk:12] GotoIf(“PJSIP/8000-00000049”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:13] Macro(“PJSIP/8000-00000049”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/8000-00000049”, “8000”) in new stack
– Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/8000-00000049”, “”) in new stack
– Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/8000-00000049”, “off”) in new stack
– Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:6] ExecIf(“PJSIP/8000-00000049”, “0?Set(REALCALLERIDNUM=8000)”) in new stack
– Executing [s@macro-outbound-callerid:7] ExecIf(“PJSIP/8000-00000049”, “0?Set(AMPUSER=8000)”) in new stack
– Executing [s@macro-outbound-callerid:8] GotoIf(“PJSIP/8000-00000049”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] Set(“PJSIP/8000-00000049”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] Set(“PJSIP/8000-00000049”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:14] Set(“PJSIP/8000-00000049”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:15] GotoIf(“PJSIP/8000-00000049”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,20)
– Executing [s@macro-outbound-callerid:20] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:21] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:23] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:24] ExecIf(“PJSIP/8000-00000049”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) i n new stack
– Executing [s@macro-outbound-callerid:25] Set(“PJSIP/8000-00000049”, “CDR(outbound_cnum)=8000”) in new stack
– Executing [s@macro-outbound-callerid:26] Set(“PJSIP/8000-00000049”, “CDR(outbound_cnam)=8000”) in new stack
– Executing [s@macro-dialout-trunk:14] GosubIf(“PJSIP/8000-00000049”, “0?sub-flp-1,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“PJSIP/8000-00000049”, “OUTNUM=0999185223”) in new stack
– Executing [s@macro-dialout-trunk:16] Set(“PJSIP/8000-00000049”, “custom=PJSIP”) in new stack
– Executing [s@macro-dialout-trunk:17] ExecIf(“PJSIP/8000-00000049”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:18] ExecIf(“PJSIP/8000-00000049”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:19] Macro(“PJSIP/8000-00000049”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/8000-00000049”, “”) in new stack
– Executing [s@macro-dialout-trunk:20] GotoIf(“PJSIP/8000-00000049”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:21] ExecIf(“PJSIP/8000-00000049”, “1?Set(CONNECTEDLINE(num,i)=0999185223)”) in new stack
– Executing [s@macro-dialout-trunk:22] ExecIf(“PJSIP/8000-00000049”, “1?Set(CONNECTEDLINE(name,i)=CID:8000)”) in new stack
– Executing [s@macro-dialout-trunk:23] ExecIf(“PJSIP/8000-00000049”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)8000)”) in new s tack
– Executing [s@macro-dialout-trunk:24] GotoIf(“PJSIP/8000-00000049”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:25] Dial(“PJSIP/8000-00000049”, “PJSIP/0999185223@6350,300,Tb(func-apply-sipheaders^s^1,(1) )”) in new stack
– PJSIP/6350-0000004a Internal Gosub(func-apply-sipheaders,s,1(1)) start
– Executing [s@func-apply-sipheaders:1] NoOp(“PJSIP/6350-0000004a”, “Applying SIP Headers to channel PJSIP/6350-0000004a”) in new stack
– Executing [s@func-apply-sipheaders:2] Set(“PJSIP/6350-0000004a”, “TECH=PJSIP”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“PJSIP/6350-0000004a”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:4] While(“PJSIP/6350-0000004a”, “0”) in new stack
– Jumping to priority 11
– Executing [s@func-apply-sipheaders:12] Return(“PJSIP/6350-0000004a”, “”) in new stack
== Spawn extension (from-pstn, 0999185223, 1) exited non-zero on ‘PJSIP/6350-0000004a’
– PJSIP/6350-0000004a Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
– Called PJSIP/0999185223@6350
– PJSIP/6350-0000004a is ringing
– PJSIP/6350-0000004a is ringing
== Spawn extension (macro-dialout-trunk, s, 25) exited non-zero on ‘PJSIP/8000-00000049’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 0999185223, 5) exited non-zero on ‘PJSIP/8000-00000049’
– Executing [h@from-internal:1] Macro(“PJSIP/8000-00000049”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/8000-00000049”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/8000-00000049”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“PJSIP/8000-00000049”, "PJSIP/6350-0000004a monior file= ") in new stack
– Executing [s@macro-hangupcall:5] AGI(“PJSIP/8000-00000049”, “attendedtransfer-rec-restart.php,PJSIP/6350-0000004a,”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <PJSIP/8000-00000049>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [s@macro-hangupcall:6] Hangup(“PJSIP/8000-00000049”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/8000-00000049’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/8000-00000049’


(system) closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.