by lneblett » Tue Jan 31, 2012 2:33 pm
I am a lttle confused - Are you indicating that you want to be able to use either the PSTN and/or SIP trunks to be able to call the same locations and that depending on which Trunk was actually used to deliver the call you would like to have that trunk (provider's) billing rate applied?
Or is that the default rate is perhaps all too encompassing as any call that doesn't fit the country code is automatically assessed the default? Your example makes reference of an extension to extension call which, in my testing, does not show as a billable call in the hotel module, even with the default rate set to one. Of course, in my testing all extensions are of the same length and while your example uses Room 101 to x5259, I assume Room 101 is actually also a 4 digit extension.
While I am curious about the intent, as I am about to do a hotel and perhaps you have latched onto something that I have not considered, there is only the one rate table that i know of. It appears to me that you can use the SMDR output to discern which outbound trunk (SIP or PSTN) was used to make the call. How would you not create outbound rules to differentiate and direct calls to the two physically different mechanisms (SIP & PSTN)? You might be able to use a 3rd party call accounting software package that can take the SMDR output and manipulate it to provide the data you need. The SMDR output indicates the trunk used and then perhaps yo can build the billing tables accordingly. Then, I assume (again) that you might be able to take the now desired results and feed them back into the Hotel property management system for subsequent guest check-out/billing. In any event, I am not sure I understand the reference to the default rate as you applied it in your query. If the issue is that you wish not to charge a call to the 4 digit extension (which is not a country code), then set the default rate to 0 in the biling table. I am assuming that the extension is not making use of either PSTN or the SIP trunks. If on the other hand, you are directing calls to a specific outbound trunk based upon how a caller dials the number, then I understand. I assume it possible that in some cases one provider could have a better rate than another or maybe provides service to a location that the other doesn't, but regardless, wouldn't you typically modify the billing table to reflect the rate associated to the provider you have selected to serve that country? Do you need to granularize down to a city code? It also looks like you can add to the table as long as the digits emulate a country code usage.