Given the following packet
REFER sip:9546236300@69.25.47.137:5090 SIP/2.0
Via: SIP/2.0/UDP 192.168.28.118;branch=z9hG4bK5eb7146d4B8F8EA4
From: <sip:mahesh.aptela@66.23.129.213>;tag=AB447651-36547B1E
To: "operator.aptela" <sip:9546236300@69.25.47.137:5090>;tag=as6c1b062a
Route: <sip:66.23.129.213;ftag=as6c1b062a;lr=on>
CSeq: 2 REFER
Call-ID: 688b089d4b10573715a49690228f1586(a)69.25.47.137
Contact: <sip:mahesh.aptela@192.168.28.118>
User-Agent: PolycomSoundPointIP-SPIP_500-UA/1.4.1
Refer-To: sip:7100@flareon.aptela.com:5060
Referred-By: <sip:mahesh.aptela@66.23.129.213>
Max-Forwards: 70
Content-Length: 0
avp_printf() sets $rt to "sip:9546236300@69.25.47.137:5090" instead of
"sip:7100@flareon.aptela.com:5060"
trace follows
When you run
avp_write("$hdr[Refer-To]", "$savedRefer");
avp_print();
you get
2(5034) DEBUG: id=<65>
2(5034) DEBUG: val_str=<sip:7100@flareon.aptela.com:5060>
When you run
avp_printf("$savedRefer", "$rt");
avp_print();
you get
2(5034) DEBUG: id=<65>
2(5034) DEBUG: val_str=<sip:9546236300@69.25.47.137:5090>
t