We have installed and configured our system with a single catch-all route.
- The route configures both DID Number and CallerID Number as “_.”
- Call Recording is set to “Record on Answer”.
- All other settings look to be defaults.
Where span_1 = “PSTN Trunk” and span_2 = “PBX Trunk”, chan_dahdi_groups.conf:
; [span_1]
signalling=pri_cpe
switchtype=euroisdn
pridialplan=national
prilocaldialplan=national
group=0
context=from-pstn
channel=1-15,17-31
; [span_2]
signalling=pri_net
switchtype=euroisdn
pridialplan=national
prilocaldialplan=national
group=1
context=from-internal
channel=32-46,48-62
While the CDR information for out-bound calls shows both the src and dst values as expected, in-bound route places tdial in the dst column and the number being called in the did column.
“calldate”,“clid”,“src”,“dst”,“dcontext”,“channel”,“dstchannel”,“lastapp”,“lastdata”,“duration”,“billsec”,“disposition”,“amaflags”,“accountcode”,“uniqueid”,“linkedid”,“sequence”
“2013-08-02 17:38:33”,“2000”,“2000”,“2001”,“from-internal”,“DAHDI/i2/2000-6b”,“DAHDI/i1/2001-71”,“Dial”,“DAHDI/G0/2001,300,Tt”,“3”,“0”,“NO ANSWER”,“3”,“1375461513.341”,“1375461513.341”,“379"
“2013-08-02 17:52:46”,”"“2001"” <2001>",“2001”,“tdial”,“ext-trunk”,“DAHDI/i1/2001-72”,“DAHDI/i2/2000-6c”,“Dial”,“DAHDI/g1/2000,300,Tt”,“23”,“20”,“ANSWERED”,“3”,“1375462366.343”,“1375462366.343”,“381”
Please could someone confirm if this is expected behaviour, mis-configuration or a bug? For example maybe we have the wrong default contexts? Many thanks.
Asterisk Log output for the in-bound call:
– Accepting call from ‘2001’ to ‘2000’ on channel 0/1, span 1
[2013-08-02 17:52:46] WARNING[26054]: res_odbc.c:1402 _ast_odbc_request_obj2: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
– Executing [2000@from-pstn:1] Set(“DAHDI/i1/2001-72”, “__FROM_DID=2000”) in new stack
– Executing [2000@from-pstn:2] Set(“DAHDI/i1/2001-72”, “__REC_POLICY_MODE=always”) in new stack
– Executing [2000@from-pstn:3] Set(“DAHDI/i1/2001-72”, “CDR(did)=2000”) in new stack
[2013-08-02 17:52:46] WARNING[26054]: res_odbc.c:645 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.69-log]MySQL server has gone away (69)
[2013-08-02 17:52:46] WARNING[26054]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asteriskcdrdb [MySQL-asteriskcdrdb]…
[2013-08-02 17:52:46] WARNING[26054]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect…
– Executing [2000@from-pstn:4] ExecIf(“DAHDI/i1/2001-72”, “0 ?Set(CALLERID(name)=2001)”) in new stack
[2013-08-02 17:52:46] NOTICE[26054]: res_odbc.c:1527 odbc_obj_connect: Connecting asteriskcdrdb
– Executing [2000@from-pstn:5] Ringing(“DAHDI/i1/2001-72”, “”) in new stack
– Executing [2000@from-pstn:6] Set(“DAHDI/i1/2001-72”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [2000@from-pstn:7] Set(“DAHDI/i1/2001-72”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [2000@from-pstn:8] Goto(“DAHDI/i1/2001-72”, “ext-trunk,1,1”) in new stack
– Goto (ext-trunk,1,1)
– Executing [1@ext-trunk:1] Set(“DAHDI/i1/2001-72”, “TDIAL_STRING=DAHDI/g1”) in new stack
– Executing [1@ext-trunk:2] Set(“DAHDI/i1/2001-72”, “DIAL_TRUNK=1”) in new stack
– Executing [1@ext-trunk:3] Goto(“DAHDI/i1/2001-72”, “ext-trunk,tdial,1”) in new stack
– Goto (ext-trunk,tdial,1)
– Executing [tdial@ext-trunk:1] Set(“DAHDI/i1/2001-72”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [tdial@ext-trunk:2] GotoIf(“DAHDI/i1/2001-72”, “1?nomax”) in new stack
– Goto (ext-trunk,tdial,4)
– Executing [tdial@ext-trunk:4] ExecIf(“DAHDI/i1/2001-72”, “1?Set(CALLERPRES()=allowed_not_screened)”) in new stack
– Executing [tdial@ext-trunk:5] Set(“DAHDI/i1/2001-72”, “DIAL_NUMBER=2000”) in new stack
– Executing [tdial@ext-trunk:6] GosubIf(“DAHDI/i1/2001-72”, “0?sub-flp-1,s,1()”) in new stack
– Executing [tdial@ext-trunk:7] Set(“DAHDI/i1/2001-72”, “OUTNUM=2000”) in new stack
– Executing [tdial@ext-trunk:8] Set(“DAHDI/i1/2001-72”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
– Executing [tdial@ext-trunk:9] Dial(“DAHDI/i1/2001-72”, “DAHDI/g1/2000,300,Tt”) in new stack
[2013-08-02 17:52:46] NOTICE[26054]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asteriskcdrdb [MySQL-asteriskcdrdb]
– Requested transfer capability: 0x00 - SPEECH
– Called DAHDI/g1/2000
– DAHDI/i2/2000-6c is proceeding passing it to DAHDI/i1/2001-72
– DAHDI/i2/2000-6c is ringing
– DAHDI/i2/2000-6c is making progress passing it to DAHDI/i1/2001-72
– DAHDI/i2/2000-6c answered DAHDI/i1/2001-72
– Span 1: Channel 0/1 got hangup request, cause 16
– Hungup ‘DAHDI/i2/2000-6c’
== Spawn extension (ext-trunk, tdial, 9) exited non-zero on ‘DAHDI/i1/2001-72’
– Hungup ‘DAHDI/i1/2001-72’
Thanks again,
Alex