[OpenSIPS-Users] uac_replace_from() problem in INVITE message

sammy sanms at 126.com
Thu Jul 21 11:06:24 CEST 2011


Hi,guys.


When one call from PSTN call to Opensips, I want to change the From part in INVITE message as below:
change
  From: 01088331234 <sip:01088331234 at 192.168.30.44:35060>;tag=1
to
  From: 88888888 <sip:88888888 at 192.168.30.44:35060>;tag=1


use uac_replace_from("88888888","sip:88888888 at 192.168.30.44:35060")
but when i capture the sip message, the old from is still there in the INVITE message and new from part has not “From” before display name like this:


INVITE sip:4001234567 at 192.168.30.47:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.30.44:35060;branch=z9hG4bKd5b6.c54a788.0 From: 01088331234 <sip:01088331234 at 192.168.30.44:35060>;tag=1 -->here, old from not remove by uac_replace_from() 88888888 <sip:88888888 at 192.168.30.44:35060> -->here, new from has not "From: " before 88888888 To: 4001234567<sip:4001234567 at 192.168.30.47:5070> Call-ID: 1-20856 at 192.168.30.40 CSeq: 1 INVITE Contact: sip:01088331234 at 192.168.30.44:35060 Max-Forwards: 68 Expires: 3600


1. How can uac_replace_from function work as I want?
2. How to replace Contact uri name from01088331234 to 88888888?


Regards,
Sammy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110721/0939c4a5/attachment.htm>


More information about the Users mailing list