Trunk with multiple user question

I am an asterisk newbie so please be kind. I have a sip trunk with 3 users, 3 separate DID’s. I have been able to get the first user working perfectly, however the other users are not configured correctly to receive calls from the other DIDs. I went through the same steps to setup these users. What is happening is, ext 1000 can dial out and receive calls display correctly, ext 1001 can dial out, displays as 1000 DID, can’t receive calls. If I dial DID for ext 1001 it will ring ext 1000.

Configuration:

From the FreePBX gui
Extensions
[1000]
Display name, CID Num Alias, SIP Alias, Outbound CID = 5555550001
[1001]
Display name, CID Num Alias, SIP Alias, Outbound CID = 5555550002
Add Inbound DID = 5555550002

Trunk
[siptrunkprovider]
Outbound caller id = 5555550001
CID Options = Force Trunk CID
Dial Rules = 1+NXXNXXXXXX
NXXNXXXXXX
Trunk Name = siptrunkprovider

PEER Details
host=192.168.1.1
port=5060
type=peer
allow=ulaw&g729
dtmfmode=auto
nat=no
fromuser=5555550001
username=5555550001
secret=password
fromdomain=sip.provider.net
context=from-trunk
insecure=very
qualify=yes

5555550001:[email protected]/5555550001

Inbound Route:
[1000]
DID Number = 5555550001
Extensions = <1000> 5555550001

[1001]
DID Number = 5555550002
Extensions = <1001> 5555550002

As I said i’m a newbie, so if i’m missing necessary information, please tell me and I can show all necessary info. Any help would be appreciated.

What provider if you are using? You have have mistakenly entered a CID number that overrides anything sent by your pbx.

is Outbound caller id = 555555000 in peer details or in the appropriate field? And you select “Allow Any CID”?

What do you see on your console when makin an inbound call to the second DID?

From the CLI type: Asterisk -r

then call the second DID

Provider is global phone

They originally provisioned the box to register to their server, but that is where their support ends. I would assume they know what they are doing. So the trunk and extension 1000 remains how they configured. I’m confused when you say that I mistakenly entered a CID that overrides what is sent by the pbx, can you clarify? When I call the second number, the console shows its being sent to the first ext. dialparties.agi accepts the call, adds ext 1000 to extension map, and proceeds to dial ext 1000. What it should be doing is recognizing the number dialed as the one that is connected to ext 1001 and then attempt to call ext 1001.

I still can’t figure this out :confused:

as soon as you see the incoming call, you should see something like this.

– Executing [[email protected]:1] Set(“SIP/globalphone-inbound-0000004a”, “__FROM_DID=5555550002”) in new stack

followed by everything else that happens… That DID is what your sip provider is sending you. You need to verify it matches your inbound route… and you inbound route for that did has the correct destination.


for your outbound CID issue, some providers allow you to set a CID in their portal. and if you do, it overrides anything sent by your PBX. Your extension should have what you want the CID to be, and the trunk should be set to “allow any CID”

but this line in your config is the problem
CID Options = Force Trunk CID

removing that should let the extension send anything you want as CID

Heres what asterisk is doing…

When I dial out from ext 1001 (the second ext)

