On Apr 12, 2008, at 1:59 AM, IƱaki Baz Castillo wrote:
Ok ok, I understand what you mean. But that is just useful for redirection to voicemail and so. For example, imagine you have Asterisk as PSTN gateway. Imagine Asterisk receives a call from PSTN and routes it to OpenSer, and OpenSer destination user has a redirection to a mobile number. Then OpenSer would route the invite back to Asterisk who will detect a loop (an spiral in fact, but Asterisk is buggy here).
What we've been doing for the last 4 years in this is that OpenSER never, ever replies back to Asterisk with the same INVITE message. Asterisk has all the redirection intelligence. When OpenSER detects that a user is offline it replies with some 4xx error message, Asterisk detects that, goes "ooh, user is offline, let's see what i have to do in this case" and does it's thing. Unfortunately we've never had the opportunity to handle the cases where the users UA or OpenSER replies back with a 3xx type message to tell Asterisk where to redirect to. That might have something to do with us being a little strange though.