6 apr 2009 kl. 18.46 skrev Steve Davies: > Thanks for the reply - Perhaps I was not clear. > > On the register=> line, if I set /extension to be /12345, then this > just replaces 's' with 12345, and ALL calls, regardless of their > destination number will be routed on the INVITE line to 12...@x.x.x.x, > and the actual destination is specified in the To: header. > > Not particularly useful, and I'd prefer not to have to go fumbling > through the SIP headers to find what was really dialled :) > > Looking at the SIP RFC, the idea is that you specify a set of "What I > will accept" details with each registration in the Contact: headers, > which is intended to include _multiple_ possible destination > addresses. The Registrar will then only ever send calls addressed to > that list of destinations. Sadly, the RFC authors did not think to > consider private point-to-point links where you can usefully say "send > me anything, you know best". Asterisk "fills" by defaulting to a > single s...@x.x.x.x, where the 's' can be replaced by any single number. >
The REGISTER request in the RFC was really written for a device. The way providers use it for trunks with multiple DIDs is outside of the RFC and is discussed in relation to the SIPconnect specification in the SIP forum. Some providers solve this by not using the Contact: in the register request at all for the calls, instead guessing a URI with the DID in the user name part, something that breaks communication even more as the Contact might include other hints on call routing internally, like line button in a SNOM phone. I would say that the only way right now is to parse the To: header. I started working on some code a while ago that would handle this better, but never completed it. We simply registered a random string and then replaced it with whatever was sent in the To: header (which should be the original destination) before hitting the dialplan. That code still exists in a branch somewhere and in Pineapple. This code would also solve the issue with registering multiple accounts with one provider. /O --- * Olle E. Johansson - o...@edvina.net * Asterisk Training http://edvina.net/training/ _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users