I'm seeing this *very* weird error where uac_restore_from is ending up with a corrupted 'From' header.
The weird thing is that it happens with only one end point (a Televantage SIP Trunk).
With virtually *everything* else - and I am talking about tens of thousands of end points, spanning all sorts of sip devices, we are having *no* problems.
The call is set up as follows -> the endpoint sends the INVITE, which is forwarded to a PSTN gateway
The ACKs and the 200 OK all have their From/To headers appropriately rewritten
The problem arises when the PSTN gateway initiates the BYE   As you can see below, the 'To' header gets corrupted

The *only* thing I can think of is that it has something to do with the structure of the Televantage tags (the '+' signs?).

Any ideas?

FYI, Openser 1.1.0 (latest CVS checkout), and
modparam("uac","from_restore_mode","auto")
modparam("uac","rr_store_param","aptelavsf")

---INVITE--- endpoint->proxy
From: "Member service"<sip:user100.crunchhq@69.25.47.136>;tag=10.10.35.100+1+8d200003+32cc4d0e.
To: <sip:17038677006@69.25.47.136>;tag=277e3aa2408f2ad73a234f5bbb99133b.c13b.
---INVITE--- proxy->gateway
From: "Membersevice Queue"<sip:6462174165@flareon.aptela.com>;tag=10.10.35.100+1+8c020003+dd5437f3.
To: <sip:17038677006@69.25.47.136>
Record-Route: <sip:69.25.47.136;lr;ftag=10.10.35.100+1+8c020003+dd5437f3;nat=yes;aptelavsf=dGVzdDciIDR0YndrISJGfHtsaWBbPWQ7NiQ4LCJlISgv>

--- 183 Session Progress--- gateway->proxy
From: "Membersevice Queue"<sip:6462174165@flareon.aptela.com>;tag=10.10.35.100+1+8c020003+dd5437f3.
To: <sip:17038677006@69.25.47.136>;tag=1386496.
Record-Route: <sip:69.25.47.136;lr;ftag=10.10.35.100+1+8c020003+dd5437f3;nat=yes;aptelavsf=dGVzdDciIDR0YndrISJGfHtsaWBbPWQ7NiQ4LCJlISgv>

---183 Session Progress--- proxy->endpoint
From: "Member service"<sip:user100.crunchhq@69.25.47.136>;tag=10.10.35.100+1+8c020003+dd5437f3.
To: <sip:17038677006@69.25.47.136>;tag=1386496

---200 OK--- gateway->proxy
From: "Membersevice Queue"<sip:6462174165@flareon.aptela.com>;tag=10.10.35.100+1+8c020003+dd5437f3.
To: <sip:17038677006@69.25.47.136>;tag=1386496
Record-Route: <sip:69.25.47.136;lr;ftag=10.10.35.100+1+8c020003+dd5437f3;nat=yes;aptelavsf=dGVzdDciIDR0YndrISJGfHtsaWBbPWQ7NiQ4LCJlISgv>

---200 OK--- proxy->endpoint
From: "Member service"<sip:user100.crunchhq@69.25.47.136>;tag=10.10.35.100+1+8c020003+dd5437f3.
To: <sip:17038677006@69.25.47.136>;tag=1386496
Record-Route: <sip:69.25.47.136;lr;ftag=10.10.35.100+1+8c020003+dd5437f3;nat=yes;aptelavsf=dGVzdDciIDR0YndrISJGfHtsaWBbPWQ7NiQ4LCJlISgv>

---BYE--- gateway->proxy
To: "Membersevice Queue"<sip:6462174165@69.25.47.136>;tag=10.10.35.100+1+8c020003+dd5437f3.
From: <sip:17038677006@66.52.236.25>;tag=1386496.
Route: <sip:69.25.47.136;lr;ftag=10.10.35.100+1+8c020003+dd5437f3;nat=yes;aptelavsf=dGVzdDciIDR0YndrISJGfHtsaWBbPWQ7NiQ4LCJlISgv>

---BYE--- proxy->endpoint
To: "Membersevice Queue"<sip:user100.cru>6'(!.l asr}XV.R\[>;tag=10.10.35.100+1+8c020003+dd5437f3.
From: <sip:17038677006@66.52.236.25>;tag=1386496.


--
*******************************************
Mahesh Paolini-Subramanya      (703) 386-1500 x9100
CTO                                         mahesh@aptela.com
Aptela, Inc.                               http://www.aptela.com
"Aptela: How Business Answers The Call"
*******************************************