Hi,
I'd like some clarification on script routing. To quote the SER Admin guide. . .
" It is important to realize that ser operates over current URI all the time. If an original URI is rewritten by a new one, the original will will be forgotten and the new one will be used in any further processing. In particular, the uri matching operand and the user location action lookup always take current URI as input, regardless what the original URI was. "
Question 1 - Current URI = sip:user@domain.com. What is the "current URI" after these two lines are processed in the script? What is the other uri in the destination set?
rewritehostport("10.10.10.40:5095"); append_branch();
Question 2 - Current URI = sip:user@domain.com. What is the "current URI" after the same two lines are processed in the script but in the opposite order? What is the other uri in the destination set?
append_branch(); rewritehostport("10.10.10.40:5095");
Question 3 - Current URI = sip:user@domain.com. What is the "current URI" after these three lines are processed in the script? Assume that user@domain.com has two locations. sip:user@10.10.10.20 - priority = 0.0 sip:<user_cell_phone>@<gateway_ip> - priority = 1.0
rewritehostport("10.10.10.40:5095"); append_branch(); lookup("location");
What are the other uri's in the destination set in this case?
I'm confused and I've tried to determine the behavior by testing with different script configurations.
The reason I'm asking is that I want my users to be able to put their cell phone numbers in with the form of sip:<cell_number>@mydomain.com Currently this does not work. To achieve proper cell phone forwarding the contact location must be: sip:<cell_number>@gateway_ip_address
In previous script configurations the sip:cell_number@mydomain.com format worked.
When I added these lines: rewritehostport("10.10.10.40:5095"); append_branch();
to my script before calling lookup("location"); Then SER started forwarding sip:cell_number@mydomain.com to my DNS server. :) Not what I wanted, obviously. My DNS server does have SRV records for SIP, but I'm not sure if I need to add a line in ser.cfg to make ser use SRV records.
Any advice or enlightenment is appreciated. Thanks,
G.
__________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com