Bogdan<br><br>I understand.<br>Before i get another gateway, i keep on this way.<br>thanks a lot<br><br>Sam<br><br><div><span class="gmail_quote">On 11/29/06, <b class="gmail_sendername">Bogdan-Andrei Iancu</b> <<a href="mailto:bogdan@voice-system.ro">
bogdan@voice-system.ro</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sam,<br><br>it might work, but it is not correctly from SIP point of view as you
<br>change the TO header across the dialog.<br><br>regards,<br>bogdan<br><br>Sam Hsu wrote:<br><br>> I use subst to solve this<br>><br>>subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/To:\1$ruri\2/ig')<br>><br>> It works with my OLD gateway
<br>><br>> Sam<br>><br>> On 11/28/06, * Bogdan-Andrei Iancu* <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a><br>> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro
</a>>> wrote:<br>><br>> Hi Sam,<br>><br>> According to SIP RFC the TO header is not used at all for routing<br>> - most<br>> probably you have an old gateway which is not SIP compliant anymore.
<br>> There is no mechanism in openser to change the TO header. The strip()<br>> function affects only the RURI.<br>><br>> the authentication name *must* not be changed as the auth will<br>> failed -
<br>> the auth response is computed based on the auth name known by the UAC.<br>><br>> regards,<br>> bogdan<br>><br>> Sam Hsu wrote:<br>><br>> > i use the strip() function to strip the prefix when call out
<br>> > for example, prefix 0 to call out<br>> > there are my sip invite message<br>> ><br>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
><br>> ><br>> > INVITE sip:0928117466@202.111.222.76:5060 SIP/2.0<br>> > Record-Route: <sip:<a href="http://211.111.222.102">211.111.222.102</a> <<a href="http://211.111.222.102">http://211.111.222.102
</a>><br>> > <<a href="http://211.111.222.102">http://211.111.222.102</a> >;r2=on;lr=on;ftag=694064c4><br>> > Record-Route: <sip:<a href="http://211.111.222.102">211.111.222.102</a> <
<a href="http://211.111.222.102">http://211.111.222.102</a>><br>> > <<a href="http://211.111.222.102">http://211.111.222.102</a>>;transport=tcp;r2=on;lr=on;ftag=694064c4><br>> > Content-Length: 324
<br>> > Content-Type: application/sdp<br>> > Via: SIP/2.0/UDP <a href="http://211.23.176.102">211.23.176.102</a> <<a href="http://211.23.176.102">http://211.23.176.102</a>><br>> > <<a href="http://211.23.176.102">
http://211.23.176.102</a>>;branch= z9hG4bK4eec.ecf680e4.0;i=1<br>> > Via: SIP/2.0/TCP <a href="http://192.168.123.5:5060">192.168.123.5:5060</a> <<a href="http://192.168.123.5:5060">http://192.168.123.5:5060
</a>><br>> > <<a href="http://192.168.123.5:5060">http://192.168.123.5:5060</a>>;received= <a href="http://220.132.138.7">220.132.138.7</a><br>> <<a href="http://220.132.138.7">http://220.132.138.7
</a>><br>> > <<a href="http://220.132.138.7">http://220.132.138.7</a>>;branch=z9hG4bK69486617<br>> > To: <<a href="mailto:sip:00928117466@211.111.222.102">sip:00928117466@211.111.222.102</a>
<br>> <mailto:<a href="mailto:sip">sip</a>:<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a>><br>> > <mailto: sip <mailto:<a href="mailto:sip">sip</a>>:<a href="mailto:00928117466@211.111.222.102">
00928117466@211.111.222.102</a><br>> <mailto:<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a>>>><br>> > From: "joepass" <<a href="mailto:sip:joepass@211.111.222.102">
sip:joepass@211.111.222.102</a><br>> <mailto:<a href="mailto:sip">sip</a>:<a href="mailto:joepass@211.111.222.102">joepass@211.111.222.102</a>><br>> > <mailto:<a href="mailto:sip">sip</a> <mailto:
<a href="mailto:sip">sip</a>>:<a href="mailto:joepass@211.111.222.102">joepass@211.111.222.102</a><br>> <mailto:<a href="mailto:joepass@211.111.222.102">joepass@211.111.222.102</a>>>>;tag=694064c4<br>
> > Supported: timer<br>> > Call-ID: <a href="mailto:95746504-39004973-1533c430-d8319d29@192.168.123.5">95746504-39004973-1533c430-d8319d29@192.168.123.5</a><br>> <mailto:<a href="mailto:95746504-39004973-1533c430-d8319d29@192.168.123.5">
95746504-39004973-1533c430-d8319d29@192.168.123.5</a>><br>> > <mailto:<a href="mailto:95746504-39004973-1533c430-d8319d29@192.168.123.5">95746504-39004973-1533c430-d8319d29@192.168.123.5</a><br>> <mailto:
<a href="mailto:95746504-39004973-1533c430-d8319d29@192.168.123.5">95746504-39004973-1533c430-d8319d29@192.168.123.5</a>>><br>> > CSeq: 26589 INVITE<br>> > User-Agent: IP SIP Phone/2.1.3<br>> > Max-Forwards: 69
<br>> > Session-Expires: 1800<br>> > Allow:<br>> UPDATE,INFO,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL<br>> > Authorization: Digest<br>> > nonce="456ba868fbd62c72ca16fcdd04678168a8fa0683",
<br>> username="joepass",<br>> > realm="<a href="http://votel-tech.com">votel-tech.com</a> <<a href="http://votel-tech.com">http://votel-tech.com</a>><br>> <<a href="http://votel-tech.com">
http://votel-tech.com</a>>", uri="<br>> > <a href="mailto:sip:00928117466@211.111.222.102">sip:00928117466@211.111.222.102</a><br>> <mailto:<a href="mailto:sip">sip</a>:<a href="mailto:00928117466@211.111.222.102">
00928117466@211.111.222.102</a>><br>> > <mailto:<a href="mailto:sip">sip</a> <mailto:<a href="mailto:sip">sip</a>>:<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a><br>> <mailto:
<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a>>>",<br>> > response="73a8c869c2a42a12f0d920c2a7d6f068"<br>> > P-IPRAuth: <a href="http://votel-tech.com">
votel-tech.com</a> <<a href="http://votel-tech.com">http://votel-tech.com</a>><br>> <<a href="http://votel-tech.com">http://votel-tech.com</a>><br>> > Contact: <sip:joepass@220.111.222.7:1070>
<br>> ><br>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>><br>> ><br>> > in the example, the real number is 0928117466<br>> > add prefix 0, so the final number is 00928117466
<br>> > I see the INVITE part the id has strip the prefix 0<br>> > but<br>> > To: < <a href="mailto:sip:00928117466@211.111.222.102">sip:00928117466@211.111.222.102</a><br>> <mailto:
<a href="mailto:sip">sip</a>:<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a>><br>> > <mailto:<a href="mailto:sip">sip</a> <mailto:<a href="mailto:sip">sip</a>>:<a href="mailto:00928117466@211.111.222.102">
00928117466@211.111.222.102</a><br>> <mailto:<a href="mailto:00928117466@211.111.222.102">00928117466@211.111.222.102</a>>>><br>> > and the Authorization part(uri) still keep on 00928117466<br>
> ><br>> > My gateway seems to use this information to call out.<br>> > So it cause some error respond.<br>> > If i call to the gateway directly(not through openser with number<br>> > 0928117466), it works.
<br>> > How can i strip the "To" and "Authorization" part uri.<br>> > thanks...<br>> ><br>> > Sam<br>> ><br>> >------------------------------------------------------------------------
<br>> ><br>> >_______________________________________________<br>> >Users mailing list<br>> > <a href="mailto:Users@openser.org">Users@openser.org</a> <mailto:<a href="mailto:Users@openser.org">
Users@openser.org</a>><br>> ><a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br>> ><br>> ><br>><br>><br><br></blockquote>
</div><br>