IAX2 and paging groups

Hi all,
I have 2 FreePBX 14 servers:
PBX1 has all the calling extensions (2xxx)
PBX2 has all the speakers (4xxx)
The servers are linked together via IAX2 trunk

Everything is working good, I can call from 2001 to 4101
The problem is with the paging groups, I have 4101, 4102 and 4013 in a group (lets call it 4900)
A fast Google search told me that IAX doesn’t work with groups

My question is, can I do something to manipulate an extension to forward it to call the group (or something like that) ?
Thanks

Set up the paging group on PBX2 and let the outbound route handle it. If you set up the route correctly, it should see “4xxx” and off you go. If that doesn’t work, post the logs so we can see what it isn’t doing.

I already tried that…
Here are the logs:
Log from PBX1 (ext 2035 calling group 4900 with ext 4700 and 4701):

VOIPCLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/2035-0000003e”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“SIP/2035-0000003e”, “TOUCH_MONITOR=1499976432.118”) in new stack
– Executing [[email protected]:2] Set(“SIP/2035-0000003e”, “AMPUSER=2035”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/2035-0000003e”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/2035-0000003e”, “1?Set(__REALCALLERIDNUM=2035)”) in new stack
– Executing [[email protected]:5] Set(“SIP/2035-0000003e”, “AMPUSER=2035”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/2035-0000003e”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/2035-0000003e”, “AMPUSERCIDNAME=Shmuel Kramer”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/2035-0000003e”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/2035-0000003e”, “AMPUSERCID=2035”) in new stack
– Executing [[email protected]:10] Set(“SIP/2035-0000003e”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/2035-0000003e”, “CALLERID(all)=“Shmuel Kramer” <2035>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/2035-0000003e”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/2035-0000003e”, “1?Set(GROUP(concurrency_limit)=2035)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/2035-0000003e”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/2035-0000003e”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“SIP/2035-0000003e”, “CALLERID(number)=2035”) in new stack
– Executing [[email protected]:30] Set(“SIP/2035-0000003e”, “CALLERID(name)=Shmuel Kramer”) in new stack
– Executing [[email protected]:31] GotoIf(“SIP/2035-0000003e”, “0?cnum”) in new stack
– Executing [[email protected]:32] Set(“SIP/2035-0000003e”, “CDR(cnam)=Shmuel Kramer”) in new stack
– Executing [[email protected]:33] Set(“SIP/2035-0000003e”, “CDR(cnum)=2035”) in new stack
– Executing [[email protected]:34] Set(“SIP/2035-0000003e”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:35] GosubIf(“SIP/2035-0000003e”, “0?app-check-classofservce,s,1()”) in new stack
– Executing [[email protected]:2] Set(“SIP/2035-0000003e”, “ROUTEUSER=2035”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/2035-0000003e”, “1?notblind”) in new stack
– Goto (from-internal,4900,6)
– Executing [[email protected]:6] GotoIf(“SIP/2035-0000003e”, “1?restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb,4900,2:outbound-allroutes,4900,2”) in new stack
– Goto (restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb,4900,2)
– Executing [[email protected]:2] Gosub(“SIP/2035-0000003e”, “sub-record-check,s,1(out,4900,never)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/2035-0000003e”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/2035-0000003e”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/2035-0000003e”, “NOW=1499976432”) in new stack
– Executing [[email protected]:4] Set(“SIP/2035-0000003e”, “__DAY=13”) in new stack
– Executing [[email protected]:5] Set(“SIP/2035-0000003e”, “__MONTH=07”) in new stack
– Executing [[email protected]:6] Set(“SIP/2035-0000003e”, “__YEAR=2017”) in new stack
– Executing [[email protected]:7] Set(“SIP/2035-0000003e”, “__TIMESTR=20170713-200712”) in new stack
– Executing [[email protected]:8] Set(“SIP/2035-0000003e”, “__FROMEXTEN=2035”) in new stack
– Executing [[email protected]:9] Set(“SIP/2035-0000003e”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/2035-0000003e”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/2035-0000003e”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/2035-0000003e”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/2035-0000003e”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/2035-0000003e”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/2035-0000003e”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“SIP/2035-0000003e”, “Outbound Recording Check from 2035 to 4900”) in new stack
– Executing [[email protected]:2] Set(“SIP/2035-0000003e”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/2035-0000003e”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“SIP/2035-0000003e”, “recordcheck,1(never,out,4900)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/2035-0000003e”, “Starting recording check against never”) in new stack
– Executing [[email protected]:2] Goto(“SIP/2035-0000003e”, “never”) in new stack
– Goto (sub-record-check,recordcheck,14)
– Executing [[email protected]:14] Set(“SIP/2035-0000003e”, “__REC_POLICY_MODE=NEVER”) in new stack
– Executing [[email protected]:15] Goto(“SIP/2035-0000003e”, “stoprec”) in new stack
– Goto (sub-record-check,recordcheck,25)
– Executing [[email protected]:25] NoOp(“SIP/2035-0000003e”, “Stopping recording: out, 4900”) in new stack
– Executing [[email protected]:26] Set(“SIP/2035-0000003e”, “__REC_STATUS=STOPPED”) in new stack
– Executing [[email protected]:27] System(“SIP/2035-0000003e”, “/var/lib/asterisk/bin/stoprecording.php “SIP/2035-0000003e””) in new stack
– Executing [[email protected]:28] Return(“SIP/2035-0000003e”, “”) in new stack
– Executing [[email protected]:8] Return(“SIP/2035-0000003e”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/2035-0000003e”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] Set(“SIP/2035-0000003e”, “INTRACOMPANYROUTE=YES”) in new stack
– Executing [[email protected]:5] Set(“SIP/2035-0000003e”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:6] Set(“SIP/2035-0000003e”, “_NODEST=”) in new stack
– Executing [[email protected]:7] Macro(“SIP/2035-0000003e”, “dialout-trunk,3,4900,off”) in new stack
– Executing [[email protected]:1] Set(“SIP/2035-0000003e”, “DIAL_TRUNK=3”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/2035-0000003e”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/2035-0000003e”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/2035-0000003e”, “DIAL_NUMBER=4900”) in new stack
– Executing [[email protected]:5] Set(“SIP/2035-0000003e”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“SIP/2035-0000003e”, “OUTBOUND_GROUP=OUT_3”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/2035-0000003e”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/2035-0000003e”, “1?skipoutcid”) in new stack
– Goto (macro-dialout-trunk,s,12)
– Executing [[email protected]:12] GosubIf(“SIP/2035-0000003e”, “0?sub-flp-3,s,1()”) in new stack
– Executing [[email protected]:13] Set(“SIP/2035-0000003e”, “OUTNUM=4900”) in new stack
– Executing [[email protected]:14] Set(“SIP/2035-0000003e”, “custom=IAX2/VOIP_CONNECTION”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/2035-0000003e”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Ttr)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/2035-0000003e”, “0?Set(DIAL_TRUNK_OPTIONS=TtrM(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“SIP/2035-0000003e”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/2035-0000003e”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/2035-0000003e”, “0?skipcrm”) in new stack
– Executing [[email protected]:19] Set(“SIP/2035-0000003e”, “__CRM_DIRECTION=OUTBOUND”) in new stack
– Executing [[email protected]:20] Set(“SIP/2035-0000003e”, “__CRM_DESTINATION=4900”) in new stack
– Executing [[email protected]:21] Set(“SIP/2035-0000003e”, “__CRM_SOURCE=2035”) in new stack
– Executing [[email protected]:22] AGI(“SIP/2035-0000003e”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <SIP/2035-0000003e>AGI Script sangomacrm.agi completed, returning 0
– Executing [[email protected]:23] Set(“SIP/2035-0000003e”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [[email protected]:24] NoOp(“SIP/2035-0000003e”, “CRM Finished”) in new stack
– Executing [[email protected]:25] GotoIf(“SIP/2035-0000003e”, “0?bypass,1”) in new stack
– Executing [[email protected]:26] ExecIf(“SIP/2035-0000003e”, “1?Set(CONNECTEDLINE(num,i)=4900)”) in new stack
– Executing [[email protected]:27] ExecIf(“SIP/2035-0000003e”, “1?Set(CONNECTEDLINE(name,i)=CID:2035)”) in new stack
– Executing [[email protected]:28] ExecIf(“SIP/2035-0000003e”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)2035)”) in new stack
– Executing [[email protected]:29] GotoIf(“SIP/2035-0000003e”, “0?customtrunk”) in new stack
– Executing [[email protected]:30] Dial(“SIP/2035-0000003e”, “IAX2/VOIP_CONNECTION/4900,300,Ttr”) in new stack
– Called IAX2/VOIP_CONNECTION/4900
– Call accepted by 192.168.111.3:4569 (format ulaw)
– Format for call is (ulaw)
– IAX2/VOIP_CONNECTION-25501 answered SIP/2035-0000003e
– Channel IAX2/VOIP_CONNECTION-25501 joined ‘simple_bridge’ basic-bridge <513f76a3-e3be-47e8-8bf8-57dcf9870799>
– Channel SIP/2035-0000003e joined ‘simple_bridge’ basic-bridge <513f76a3-e3be-47e8-8bf8-57dcf9870799>
> 0x7fbb0c2b7e50 – Probation passed - setting RTP source address to 192.168.111.56:16518
– Channel SIP/2035-0000003e left ‘simple_bridge’ basic-bridge <513f76a3-e3be-47e8-8bf8-57dcf9870799>
– Channel IAX2/VOIP_CONNECTION-25501 left ‘simple_bridge’ basic-bridge <513f76a3-e3be-47e8-8bf8-57dcf9870799>
== Spawn extension (macro-dialout-trunk, s, 30) exited non-zero on ‘SIP/2035-0000003e’ in macro ‘dialout-trunk’
– Hungup ‘IAX2/VOIP_CONNECTION-25501’
== Spawn extension (restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb, 4900, 7) exited non-zero on ‘SIP/2035-0000003e’
– Executing [[email protected]:1] Hangup(“SIP/2035-0000003e”, “”) in new stack
== Spawn extension (restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb, h, 1) exited non-zero on ‘SIP/2035-0000003e’
– SIP/2035-0000003e Internal Gosub(crm-hangup,s,1) start
– Executing [[email protected]:1] NoOp(“SIP/2035-0000003e”, “Sending Hangup to CRM”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/2035-0000003e”, “HANGUP CAUSE: 16”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/2035-0000003e”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [[email protected]:4] NoOp(“SIP/2035-0000003e”, “MASTER CHANNEL: 1499976432.118 = 1499976432.118”) in new stack
– Executing [[email protected]:5] GotoIf(“SIP/2035-0000003e”, “0?return”) in new stack
– Executing [[email protected]:6] Set(“SIP/2035-0000003e”, “__CRM_HANGUP=1”) in new stack
– Executing [[email protected]:7] AGI(“SIP/2035-0000003e”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <SIP/2035-0000003e>AGI Script sangomacrm.agi completed, returning 0
– Executing [[email protected]:8] Return(“SIP/2035-0000003e”, “”) in new stack
== Spawn extension (restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb, h, 1) exited non-zero on ‘SIP/2035-0000003e’
– SIP/2035-0000003e Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
VOIP
CLI>

Log from PBX2:

BELLCLI>
– Accepting UNAUTHENTICATED call from 192.168.111.2:4569:
– > requested format = ulaw,
– > requested prefs = (ulaw|alaw|gsm),
– > actual format = ulaw,
– > host prefs = (ulaw|alaw|gsm),
– > priority = mine
– Executing [[email protected]:1] Set(“IAX2/VOIP_CONNECTION-9856”, “__FROM_DID=4900”) in new stack
– Executing [[email protected]:2] NoOp(“IAX2/VOIP_CONNECTION-9856”, “Received an unknown call with DID set to 4900”) in new stack
– Executing [[email protected]:3] Goto(“IAX2/VOIP_CONNECTION-9856”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“IAX2/VOIP_CONNECTION-9856”, “”) in new stack
[2017-07-13 16:11:06] WARNING[18767][C-00002ca2]: chan_sip.c:23016 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:3] Log(“IAX2/VOIP_CONNECTION-9856”, "WARNING,Friendly Scanner from ") in new stack
[2017-07-13 16:11:06] WARNING[18767][C-00002ca2]: Ext. s:3 @ from-trunk: Friendly Scanner from
– Executing [[email protected]:4] Wait(“IAX2/VOIP_CONNECTION-9856”, “2”) in new stack
– Executing [[email protected]:5] Playback(“IAX2/VOIP_CONNECTION-9856”, “ss-noservice”) in new stack
– <IAX2/VOIP_CONNECTION-9856> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [[email protected]:6] SayAlpha(“IAX2/VOIP_CONNECTION-9856”, “4900”) in new stack
– <IAX2/VOIP_CONNECTION-9856> Playing ‘digits/4.ulaw’ (language ‘en’)
– <IAX2/VOIP_CONNECTION-9856> Playing ‘digits/9.ulaw’ (language ‘en’)
– <IAX2/VOIP_CONNECTION-9856> Playing ‘digits/0.ulaw’ (language ‘en’)
– <IAX2/VOIP_CONNECTION-9856> Playing ‘digits/0.ulaw’ (language ‘en’)
– Executing [[email protected]:7] Hangup(“IAX2/VOIP_CONNECTION-9856”, “”) in new stack
== Spawn extension (from-trunk, s, 7) exited non-zero on ‘IAX2/VOIP_CONNECTION-9856’
– Executing [[email protected]:1] Macro(“IAX2/VOIP_CONNECTION-9856”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“IAX2/VOIP_CONNECTION-9856”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“IAX2/VOIP_CONNECTION-9856”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“IAX2/VOIP_CONNECTION-9856”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘IAX2/VOIP_CONNECTION-9856’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘IAX2/VOIP_CONNECTION-9856’
– Hungup 'IAX2/VOIP_CONNECTION-9856’
BELL
CLI>

Thanks for the help

Your Iax trunk is not authenticating correctly with pbx2 can you send screen shots of the two iax trunk config pages

Seems like you should be using “from-internal” for the context on this inbound route…

Thanks for the reply
I changed “context=from-trunk” to “context=from-internal” and everything is working now…
Thanks