Hi Bogdan,
* keeps the state of a call. I haven't gone through the details of the code, but it seems to use callid to identify the call. It is an option to use tag for extra checking.
What I probably need is to treat any new SIP INVITE to * as a new call, just like what cisco does. With a good dial plan, this new call will never be sent back to ser. Even if it does, ser will treat this as a loop because I use record route. So loop avoidance is not a big issue.
The problem is how to identify an INVITE retransmission and subsequent 200 OK, ACK, re-INVITE, CANCEL and BYE messages. How to find out if a message is for which call?
Thanks, Richard
So, depends a lot of what * consider a loop (how exactly does this) - because, as you said, all important hdrs are the same. Btw, is at least RURI changing between outgoing and returning call ( on *) ? The worst solution will be insert a very simple B2BUA in the middle to change at least some tags. But is ugly :-(
regards, Bogdan
Richard wrote:
Hi,
I am trying to use * as a PSTN gateway. When a call comes in from PSTN,
it
is forwarded to ser. If for some reason (e.g. call being forwarded back
to
PSTN), ser will just do a record route and send it back to *. When * gets this call, it thinks it is a loop and drop the call. I know that this question has been raised before. I'd like to see, just from sip
respective,
what's the theoretical way to solve it? Since all major fields are the
same,
e.g. fromuri, touri, cseq, callid, what is the right way to detect loop
in
SIP in this case? Btw, cisco router doesn't have this problem.
Thanks, Richard
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers