I’m new to FreePBX and we are using FreePBX 18.104.22.168.
I would like to use a second DID from the inbound trunk out to route to a registered extension and pass the DID in the call information so we can route it on the extension. I’ve spent a few hours looking through documentation and these forums but have not had any luck.
It seems like a pretty standard thing to do and I assumed it could be done by setting the context on the trunk to “from-pstn-toheader” but this has not changed the outbound call details to the extension to send the DID I want. I am now starting to think it could be because we are using the pjsip driver but I’ve posted here for some help.
I’ve changed the numbers and IP addresses for privacy.
The extension is registered as 0261123456 and we have a second inbound route 0261123457 but the DID information is not included in the call to extension despite registering in the CDR reports in DID column.
Does anyone have any advice? Do I need to use a custom extension to get this functionality?
The logs on the receiving device is reporting the following:
Invite-IN Recv Req INVITE from 22.214.171.124:5060 tid=Pj29ce2625-a7f3-4698-8988-1c0dbb5ada3f Call-ID=3765aaed-51c3-4bc6-a1a4-53abff9d3aa2: INVITE sip:firstname.lastname@example.org:5060;rinstance=dd41e0f3640002fb SIP/2.0 Via: SIP/2.0/UDP 126.96.36.199:5060;rport=5060;branch=z9hG4bKPj29ce2625-a7f3-4698-8988-1c0dbb5ada3f Max-Forwards: 70 Contact: <sip:email@example.com:5060> To: <sip:firstname.lastname@example.org;rinstance=dd41e0f3640002fb> From: "0412345678" <sip:email@example.com>;tag=66f658df-916d-4057-811a-bc656e0c2602 Call-ID: 3765aaed-51c3-4bc6-a1a4-53abff9d3aa2 CSeq: 2119 INVITE Session-Expires: 1800 Min-SE: 90 Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER Content-Type: application/sdp Supported: 100rel, timer, replaces, norefersub User-Agent: FPBX-188.8.131.52(13.22.0) P-Asserted-Identity: "0412345678" <sip:firstname.lastname@example.org> Content-Length: 412 v=0 o=- 1437439270 1437439270 IN IP4 184.108.40.206 s=Asterisk c=IN IP4 220.127.116.11 t=0 0 m=audio 15556 RTP/AVP 107 9 18 0 8 3 101 a=rtpmap:107 opus/48000/2 a=fmtp:107 useinbandfec=1 a=rtpmap:9 G722/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=maxptime:20 a=sendrecv