<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/4476/">https://reviewboard.asterisk.org/r/4476/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/4476/diff/1/?file=71977#file71977line4" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/res/res_pjsip_endpoint_identifier_request_user.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * Copyright (C) 2013, Digium, Inc.</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">We're in 2015, and the copyright is you.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/4476/diff/1/?file=71977#file71977line125" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/res/res_pjsip_endpoint_identifier_request_user.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">125</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">AST_MODULE_INFO</span><span class="p">(</span><span class="n">ASTERISK_GPL_KEY</span><span class="p">,</span> <span class="n">AST_MODFLAG_LOAD_ORDER</span><span class="p">,</span> <span class="s">"PJSIP request_username endpoint identifier"</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">PJSIP Request URI Username Endpoint Identifier</pre>
</div>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think the behavior and an example configuration for this module also needs to exist somewhere. I think it should also be turned off by default because in some deployments it could start breaking things. (Matching on an endpoint that wasn't expected to previously)</pre>
<p>- Joshua Colp</p>
<br />
<p>On March 11th, 2015, 4:30 p.m. UTC, Dmitriy Serov wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, Matt Jordan and rnewton.</div>
<div>By Dmitriy Serov.</div>
<p style="color: grey;"><i>Updated March 11, 2015, 4:30 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24852">ASTERISK-24852</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The main task: to find the right endpoint for an incoming call with a trunk that has outbound registration.
Simple example (a piece of pjsip.conf):
[trunk1]
type=registration
transport=udp-transport
outbound_auth=trunk1
server_uri=sip:sip.example.com
client_uri=sip:user1@sip.example.com
contact_user=trunk1-in
[trunk2]
type=registration
transport=udp-transport
outbound_auth=trunk2
server_uri=sip:sip.example.com
client_uri=sip:user2@sip.example.com
contact_user=trunk2-in
[trunk1-in]
type=endpoint
context=from-trunk
disallow=all
allow=ulaw
outbound_auth=trunk1
aors=trunk1
[trunk2-in]
type=endpoint
context=from-trunk
disallow=all
allow=ulaw
outbound_auth=trunk2
aors=trunk2
trunk1, trunk2 - outbound registrations to EXTERNAL sip server sip.example.com. One server and two registrations.
; "contact_user=" sets the SIP contact header's user portion of the SIP URI this will affect the extension reached in dialplan when the far end calls you at this registration.
In example option has values "trunk1-in" and "trink2-in".
Case: random user admin@sip.example.com calling to user2@sip.example.com.
External sip server redirect call to my server with packet:
INVITE sip:trunk2-in@8.8.8.8:5060 SIP/2.0
From: "PhonerLite" <sip:admin@sip.example.com>;tag=5F39A540-782390-DE41886A_kmbdctn-8A47
To: <sip:user2@sip.example.com>
This invite can be:
- anonymous. Very bad.
- identified by IP. Config has two endpoints with same IP.
- identified by username From. It cannot identify by "admin" (random)
res_pjsip_endpoint_identifier_request_user helps to identify this invite by uri username in request line (contact_user in registration).</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/res/res_pjsip_endpoint_identifier_request_user.c <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/4476/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>