[Users] strip

Sam Hsu joepasscheng at gmail.com
Tue Nov 28 05:14:30 CET 2006


i use the strip() function to strip the prefix when call out
for example, prefix 0 to call out
there are my sip invite message
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INVITE sip:0928117466 at 202.111.222.76:5060 SIP/2.0
Record-Route: <sip:211.111.222.102;r2=on;lr=on;ftag=694064c4>
Record-Route: <sip:211.111.222.102;transport=tcp;r2=on;lr=on;ftag=694064c4>
Content-Length: 324
Content-Type: application/sdp
Via: SIP/2.0/UDP 211.23.176.102;branch=z9hG4bK4eec.ecf680e4.0;i=1
Via: SIP/2.0/TCP 192.168.123.5:5060;received=220.132.138.7
;branch=z9hG4bK69486617
To: <sip:00928117466 at 211.111.222.102>
From: "joepass" <sip:joepass at 211.111.222.102>;tag=694064c4
Supported: timer
Call-ID: 95746504-39004973-1533c430-d8319d29 at 192.168.123.5
CSeq: 26589 INVITE
User-Agent: IP SIP Phone/2.1.3
Max-Forwards: 69
Session-Expires: 1800
Allow: UPDATE,INFO,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL
Authorization: Digest nonce="456ba868fbd62c72ca16fcdd04678168a8fa0683",
username="joepass", realm="votel-tech.com", uri="
sip:00928117466 at 211.111.222.102",
response="73a8c869c2a42a12f0d920c2a7d6f068"
P-IPRAuth: votel-tech.com
Contact: <sip:joepass at 220.111.222.7:1070>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
in the example, the real number is 0928117466
add prefix 0, so the final number is 00928117466
I see the INVITE part the id has strip the prefix 0
but
To: <sip:00928117466 at 211.111.222.102>
and the Authorization part(uri) still keep on 00928117466

My gateway seems to use this information to call out.
So it cause some error respond.
If i call to the gateway directly(not through openser with number
0928117466), it works.
How can i strip the "To" and "Authorization" part uri.
thanks...

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20061128/570c1f35/attachment.htm 


More information about the Users mailing list