aratel
(Charles TEMPE)
July 13, 2017, 10:39am
1
Hi, I’ve a Freepbx 13 with Asterisk 13.
I’ve a custom context to add null to incoming call number declared in extensions_custom.conf :
[from-trunk-add-null]
exten => _X.,1,NOOP("Entered [add-null]")
exten => _X.,n,Set(CALLERID(number)=0${CALLERID(number)})
exten => _X.,n,Set(CALLERID(name)=${CALLERID(number)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
include => from-trunk
In my trunk, settings, in incoming section I’ve added the incoming context :
context=from-trunk-add-null
But with an incoming call from this trunk, it doesn’t enter the custom context. It just enters the from-trunk context.
jfinstrom
(James Finstrom)
July 13, 2017, 12:21pm
2
Why not just use the setcid module?
aratel
(Charles TEMPE)
July 13, 2017, 12:52pm
3
Because I’ve a trunk with 80 DID … So I don’t want to use setcid module 80 times…
lgaetz
(Lorne Gaetz)
July 13, 2017, 12:54pm
4
My guess is that inbound calls are not recognized by Asterisk as coming from that trunk, possibly being treated as anonymous? Call traces with sip debug should show this.
aratel
(Charles TEMPE)
July 13, 2017, 1:13pm
5
You are right. How can I change this ?
<------------->
[2017-07-13 15:07:59] VERBOSE[3088] chan_sip.c: Really destroying SIP dialog '[email protected] :5060' Method: OPTIONS
[2017-07-13 15:08:01] VERBOSE[3088] chan_sip.c:
<--- SIP read from UDP:XX.XX.XX.XX:5060 --->
OPTIONS sip:YY.YY.YY.YY SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK1d3df7c6
Max-Forwards: 70
From: "Unknown" <sip:[email protected] >;tag=as28dfc2fc
To: <sip:YY.YY.YY.YY>
Contact: <sip:[email protected] :5060>
Call-ID: [email protected] :5060
CSeq: 102 OPTIONS
User-Agent: FPBX-AsteriskNOW-12.0.25(11.10.2)
Date: Thu, 13 Jul 2017 13:07:57 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------->
[2017-07-13 15:08:01] VERBOSE[3088] chan_sip.c: --- (13 headers 0 lines) ---
[2017-07-13 15:08:01] VERBOSE[3088] chan_sip.c: Sending to XX.XX.XX.XX:5060 (no NAT)
[2017-07-13 15:08:01] VERBOSE[3088] chan_sip.c: Looking for s in from-trunk (domain YY.YY.YY.YY)
[2017-07-13 15:08:01] VERBOSE[3088] chan_sip.c:
<--- Transmitting (no NAT) to XX.XX.XX.XX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK1d3df7c6;received=XX.XX.XX.XX
From: "Unknown" <sip:[email protected] >;tag=as28dfc2fc
To: <sip:YY.YY.YY.YY>;tag=as698b1cd9
Call-ID: [email protected] :5060
CSeq: 102 OPTIONS
Server: FPBX-13.0.192.9(13.15.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:YY.YY.YY.YY:5060>
Accept: application/sdp
Content-Length: 0