<html><body><div>I added the log and everything looks fine. It's only adding the PAI to the initial invite which is what I want. The odd thing is there are no issues with the invites, it just looks like the Cancel messages that are being mangled. I posted a separate issue to the list prior to this report but no one responded, I'm not sure it went through correctly but resulting cancel coming out of the B2BUA looked like this:</div><div><br></div><div>&nbsp;Reference:
<br><br>192.168.1.146 = Opensips Proxy
<br>192.168.1.145 = Opensips B2BUA
<br>10.2.3.245 = Carrier
<br><br><br><br>U 2011/12/01 22:51:11.558887 192.168.1.146:5060 -&gt; 192.168.1.145:5090
<br>CANCEL sip:9993512125551212@192.168.1.145:5090 SIP/2.0.
<br>Via: SIP/2.0/UDP 192.168.1.146;branch=z9hG4bK2df7.78db1d81.0.
<br>From: "James Logan" &lt;sip:8884442222@192.168.1.137&gt;;tag=as06eabdcd.
<br>Call-ID: 40c30c6459b3eaa4683991082381cadb@192.168.1.137.
<br>To: "12125551212" &lt;sip:12125551212@192.168.1.146&gt;.
<br>CSeq: 102 CANCEL.
<br>Max-Forwards: 70.
<br>User-Agent: Opensips.
<br>Content-Length: 0.
<br>.
<br><br><br>U 2011/12/01 22:51:11.559378 192.168.1.145:5090 -&gt; 192.168.1.146:5060
<br>SIP/2.0 200 canceling.
<br>Via: SIP/2.0/UDP 192.168.1.146;branch=z9hG4bK2df7.78db1d81.0.
<br>From: "James Logan" &lt;sip:8884442222@192.168.1.137&gt;;tag=as06eabdcd.
<br>Call-ID: 40c30c6459b3eaa4683991082381cadb@192.168.1.137.
<br>To: "12125551212" &lt;sip:12125551212@192.168.1.146&gt;;tag=3330ae74b9cf9aed85afbc9203dd6238-715f
<br>CSeq: 102 CANCEL.
<br>Server: B2BUA.
<br>Content-Length: 0.
<br>.
<br><br><br>U 2011/12/01 22:51:11.559527 192.168.1.145:5090 -&gt; 10.2.3.245:5060
<br>CANCEL ............i...............i.. SIP/2.0.
<br>Via: SIP/2.0/UDP 192.168.1.145:5090;branch=z9hG4bK5421.22999dd2.0.
<br>........B2B.256.3572553sip:+12125551212@10.2.3.245sip:8884442222@192.168.1.1379120d3`.....p..i...........................................q.i............
<br>........ CANCEL.
<br>User-Agent: OpenSIPS (1.7.1-notls (x86_64/linux)).
<br>Max-Forwards: 70.
<br>User-Agent: Opensips.
<br>Init-CallID: 40c30c6459b3eaa4683991082381cadb@192.168.1.137.
<br>Contact: &lt;sip:192.168.1.145:5090&gt;.
<br>.&nbsp;<br><br>On Dec 07, 2011, at 05:18 PM, Ovidiu Sas &lt;osas@voipembedded.com&gt; wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch">Add a log and print out what are you adding before adding it and you<br> will see if it's good or not.<br> <br> On Wed, Dec 7, 2011 at 5:13 PM, Logan &lt;<a href="mailto:voipmaster@me.com" data-mce-href="mailto:voipmaster@me.com">voipmaster@me.com</a>&gt; wrote:<br> &gt; This is the extent of my local route. If the $var is not present, I do not<br> &gt; add it. Do you see any issue with what I'm doing here?<br> &gt;<br> &gt;<br> &gt; local_route {<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; #xlog("L_INFO","***** IN LOCAL ROUTE ********\n");<br> &gt;<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; if (is_method("INVITE")) {<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($var(pai_userpart)) {<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; append_hf("P-Asserted-Identity:<br> &gt; \"$var(pai_display)\" &lt;sip:$var(pai_userpart)@$Ri&gt;\r\n");<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_INFO","PAI is not present, not adding\n");<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> &gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br> &gt;<br> &gt;<br> &gt; }<br> &gt;<br> &gt; On Dec 07, 2011, at 04:57 PM, Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com" data-mce-href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt; wrote:<br> &gt;<br> &gt; You need to be careful when you alter requests in B2B mode (the<br> &gt; received INVITE and the sent INVITE belong to different transactions).<br> &gt; Make sure that you have something valid in those vars before applying<br> &gt; any changes to the outgoing message.<br> &gt;<br> &gt; Regards,<br> &gt; Ovidiu Sas<br> &gt;<br> &gt; On Wed, Dec 7, 2011 at 4:49 PM, Logan &lt;<a href="mailto:voipmaster@me.com" data-mce-href="mailto:voipmaster@me.com">voipmaster@me.com</a>&gt; wrote:<br> &gt;&gt; I'm storing some $vars in route[0] prior to calling b2b_init_request("top<br> &gt;&gt; hiding");<br> &gt;&gt;<br> &gt;&gt; Then in my local route Im appending a P-Asserted-Identity header.<br> &gt;&gt;<br> &gt;&gt; I can't use the custom_headers modparam because it's going to preserve the<br> &gt;&gt; PAI as it comes in. Most of the time it's not present, or is in the wrong<br> &gt;&gt; format so I'm adding it in local route.<br> &gt;&gt;<br> &gt;&gt;<br> &gt;&gt; On Dec 07, 2011, at 04:31 PM, Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com" data-mce-href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt; wrote:<br> &gt;&gt;<br> &gt;&gt; Are you trying to perform any msg manipulations during b2b scenarios?<br> &gt;&gt; Also, keep in mind that the b2b server functionality must be kept<br> &gt;&gt; isolated from the proxy server functionality (proxy mode is not<br> &gt;&gt; compatible with b2b mode).<br> &gt;&gt;<br> &gt;&gt; Regards,<br> &gt;&gt; Ovidiu Sas<br> &gt;&gt;<br> &gt;&gt; --&nbsp;VoIP Embedded, Inc.<a href="http://www.voipembedded.com" data-mce-href="http://www.voipembedded.com">http://www.voipembedded.com</a><br> &gt;&gt; On Wed, Dec 7, 2011 at 3:41 PM, Logan &lt;<a href="mailto:voipmaster@me.com" data-mce-href="mailto:voipmaster@me.com">voipmaster@me.com</a>&gt; wrote:<br> &gt;&gt;&gt; Hello list this is the second odd thing I've seen with b2bua in opensips<br> &gt;&gt;&gt; 1.7.1 It looks like the b2bua module is mangling the cancel message and<br> &gt;&gt;&gt; is<br> &gt;&gt;&gt; ripping out the callid when sending upstream:<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; U 2011/12/07 20:15:05.895915 192.168.1.143:5060 -&gt; 192.168.1.145:5090<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; CANCEL sip:<a href="mailto:9993518045551212@192.168.1.145" data-mce-href="mailto:9993518045551212@192.168.1.145">9993518045551212@192.168.1.145</a>:5090 SIP/2.0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Via: SIP/2.0/UDP 192.168.1.143;branch=z9hG4bKac0e.5a3d2bf1.0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; From: "8669800222" &lt;sip:<a href="mailto:8669800222@192.168.1.1" data-mce-href="mailto:8669800222@192.168.1.1">8669800222@192.168.1.1</a>&gt;;tag=3532277698-944952.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Call-ID: <a href="mailto:494823-3532277698-944947@192.168.1.1" data-mce-href="mailto:494823-3532277698-944947@192.168.1.1">494823-3532277698-944947@192.168.1.1</a>.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; To: "18045551212" &lt;sip:<a href="mailto:18045551212@192.168.1.143" data-mce-href="mailto:18045551212@192.168.1.143">18045551212@192.168.1.143</a>&gt;.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; CSeq: 1 CANCEL.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Max-Forwards: 70.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; User-Agent: Opensips.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Content-Length: 0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; .<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; U 2011/12/07 20:15:05.896027 192.168.1.145:5090 -&gt; 192.168.1.143:5060<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; SIP/2.0 200 canceling.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Via: SIP/2.0/UDP 192.168.1.143;branch=z9hG4bKac0e.5a3d2bf1.0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; From: "8669800222" &lt;sip:<a href="mailto:8669800222@192.168.1.1" data-mce-href="mailto:8669800222@192.168.1.1">8669800222@192.168.1.1</a>&gt;;tag=3532277698-944952.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Call-ID: <a href="mailto:494823-3532277698-944947@192.168.1.1" data-mce-href="mailto:494823-3532277698-944947@192.168.1.1">494823-3532277698-944947@192.168.1.1</a>.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; To: "18045551212"<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; &lt;sip:<a href="mailto:18045551212@192.168.1.143" data-mce-href="mailto:18045551212@192.168.1.143">18045551212@192.168.1.143</a>&gt;;tag=3330ae74b9cf9aed85afbc9203dd6238-e6b7.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; CSeq: 1 CANCEL.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Server: Opensips.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Content-Length: 0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; .<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; U 2011/12/07 20:15:05.896097 192.168.1.145:5090 -&gt; 10.2.3.210:5060<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; CANCEL sip:+<a href="mailto:18045551212@65.211.120.23" data-mce-href="mailto:18045551212@65.211.120.23">18045551212@65.211.120.23</a> SIP/2.0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Via: SIP/2.0/UDP 192.168.1.145:5090;branch=z9hG4bK0299.252f8e61.0.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; .<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; From: &lt;sip:<a href="mailto:7324812444@66.29.74.37" data-mce-href="mailto:7324812444@66.29.74.37">7324812444@66.29.74.37</a>&gt;;tag=418802140f6308e008db76a1e1de765b.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; CSeq: 2 INVITE54.7172739.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Content-Lengt<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; To: sip:+<a href="mailto:18045551212@65.211.120.237" data-mce-href="mailto:18045551212@65.211.120.237">18045551212@65.211.120.237</a>.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Call- CANCEL.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; User-Agent: OpenSIPS (1.7.1-notls (x86_64/linux)).<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Max-Forwards: 70.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Init-CallID: <a href="mailto:494823-3532277698-944947@192.168.1.1" data-mce-href="mailto:494823-3532277698-944947@192.168.1.1">494823-3532277698-944947@192.168.1.1</a>.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Contact: &lt;sip:192.168.1.145:5090&gt;.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; .<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; U 2011/12/07 20:15:05.910842 10.2.3.210:5060 -&gt; 192.168.1.145:5090<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; SIP/2.0 400 Missing Mandatory Header Call-Id.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; v: SIP/2.0/UDP<br> &gt;&gt;&gt; 192.168.1.145:5090;branch=z9hG4bK0299.252f8e61.0;received=192.168.1.145.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; l: 0.<br> &gt;<br> &gt; _______________________________________________<br> &gt; Users mailing list<br> &gt; <a href="mailto:Users@lists.opensips.org" data-mce-href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br> &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" data-mce-href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br> &gt;<br> &gt;<br> &gt; _______________________________________________<br> &gt; Users mailing list<br> &gt; <a href="mailto:Users@lists.opensips.org" data-mce-href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br> &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" data-mce-href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br> &gt;<br> <br> <br> <br> -- <br> VoIP Embedded, Inc.<br> <a href="http://www.voipembedded.com" data-mce-href="http://www.voipembedded.com">http://www.voipembedded.com</a><br> <br> _______________________________________________<br> Users mailing list<br> <a href="mailto:Users@lists.opensips.org" data-mce-href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" data-mce-href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></div></blockquote></div></body></html>