Bugs item #1545216, was opened at 2006-08-23 13:16 Message generated for change (Comment added) made by sjmuller You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1545216...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: core Group: ver devel Status: Open Resolution: None Priority: 3 Private: No Submitted By: Bogdan-Andrei Iancu (bogdan_iancu) Assigned to: Nobody/Anonymous (nobody) Summary: Diversion header(s) parsing
Initial Comment: The current implementation of the parse_diversion() header parses only the first diversion header (even if more than one header can be present). Also the function cannot cope with multiple URIs (comma separated) in the body of the same header since internally it is using the parse_to() function that expects only one URI.
----------------------------------------------------------------------
Comment By: Sam J. M. (sjmuller) Date: 2009-06-29 11:45
Message: Yep it's still a problem.
I'm using kamailio v.1.4.4 and it causes some disagreement with many pstn gateways in my architecture.
. Suffixes entered in parameters'module does not apply. . Parsing is not working.
** kamailio logs :
Jun 29 11:33:00 ser0 kamailio[1469]: -CFU------------------------------------- Jun 29 11:33:00 ser0 kamailio[1469]: -> call forwarding unconditional found to 0183659999 Jun 29 11:33:00 ser0 kamailio[1469]: DBG:avpops:ops_delete_avp: 1 avps were removed Jun 29 11:33:00 ser0 kamailio[1469]: DBG:avpops:ops_pushto_avp: 1 avps were processed Jun 29 11:33:00 ser0 kamailio[1469]: -CFU-ACC--------------------------------- Jun 29 11:33:00 ser0 kamailio[1469]: DBG:avpops:ops_delete_avp: 1 avps were removed Jun 29 11:33:00 ser0 kamailio[1469]: -> acc state: cfu Jun 29 11:33:00 ser0 kamailio[1469]: -> CFU rewrited, search new contact right now Jun 29 11:33:00 ser0 kamailio[1469]: callee_cli=0183659999 callee_fwd=0183659996 callee_cfu=0183659999 rU=0183659999 caller_cli=0170645720 Jun 29 11:33:00 ser0 kamailio[1469]: -> append the diversion header Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:parse_headers: flags=40000000 Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:parse_headers: flags=40000000 Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:pv_get_diversion: no Diversion header Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:parse_headers: flags=40000000 Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:pv_get_diversion: no Diversion header Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:parse_headers: flags=40000000 Jun 29 11:33:00 ser0 kamailio[1469]: DBG:core:pv_get_diversion: no Diversion header Jun 29 11:33:00 ser0 kamailio[1469]: -> div uri=<null> - div privacy=<null> - div reason=<null>
** sip trace :
U 2009/06/29 11:33:00.856070 77.246.81.132:5060 -> 77.246.81.140:5060 INVITE sip:0183659999@77.246.81.140:5060;transport=udp SIP/2.0. Record-Route: sip:77.246.81.132;lr=on;ftag=166b2b53fb3fb285o0;nat=yes;did=aa7.f5133295. Via: SIP/2.0/UDP 77.246.81.132;branch=z9hG4bKf2b2.0950c4d5.0. Via: SIP/2.0/UDP 192.168.100.12:5060;rport=5060;received=82.229.235.185;branch=z9hG4bK-e21913cd. From: "0170645720" sip:0170645720@sip.720.fr;tag=166b2b53fb3fb285o0. To: sip:0183659996@sip.720.fr. Call-ID: f7e91deb-236ca0cd@192.168.100.12. CSeq: 102 INVITE. Max-Forwards: 49. Contact: "0170645720" sip:0170645720@82.229.235.185:5060. Expires: 240. User-Agent: Linksys/SPA942-6.1.3(a). Content-Length: 298. Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER. Supported: 100rel, replaces. Content-Type: application/sdp. Diversion: sip:0183659996@sip.720.fr;reason=unconditional. Privacy: none. Remote-Party-ID: 0170645720 sip:0170645720@82.229.235.185;party=calling;privacy=off;screen=yes. P-Asserted-Identity: "0170645720" sip:0170645720@sip.720.fr. Session-Expires: 120. . v=0. o=- 92989 92989 IN IP4 192.168.100.12. s=-. c=IN IP4 77.246.81.133. t=0 0. m=audio 36164 RTP/AVP 18 8 0 101. a=rtpmap:18 G729a/8000. a=fmtp:18 annexb=yes. a=rtpmap:8 PCMA/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=ptime:20. a=sendrecv. a=nortpproxy:yes.
** related code :
loadmodule "diversion.so" modparam("diversion", "suffix", ";privacy=none;counter=1") ...
if (!search("Diversion:.*")) { xlog("L_INFO", "-> append the diversion header"); add_diversion("unconditional"); } else { xlog("L_INFO", "-> Diversion header already found, forbidden to forward one more time"); sl_send_reply("403", "Forbidden"); exit; }
# diversion control xlog("L_INFO", "-> div uri=$di - div privacy=$dip - div reason=$dir");
# return at the beginning of the callee searching route(3); exit; }
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw) Date: 2008-11-11 16:04
Message: This bug is now more then two years old. Is this still a problem?
Henning
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1545216...