Accepting call from number to 's' Error

Hi Friends,

I have an ISO install of
Asterisk 13.9.1
freepbx-13.0.127

I have installed a Sangoma PRI CARD with 1 port to PRI Line and another port connects to a Legacy PBX.

I can successfully make inbound calls from PSTN to PBX but
when a call is placed from PBX to the PSTN

Following appears in asterisk and the number or numeric digits do not appear.

-- Accepting call from '4466446644' to 's' on channel 0/31, span 3
    -- Executing [[email protected]:1] ExecIf("DAHDI/i3/4466446644-38", "1?Set(__FROM_DID=s)") in new stack
    -- Executing [[email protected]:2] Gosub("DAHDI/i3/4466446644-38", "sub-record-check,s,1(in,s,dontcare)") in new stack
    -- Executing [[email protected]:1] GotoIf("DAHDI/i3/4466446644-38", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("DAHDI/i3/4466446644-38", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("DAHDI/i3/4466446644-38", "NOW=1490088767") in new stack
    -- Executing [[email protected]:4] Set("DAHDI/i3/4466446644-38", "__DAY=21") in new stack
    -- Executing [[email protected]:5] Set("DAHDI/i3/4466446644-38", "__MONTH=03") in new stack
    -- Executing [[email protected]:6] Set("DAHDI/i3/4466446644-38", "__YEAR=2017") in new stack
    -- Executing [[email protected]:7] Set("DAHDI/i3/4466446644-38", "__TIMESTR=20170321-150247") in new stack
    -- Executing [[email protected]:8] Set("DAHDI/i3/4466446644-38", "__FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:9] Set("DAHDI/i3/4466446644-38", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("DAHDI/i3/4466446644-38", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("DAHDI/i3/4466446644-38", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("DAHDI/i3/4466446644-38", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("DAHDI/i3/4466446644-38", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("DAHDI/i3/4466446644-38", "2?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("DAHDI/i3/4466446644-38", "1?sub-record-check,in,1") in new stack
    -- Goto (sub-record-check,in,1)
    -- Executing [[email protected]:1] NoOp("DAHDI/i3/4466446644-38", "Inbound Recording Check to s") in new stack
    -- Executing [[email protected]:2] Set("DAHDI/i3/4466446644-38", "FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:3] ExecIf("DAHDI/i3/4466446644-38", "10?Set(FROMEXTEN=4466446644)") in new stack
    -- Executing [[email protected]:4] Gosub("DAHDI/i3/4466446644-38", "recordcheck,1(dontcare,in,s)") in new stack
    -- Executing [[email protected]:1] NoOp("DAHDI/i3/4466446644-38", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("DAHDI/i3/4466446644-38", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("DAHDI/i3/4466446644-38", "") in new stack
    -- Executing [[email protected]:5] Return("DAHDI/i3/4466446644-38", "") in new stack
    -- Executing [[email protected]:3] Gosub("DAHDI/i3/4466446644-38", "app-blacklist-check,s,1()") in new stack
    -- Executing [[email protected]:1] GotoIf("DAHDI/i3/4466446644-38", "0?blacklisted") in new stack
    -- Executing [[email protected]:2] Set("DAHDI/i3/4466446644-38", "CALLED_BLACKLIST=1") in new stack
    -- Executing [[email protected]:3] Return("DAHDI/i3/4466446644-38", "") in new stack
    -- Executing [[email protected]:4] Set("DAHDI/i3/4466446644-38", "CDR(did)=s") in new stack
    -- Executing [[email protected]:5] ExecIf("DAHDI/i3/4466446644-38", "1 ?Set(CALLERID(name)=4466446644)") in new stack
    -- Executing [[email protected]:6] Set("DAHDI/i3/4466446644-38", "__MOHCLASS=") in new stack
    -- Executing [[email protected]:7] Set("DAHDI/i3/4466446644-38", "__REVERSAL_REJECT=FALSE") in new stack
    -- Executing [[email protected]:8] GotoIf("DAHDI/i3/4466446644-38", "1?post-reverse-charge") in new stack
    -- Goto (from-digital,s,10)
    -- Executing [[email protected]:10] NoOp("DAHDI/i3/4466446644-38", "") in new stack
    -- Executing [[email protected]:11] Set("DAHDI/i3/4466446644-38", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
    -- Executing [[email protected]:12] Set("DAHDI/i3/4466446644-38", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
    -- Executing [[email protected]:13] Set("DAHDI/i3/4466446644-38", "CALLERID(name-pres)=allowed_not_screened") in new stack
    -- Executing [[email protected]:14] Set("DAHDI/i3/4466446644-38", "CALLERID(num-pres)=allowed_not_screened") in new stack
    -- Executing [[email protected]:15] NoOp("DAHDI/i3/4466446644-38", "CallerID Entry Point") in new stack
    -- Executing [[email protected]:16] Goto("DAHDI/i3/4466446644-38", "ext-trunk,1,1") in new stack
    -- Goto (ext-trunk,1,1)
    -- Executing [[email protected]:1] Set("DAHDI/i3/4466446644-38", "TDIAL_STRING=DAHDI/r0") in new stack
    -- Executing [[email protected]:2] Set("DAHDI/i3/4466446644-38", "DIAL_TRUNK=1") in new stack
    -- Executing [[email protected]:3] Goto("DAHDI/i3/4466446644-38", "ext-trunk,tdial,1") in new stack
    -- Goto (ext-trunk,tdial,1)
    -- Executing [[email protected]:1] Set("DAHDI/i3/4466446644-38", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [[email protected]:2] GotoIf("DAHDI/i3/4466446644-38", "1?nomax") in new stack
    -- Goto (ext-trunk,tdial,4)
    -- Executing [[email protected]:4] ExecIf("DAHDI/i3/4466446644-38", "1?Set(CALLERPRES(name-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:5] ExecIf("DAHDI/i3/4466446644-38", "1?Set(CALLERPRES(num-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:6] Set("DAHDI/i3/4466446644-38", "DIAL_NUMBER=s") in new stack
    -- Executing [[email protected]:7] GosubIf("DAHDI/i3/4466446644-38", "1?sub-flp-1,s,1()") in new stack
    -- Executing [[email protected]:1] ExecIf("DAHDI/i3/4466446644-38", "0?Return()") in new stack
    -- Executing [[email protected]:2] Return("DAHDI/i3/4466446644-38", "") in new stack
    -- Executing [[email protected]:8] Set("DAHDI/i3/4466446644-38", "OUTNUM=s") in new stack
    -- Executing [[email protected]:9] Set("DAHDI/i3/4466446644-38", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [[email protected]:10] Dial("DAHDI/i3/4466446644-38", "DAHDI/r0/s,300,T") in new stack
    -- Requested transfer capability: 0x00 - SPEECH
[2017-03-21 15:02:47] WARNING[11972][C-00000037]: sig_pri.c:8112 sig_pri_call: Unrecognized pridialplan NPI modifier: s
    -- Called DAHDI/r0/s
    -- Span 1: Channel 0/1 got hangup request, cause 28
    -- Hungup 'DAHDI/i1/-b'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [[email protected]:11] Set("DAHDI/i3/4466446644-38", "CALLERID(number)=4466446644") in new stack
    -- Executing [[email protected]:12] Set("DAHDI/i3/4466446644-38", "CALLERID(name)=4466446644") in new stack
    -- Executing [[email protected]:13] Hangup("DAHDI/i3/4466446644-38", "") in new stack
  == Spawn extension (ext-trunk, tdial, 13) exited non-zero on 'DAHDI/i3/4466446644-38'
    -- Hungup 'DAHDI/i3/4466446644-38'

Am I missing something bcos I have used the same rule matching for inbound rules to and from the Dahd trunk?

Apart from that Dahdi net and cpe settings are also in order and everything else that I can think of.

check r0/s.

I’ve changed it to g, G,R as well but still same issue.

if you see, the first line itself is receiving dialed number as ‘s’

What is your outbound context on the extension?

basically there are two pri ports and freepbx is supposed to snoop for CDR & recording.
so both DAHDI Trunks have the same context, from-digital
Only Routes are routed based on pattern match DID when inbound and CID when outbound.

It seems that no called number is being presented over the pri only the calling number that is why it is hitting the s

A debug of the pri signalling will give more information

Thanks for support.
The legacy PBX was not getting tone, it was configured with a hotline setting that initially gives an intercom tone through itself and then switches to outbound trunk.
Now the numbers reach Asterisk properly.