Callcentric + PJSIP

I’ve switched all my trunks to PJSIP and it was relatively easy except for Callcentric. I have a single Callcentric username/password account (1777xxxxxxx) which has two DID’s associated with it.

Outgoing calls work fine.

If I specify a PJSIP ‘Contact User’ in the Trunk Configuration, all incoming calls enter the dialplan with an EXTEN of that ‘Contact User’.

If I don’t specify a PJSIP ‘Contact User’ in the Trunk configuration, all incoming calls enter the dialplan with an EXTEN of ‘s’.

I can’t figure out how to get incoming calls to enter the dialplan with the appropriate EXTEN (177xxxxxxx, DID-number-1, or DID-number-2) so they can be routed accordingly by Inbound Routes based on the DID it came in on.

The appropriate DID-number is shown in a SIP trace (t: sip:[email protected]):

<--- Received SIP request (792 bytes) from UDP:204.11.192.135:5080 --->

INVITE sip:[email protected]:5060;line=enebtvv SIP/2.0
v: SIP/2.0/UDP 204.11.192.135:5080;branch=z9hG4bK-10e6e8e783553518056a12d5e0a70067;change=ta
f: “My Name” sip:[email protected];tag=3750005754-482410
t: sip:[email protected]
i: [email protected]
CSeq: 1 INVITE
Max-Forwards: 13
m: sip:[email protected]:5080;transport=udp
c: application/sdp
l: 342

v=0
o=NexTone-MSW 842419 840647 IN IP4 204.11.192.135
s=sip call
c=IN IP4 204.11.192.135
t=0 0
m=audio 59310 RTP/AVP 0 8 18 101
a=ptime:20
a=sendrecv
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=fmtp:18 annexb=no
a=rtpmap:18 G729/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=setup:actpass

== Setting global variable ‘SIPDOMAIN’ to ‘71.67.123.45’
<— Transmitting SIP response (395 bytes) to UDP:204.11.192.135:5080 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 204.11.192.135:5080;rport=5080;received=204.11.192.135;branch=z9hG4bK-10e6e8e783553518056a12d5e0a70067;change=ta
Call-ID: [email protected]
From: “My Name” sip:[email protected];tag=3750005754-482410
To: sip:[email protected]
CSeq: 1 INVITE
Server: FPBX-14.0.4.5(16.99.99)
Content-Length: 0

-- Executing [[email protected]:1] Set("PJSIP/callcentric-0000002a", "__DIRECTION=INBOUND") in new stack
-- Executing [[email protected]:2] Set("PJSIP/callcentric-0000002a", "CHANNEL(tonezone)=us") in new stack
-- Executing [[email protected]:3] ExecIf("PJSIP/callcentric-0000002a", "1?Set(__FROM_DID=s)") in new stack

How do I get FreePBX/Asterisk to use that DID-number as the EXTEN when it enters the dialplan?

The solution is to use: from-pstn-toheader

I had tried it earlier but it failed because it doesn’t support an EXTEN of ‘s’. Setting ‘Contact User’ to 1777xxxxxxx AND using a context of from-pstn-toheader gets things in order.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.