<div dir="ltr">Hi,<div><br></div><div>You are reffering to an obsolete RFC, a replacement is rfc5806</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 1, 2016 at 4:00 PM, Björn Bylander <span dir="ltr"><<a href="mailto:notifications@github.com" target="_blank">notifications@github.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Given a Diversion header like the following:</p>
<pre><code>Diversion:"Foo
Bar"<<a href="mailto:sip%3A%2B9876543211@127.0.0.101" target="_blank">sip:+9876543211@127.0.0.<wbr>101</a>;user=phone>;privacy=off;<wbr>answered-count=2;re
ason=deflection;counter=1;<wbr>answered,"_
somewhere"<<a href="mailto:sip%3A%2B9876543212@127.0.0.101" target="_blank">sip:+9876543212@<wbr>127.0.0.101</a>;user=phone>;<wbr>privacy=off;answered-coun
t=1;reason=deflection;counter=<wbr>1;answered
</code></pre>
<p>Kamailio 4.4.3 (and probably earlier versions) emit error messages<br>
complaining about the comma character. According to RFC 6044 multiple<br>
comma-separated diversions in a single Diversion-header is allowed.</p>
<p>Full INVITE as an example:</p>
<pre><code>INVITE <a href="mailto:sip%3A%2B1234567890@127.0.0.100">sip:+1234567890@127.0.0.100</a>:<wbr>5060;user=phone;transport=tcp SIP/2.0 
Via:SIP/2.0/TCP
127.0.0.101;branch=<wbr>z9hG4bKBroadWorks.-1od4eg8-<wbr>127.0.0.100V5060-0-82844591-13
54681939-1477634439005- 
From:<<a href="mailto:sip%3A%2B9876543210@127.0.0.101" target="_blank">sip:+9876543210@127.0.0.<wbr>101</a>;user=phone>;tag=<wbr>1354681939-1477634439005- 
To:<<a href="mailto:sip%3A%2B1234567890@127.0.0.">sip:+1234567890@127.0.0.</a><wbr>100:5060;user=phone> 
<a href="mailto:Call-ID%3ABW0800390052810161562691307@127.0.0.101" target="_blank">Call-ID:<wbr>BW0800390052810161562691307@<wbr>127.0.0.101</a> 
CSeq:<a href="tel:82844591" value="+5782844591" target="_blank">82844591</a> INVITE 
Contact:<sip:<a href="http://127.0.0.101:5060">127.0.0.101:5060</a>;<wbr>transport=tcp> 
P-Asserted-Identity:<<a href="mailto:sip%3A%2B9876543210@127.0.0.101" target="_blank">sip:+<wbr>9876543210@127.0.0.101</a>;user=<wbr>phone> 
Privacy:none 
Diversion:"Foo
Bar"<<a href="mailto:sip%3A%2B9876543211@127.0.0.101" target="_blank">sip:+9876543211@127.0.0.<wbr>101</a>;user=phone>;privacy=off;<wbr>answered-count=2;re
ason=deflection;counter=1;<wbr>answered,"_
somewhere"<<a href="mailto:sip%3A%2B9876543212@127.0.0.101" target="_blank">sip:+9876543212@<wbr>127.0.0.101</a>;user=phone>;<wbr>privacy=off;answered-coun
t=1;reason=deflection;counter=<wbr>1;answered 
Supported:100rel 
Allow:ACK,BYE,CANCEL,INFO,<wbr>INVITE,OPTIONS,PRACK,REFER,<wbr>NOTIFY,UPDATE 
X-BroadWorks-DNC:network-<wbr>address="<a href="mailto:sip%3A%2B9876543210@127.0.0.101" target="_blank">sip:+9876543210@127.<wbr>0.0.101</a>;user=phone" 
Accept:application/dtmf-relay,<wbr>application/media_control+xml,<wbr>application/sdp,
application/x-broadworks-call-<wbr>center+xml,multipart/mixed 
Max-Forwards:10 
Content-Type:application/sdp 
Content-Disposition:session;<wbr>handling=required 
Content-Length:267 

v=0 
o=BroadWorks 100442303 1 IN IP4 127.0.0.101 
s=- 
c=IN IP4 127.0.0.102 
t=0 0 
m=audio 29778 RTP/AVP 8 0 18 101 
a=rtpmap:8 PCMA/8000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:18 G729/8000 
a=rtpmap:101 telephone-event/8000 
a=fmtp:101 0-15 
a=sendrecv 
a=maxptime:20
</code></pre>
<p>Example log messages:</p>
<pre><code>Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[parser/parse_addr_spec.c:488]<wbr>: parse_to_param(): ERROR parse_to_param :
invalid character ',' in status 21:
<<;privacy=off;answered-count=<wbr>2;reason=deflection;counter=1;<wbr>answered>>
Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[parser/parse_addr_spec.c:254]<wbr>: parse_to_param(): ERROR: parse_to_param
:unexpected char ["] in status 21:
<<;privacy=off;answered-count=<wbr>2;reason=deflection;counter=1;<wbr>answered,>> .
Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[parser/parse_addr_spec.c:906]<wbr>: parse_addr_spec(): ERROR: parse_to: invalid
To -  unexpected end of header in state 21
Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[parser/parse_diversion.c:69]: parse_diversion_header():
ERROR:parse_diversion_header: bad diversion header
Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[lvalue.c:345]: lval_pvar_assign(): non existing right pvar
Oct 28 08:00:39 kam1 /usr/sbin/kamailio[14935]: ERROR: <core>
[lvalue.c:405]: lval_assign(): assignment failed at pos: (562,21-562,35)

</code></pre>
<p>The code on line 562 is <code>$avp(div_user) = $(di{uri.user});</code>.</p>
<p>kamailio -v:</p>
<pre><code class="m_1096650262454713229language-version:">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.7.2```

uname -a:

`Linux hostname 3.2.0-4-amd64 #1 SMP Debian 3.2.81-2 x86_64 GNU/Linux`
</code></pre>

<p style="font-size:small;color:#666">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/841" target="_blank">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZdODVt-4LXUU61bER1Wq_ZJomUBGks5q51QVgaJpZM4KmL3j" target="_blank">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZRAGfIiO2Ah1iqWYdTpsFO4LU0Cfks5q51QVgaJpZM4KmL3j.gif" width="1"></p>
<div>
<div>
  
  
</div>

</div>

<br>______________________________<wbr>_________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Alberto Llamas<br></div><div>Phone: +1-786-805-6003</div><div><div dir="ltr"><div name="div[0]"><span>Telecommunications</span><span> </span><span>Engineer</span></div></div>Digium Certified Asterisk Professional (dCap)<br></div><div><br></div></div></div></div></div>
</div>