-- Executing [[email protected]:1] Macro("SIP/1001-00000199", "user-callerid,SKIPTTL,") in new stack
-- Executing [[email protected]:1] Set("SIP/1001-00000199", "AMPUSER=1001") in new stack
-- Executing [[email protected]:2] GotoIf("SIP/1001-00000199", "0?report") in new stack
-- Executing [[email protected]:3] ExecIf("SIP/1001-00000199", "1?Set(REALCALLERIDNUM=1001)") in new stack
-- Executing [[email protected]:4] Set("SIP/1001-00000199", "AMPUSER=1001") in new stack
-- Executing [[email protected]:5] Set("SIP/1001-00000199", "AMPUSERCIDNAME=5555550002") in new stack
-- Executing [[email protected]:6] GotoIf("SIP/1001-00000199", "0?report") in new stack
-- Executing [[email protected]:7] Set("SIP/1001-00000199", "AMPUSERCID=1001") in new stack
-- Executing [[email protected]:8] Set("SIP/1001-00000199", "CALLERID(all)="5555550002" <1001>") in new stack
-- Executing [[email protected]:9] GotoIf("SIP/1001-00000199", "1?continue") in new stack
-- Goto (macro-user-callerid,s,18)
-- Executing [[email protected]:18] NoOp("SIP/1001-00000199", "Using CallerID "5555550002" <1001>") in new stack
-- Executing [[email protected]:2] Set("SIP/1001-00000199", "_NODEST=") in new stack
-- Executing [[email protected]:3] Macro("SIP/1001-00000199", "record-enable,1001,OUT,") in new stack
-- Executing [[email protected]:1] GotoIf("SIP/1001-00000199", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [[email protected]:4] ExecIf("SIP/1001-00000199", "0?MacroExit()") in new stack
-- Executing [[email protected]:5] GotoIf("SIP/1001-00000199", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,16)
-- Executing [[email protected]:16] GotoIf("SIP/1001-00000199", "0?IN") in new stack
-- Executing [[email protected]:17] ExecIf("SIP/1001-00000199", "1?MacroExit()") in new stack
-- Executing [[email protected]:4] Macro("SIP/1001-00000199", "dialout-trunk,2,16465551234,,") in new stack
-- Executing [[email protected]:1] Set("SIP/1001-00000199", "DIAL_TRUNK=2") in new stack
-- Executing [[email protected]:2] GosubIf("SIP/1001-00000199", "0?sub-pincheck,s,1") in new stack
-- Executing [[email protected]:3] GotoIf("SIP/1001-00000199", "0?disabletrunk,1") in new stack
-- Executing [[email protected]:4] Set("SIP/1001-00000199", "DIAL_NUMBER=16465551234") in new stack
-- Executing [[email protected]:5] Set("SIP/1001-00000199", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [[email protected]:6] Set("SIP/1001-00000199", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [[email protected]:7] GotoIf("SIP/1001-00000199", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [[email protected]:9] GotoIf("SIP/1001-00000199", "0?skipoutcid") in new stack
-- Executing [[email protected]:10] Set("SIP/1001-00000199", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [[email protected]:11] Macro("SIP/1001-00000199", "outbound-callerid,2") in new stack
-- Executing [[email protected]:1] ExecIf("SIP/1001-00000199", "0?Set(CALLERPRES()=)") in new stack
-- Executing [[email protected]:2] ExecIf("SIP/1001-00000199", "0?Set(REALCALLERIDNUM=1001)") in new stack
-- Executing [[email protected]:3] GotoIf("SIP/1001-00000199", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [[email protected]:6] Set("SIP/1001-00000199", "USEROUTCID=") in new stack
-- Executing [[email protected]:7] Set("SIP/1001-00000199", "EMERGENCYCID=") in new stack
-- Executing [[email protected]:8] Set("SIP/1001-00000199", "TRUNKOUTCID=") in new stack
-- Executing [[email protected]:9] GotoIf("SIP/1001-00000199", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [[email protected]:12] ExecIf("SIP/1001-00000199", "0?Set(CALLERID(all)=)") in new stack
-- Executing [[email protected]:13] ExecIf("SIP/1001-00000199", "0?Set(CALLERID(all)=)") in new stack
-- Executing [[email protected]:14] ExecIf("SIP/1001-00000199", "0?Set(CALLERID(all)=)") in new stack
-- Executing [[email protected]:15] ExecIf("SIP/1001-00000199", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [[email protected]:12] ExecIf("SIP/1001-00000199", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
-- <SIP/1001-00000199>AGI Script fixlocalprefix completed, returning 0
-- Executing [[email protected]:13] Set("SIP/1001-00000199", "OUTNUM=16465551234") in new stack
-- Executing [[email protected]:14] Set("SIP/1001-00000199", "custom=SIP/gphone") in new stack
-- Executing [[email protected]:15] ExecIf("SIP/1001-00000199", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [[email protected]:16] Macro("SIP/1001-00000199", "dialout-trunk-predial-hook,") in new stack
-- Executing [[email protected]:1] MacroExit("SIP/1001-00000199", "") in new stack
-- Executing [[email protected]:17] GotoIf("SIP/1001-00000199", "0?bypass,1") in new stack
-- Executing [[email protected]:18] GotoIf("SIP/1001-00000199", "0?customtrunk") in new stack
-- Executing [[email protected]:19] Dial("SIP/1001-00000199", "SIP/gphone/16465551234,300,") in new stack

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called gphone/16465551234
– SIP/gphone-0000019a is making progress passing it to SIP/1001-00000199
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/1001-00000199’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 16465551234, 4) exited non-zero on ‘SIP/1001-00000199’
– Executing [[email protected]:1] Macro(“SIP/1001-00000199”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/1001-00000199”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/1001-00000199”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/1001-00000199”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/1001-00000199”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/1001-00000199’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1001-00000199’


Ext 1001 should show 5555550002, but it shows 5555550001.

When I try to call in to 5555550002, this is what happens:

-- Executing [[email protected]:1] Goto("SIP/gphone-000001b5", "from-internal,1000,1") in new stack
-- Goto (from-internal,1000,1)
-- Executing [[email protected]:1] Macro("SIP/gphone-000001b5", "exten-vm,novm,1000") in new stack
-- Executing [[email protected]:1] Macro("SIP/gphone-000001b5", "user-callerid,") in new stack
-- Executing [[email protected]:1] Set("SIP/gphone-000001b5", "AMPUSER=6465551234") in new stack
-- Executing [[email protected]:2] GotoIf("SIP/gphone-000001b5", "0?report") in new stack
-- Executing [[email protected]:3] ExecIf("SIP/gphone-000001b5", "1?Set(REALCALLERIDNUM=6465551234)") in new stack
-- Executing [[email protected]:4] Set("SIP/gphone-000001b5", "AMPUSER=") in new stack
-- Executing [[email protected]:5] Set("SIP/gphone-000001b5", "AMPUSERCIDNAME=") in new stack
-- Executing [[email protected]:6] GotoIf("SIP/gphone-000001b5", "1?report") in new stack
-- Goto (macro-user-callerid,s,9)
-- Executing [[email protected]:9] GotoIf("SIP/gphone-000001b5", "0?continue") in new stack
-- Executing [[email protected]:10] Set("SIP/gphone-000001b5", "__TTL=64") in new stack
-- Executing [[email protected]:11] GotoIf("SIP/gphone-000001b5", "1?continue") in new stack
-- Goto (macro-user-callerid,s,18)
-- Executing [[email protected]:18] NoOp("SIP/gphone-000001b5", "Using CallerID "CALLER ID" <6465551234>") in new stack
-- Executing [[email protected]:2] Set("SIP/gphone-000001b5", "RingGroupMethod=none") in new stack
-- Executing [[email protected]:3] Set("SIP/gphone-000001b5", "VMBOX=novm") in new stack
-- Executing [[email protected]:4] Set("SIP/gphone-000001b5", "EXTTOCALL=1000") in new stack
-- Executing [[email protected]:5] Set("SIP/gphone-000001b5", "CFUEXT=") in new stack
-- Executing [[email protected]:6] Set("SIP/gphone-000001b5", "CFBEXT=") in new stack
-- Executing [[email protected]:7] Set("SIP/gphone-000001b5", "RT=""") in new stack
-- Executing [[email protected]:8] Macro("SIP/gphone-000001b5", "record-enable,1000,IN") in new stack
-- Executing [[email protected]:1] GotoIf("SIP/gphone-000001b5", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [[email protected]:4] ExecIf("SIP/gphone-000001b5", "0?MacroExit()") in new stack
-- Executing [[email protected]:5] GotoIf("SIP/gphone-000001b5", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,16)
-- Executing [[email protected]:16] GotoIf("SIP/gphone-000001b5", "1?IN") in new stack
-- Goto (macro-record-enable,s,21)
-- Executing [[email protected]:21] ExecIf("SIP/gphone-000001b5", "1?MacroExit()") in new stack
-- Executing [[email protected]:9] Macro("SIP/gphone-000001b5", "dial,,tr,1000") in new stack
-- Executing [[email protected]:1] GotoIf("SIP/gphone-000001b5", "1?dial") in new stack
-- Goto (macro-dial,s,3)
-- Executing [[email protected]:3] AGI("SIP/gphone-000001b5", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi

dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is ‘CALLER ID’ number is '6465551234’
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 1000 to extension map
– dialparties.agi: Extension 1000 cf is disabled
– dialparties.agi: Extension 1000 do not disturb is disabled
dialparties.agi: EXTENSION_STATE: 1 (INUSE)
dialparties.agi: Extension 1000 has call waiting enabled with state: 1
– dialparties.agi: dbset CALLTRACE/1000 to 6465551234
– dialparties.agi: Filtered ARG3: 1000
– <SIP/gphone-000001b5>AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:7] Dial(“SIP/gphone-000001b5”, “SIP/1000,tr”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called 1000
– SIP/1000-000001b6 is ringing
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/gphone-000001b5’ in macro ‘dial’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘SIP/gphone-000001b5’ in macro ‘exten-vm’
== Spawn extension (from-internal, 1000, 1) exited non-zero on ‘SIP/gphone-000001b5’
– Executing [[email protected]:1] Macro(“SIP/gphone-000001b5”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/gphone-000001b5”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/gphone-000001b5”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/gphone-000001b5”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/gphone-000001b5”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/gphone-000001b5’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/gphone-000001b5’


So asterisk is changing 5555550002 to 5555550001 and then calling the ext associated with that number instead.

Just to clarify once more what I want:
Ext 1000 => DID (5555550001) in and out
Ext 1001 => DID (5555550002) in and out

What is happening is:
Ext 1000 => DID (5555550001) in and out
Ext 1001 => DID (5555550001) out and in goes to Ext 1000.

also an update:
I changed CID option=Allow Any
But this still shows the above. Is this a provider issue? Or can I override this?

Why is the call arriving on from-internal instead of from-trunk?

@skyking

???

Interesting when I change exts from-internal to from-trunk, I am unable to dial and I get this error…

-- Executing [[email protected]:6] Hangup("SIP/1001-000001eb", "") in new stack

== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/1001-000001eb’
– Executing [[email protected]:1] Hangup(“SIP/1001-000001eb”, “”) in new stack
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/1001-000001eb’
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Set(“SIP/1001-000001ec”, “__FROM_DID=16465551234”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/1001-000001ec”, “Received an unknown call with DID set to 16465551234”) in new stack
– Executing [[email protected]:3] Goto(“SIP/1001-000001ec”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“SIP/1001-000001ec”, “”) in new stack
– Executing [[email protected]:3] Wait(“SIP/1001-000001ec”, “2”) in new stack
– Executing [[email protected]:4] Playback(“SIP/1001-000001ec”, “ss-noservice”) in new stack
– <SIP/1001-000001ec> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [[email protected]:5] SayAlpha(“SIP/1001-000001ec”, “16465551234”) in new stack
– <SIP/1001-000001ec> Playing ‘digits/1.ulaw’ (language ‘en’)
== Spawn extension (from-trunk, s, 5) exited non-zero on ‘SIP/1001-000001ec’
– Executing [[email protected]:1] Hangup(“SIP/1001-000001ec”, “”) in new stack
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/1001-000001ec’


Here is the trunk info

[gphone]
host=192.168.1.1
port=5060
type=peer
allow=ulaw
allow=g729
dtmfmode=auto
nat=no
fromuser=5555550001
username=5555550001
secret=password
fromdomain=siptrunk.provider.net
context=from-trunk
insecure=port,invite
qualify=yes


Do you have an inbound route for the DID’s? The log indicates you did not.

Yes I do, each extension has a specific number that is supposed to be assigned to it.

Here is the dial plan…


[ext-did]
include => ext-did-custom
include => ext-did-0001
include => ext-did-0002
exten => foo,1,Noop(bar)

; end of [ext-did]

[ext-did-0002]
include => ext-did-0002-custom
exten => 5555550002,1,Set(__FROM_DID=${EXTEN})
exten => 5555550002,n,ExecIf($[ “${CALLERID(name)}” = “” ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 5555550002,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 5555550002,n,Set(CALLERPRES()=allowed_not_screened)
exten => 5555550002,n(dest-ext),Goto(from-did-direct,1001,1)

; end of [ext-did-0002]

[ext-did-catchall]
include => ext-did-catchall-custom
exten => s,1,Noop(No DID or CID Match)
exten => s,n(a2),Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,SayAlpha(${FROM_DID})
exten => s,n,Hangup
exten => _.,1,Set(__FROM_DID=${EXTEN})
exten => _.,n,Noop(Received an unknown call with DID set to ${EXTEN})
exten => _.,n,Goto(s,a2)
exten => h,1,Hangup

; end of [ext-did-catchall]

[ext-local]
include => ext-local-custom
exten => 1000,1,Macro(exten-vm,novm,1000)
exten => 1000,n,Goto(${IVR_CONTEXT},return,1)
exten => 1000,hint,SIP/1000
exten => 5555550001,1,Goto(from-internal,1000,1)
exten => 1001,1,Macro(exten-vm,novm,1001)
exten => 1001,n,Goto(${IVR_CONTEXT},return,1)
exten => 1001,hint,SIP/1001
exten => vmret,1,GotoIf($["${IVR_RETVM}" = “RETURN” & “${IVR_CONTEXT}” != “”]?playret)
exten => vmret,n,Hangup
exten => vmret,n(playret),Playback(exited-vm-will-be-transfered&silence/1)
exten => vmret,n,Goto(${IVR_CONTEXT},return,1)

; end of [ext-local]

[from-did-direct-ivr]
include => from-did-direct-ivr-custom
exten => 1000,1,ExecIf($["${BLKVM_OVERRIDE}" != “”]?Noop(Deleting: ${BLKVM_OVERRIDE}: ${DB_DELETE(${BLKVM_OVERRIDE})}))
exten => 1000,n,Set(__NODEST=)
exten => 1000,n,Goto(from-did-direct,1000,1)
exten => 1001,1,ExecIf($["${BLKVM_OVERRIDE}" != “”]?Noop(Deleting: ${BLKVM_OVERRIDE}: ${DB_DELETE(${BLKVM_OVERRIDE})}))
exten => 1001,n,Set(__NODEST=)
exten => 1001,n,Goto(from-did-direct,1001,1)

; end of [from-did-direct-ivr]

[from-trunk-sip-gphone]
include => from-trunk-sip-gphone-custom
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

; end of [from-trunk-sip-gphone]

[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = “”]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""]?MacroExit())
exten => s,n,GotoIf($["${ARG2}"=“Group”]?Group:OUT)
exten => s,n(Group),Set(LOOPCNT=${FIELDQTY(ARG1,-)})
exten => s,n,Set(ITER=1)
exten => s,n(begin),Set(RECSET="${DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording)}")
exten => s,n,GotoIf($["${RECSET}"="" | “${CUT(RECSET,\|,2):3}” != “Always”]?continue)
exten => s,n,Set(TEXTEN=${CUT(ARG1,-,${ITER}))
exten => s,n,Noop(Recording enable for ${TEXTEN})
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(continue),Set(ITER=$[${ITER}+1])
exten => s,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
exten => s,n(OUT),GotoIf($["${ARG2}"=“IN”]?IN)
exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,1):4}" != “Always”]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=OUT${ARG1}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(IN),ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,2):3}" != “Always”]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=IN${ARG1}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},${MIXMON_POST})
exten => s,n,MacroExit()

; end of [macro-record-enable]

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-9_outside
include => outrt-002-GPHONE
exten => _!,1,Macro(user-callerid,SKIPTTL,)

; end of [outbound-allroutes]

[outrt-001-9_outside]
include => outrt-001-9_outside-custom
exten => _9.,1,Noop(Macro(user-callerid): executed in outbound-allroutes PRI 1)
exten => _9.,n,Set(_NODEST=)
exten => _9.,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _9.,n,Macro(dialout-trunk,1,${EXTEN:1},)
exten => _9.,n,Macro(outisbusy,)

; end of [outrt-001-9_outside]

[outrt-002-GPHONE]
include => outrt-002-GPHONE-custom
exten => _.,1,Noop(Macro(user-callerid): executed in outbound-allroutes PRI 1)
exten => _.,n,Set(_NODEST=)
exten => _.,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _.,n,Macro(dialout-trunk,2,${EXTEN},)
exten => _.,n,Macro(outisbusy,)

; end of [outrt-002-GPHONE]


The dialplan has nothing matching this entry.

The dialplan has nothing matching this entry.

Forgive my newbness, but I don’t understand what that means, or how to change it? Any advice?


“Received an unknown call with DID set to 16465551234”) in new stack

The dialplan has nothing matching this entry."

Inbound routes in FreePBX, DID field has to match

Here is what i’m doing, let me know what i’m doing wrong, I create an extension, and in Add Inbound DID i put the DID that should be associated with this extension.

Ext 1000 is associated with 5555550001
Ext 1001 is associated with 5555550002

I save and reload, in inbound routes I see both numbers “directing” to the appropriate extensions, but regardless of this ext 1000 receives all calls. Is there another step that i’m missing altogether? It seems that regardless of what I change in the inbound routes this always happens…

Also to clarify I have 3 DIDs that are part of my trunk, 5555550001 - 0003, unless i’m wrong, I think the problem is with the line ID, where no matter what number I dial, asterisk sees 0001 as the number dialed.

Sir - look at your log, there is a 1 in front of the number.

I don’t mean to aggravate you in any way, but how do i fix the 1 in front of the number? Also I don’t understand why that would cause the inbound calls to be directed to the wrong extension. In my mind it is more important for the inbound call to be directed to the correct ext then for the caller id to show the right number.

“Sir - look at your log, there is a 1 in front of the number”

In “Add Inbound DID” use the 11 digit DID, including the “1”

Instead of:
Ext 1000 is associated with 5555550001
Ext 1001 is associated with 5555550002

Try:
Ext 1000 is associated with 15555550001
Ext 1001 is associated with 15555550002

It’s not the caller ID it’s the DID info, if it does not match the inbound route you will get unexpected results.