Juha Heinanen wrote:
andres,
i made another simpler cancel test. first sip:jh@test.fi invites sip:gs@test.fi, and gs starts ringing. then jh sends cancel to r-uri sip:gs@test.fi, which ser.cfg immediately at the start of the script t_relay()s out, i.e., without doing anything to the request. the result is that ser correctly sends a cancel to the ip address/port of gs.
my conclusion of this is that cancels don't need to be processed by ser.cfg, just relayed out. perhaps others familiar with tm mystics can confirm or deny this.
That may be true for users that are local to the SER, but I just made a simple test on my lab server (with CVS HEAD), and it does not work for PSTN redirections.
A simple routing scenario like the one below will send the INVITE to route(7), but the CANCEL will never get there. The only way the CANCEL gets there is to place another if statement with reference to method=="CANCEL" and route it.
if (method=="INVITE") { if ((uri=~"sip:01305[0-9]{7}@.*")){ if (!is_user_in("credentials","ld")) { route(7); break; }; }; }; . . route[7] { rewritehostport("XXXX.telesip.net:5066"); if (!t_relay()) { sl_reply_error(); };
This is frustrating:(
Andres.