The problem is that the destination (ext) only see incomming calls for 700 = extension number (and not the DID number). So it is not possible to reroute from the destination based on the DID.
The situation we woul’d like is to register ext 700 and not only recieve the call but also the DID called so we can reroute.
Okay, delete your wildcard entry and set up a inbound route for EACH DID. Put the number the provider is sending (probably the 10 digit DID) in the DID field, leave CID blank. Then you can chose the destination for each in the dropdown toward the bottom.
This is not wat we want. All DID must go to the same destination.
Destination must know what did was called so reroute based on DID is possible from that destination.
Try making your context in the trunk setup from-pstn-toheader, it is possible that your SIP Provider is putting the DID in a different part of the SIP header. You may also find you need to add trustrpid=yes and sendrpid=yes to your trunk setup.
If all calls are routing to the same extension how can the PBX reroute them. And to where? VM if not answered, a ring group?
If all calls ring on one extension (line key) and are manually rerouted, do you simply need an indication of which DID was called? In that case create a separate inbound route for each DID and simply enter a Route Prefix (for example the last 4 digits)
Either way, I believe you need a separate route for each DID. Otherwise, a better explanation of what you are trying to accomplish.
My sip provider sends a invite [email protected]_freepbx_ip
Freepbx has in incomming route with destination Extension 700
Freepbx sends to device a invite [email protected]_internal_extension
What we want is to register extension 700 and that freepbx sends a invite [email protected]_internal_extension.
When our provider sends a invite [email protected]_freepbx_ip the freepbx must send [email protected]_internal_extension the the same registered device (ext 700) and not a invite [email protected]_internal_extension
So we can register 1 device to freepbx and revieve more did’s from Freepbx using a single registration.
We tried (under connectivity -> trunks) to add from-pstn-toheader in the USER context and added trustrpid=yes sendrpid=yes under peer details.
No results, i’m not sure that we did that correctly.