<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 6, 2015 at 2:06 PM, Dmitriy Serov <span dir="ltr"><<a href="mailto:serov.d.p@gmail.com" target="_blank">serov.d.p@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hello.<br>
<br>
Asterisk 13.2.<br>
I transfer configs from chan_sip to res_pjsip.<br>
In chan_sip i have "match_auth_username=yes" and have nothing in
pjsip.<br>
<br>
I have a lot of endpoints and registrations on same SIP server. And
it's problem in pjsip now. Is not it?<br>
<br>
I requesting to add new value for endpoint option identify_by. The
value 'uri'.<br>
Simple config (cutted):<br>
<br>
<pre style="margin:0px 0px 1.4em;padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;text-align:left;color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:19.6px;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(251,250,249)">[siptrunk]
type=registration
transport=udp-transport
outbound_auth=siptrunk
server_uri=sip:<a href="http://sip.example.com" target="_blank">sip.example.com</a>
<a href="mailto:client_uri=sip:1234567890@sip.example.com" target="_blank">client_uri=sip:1234567890@sip.example.com</a>
retry_interval=60
contact_user=siptrunk-in
[siptrunk-in]
type=endpoint
transport=udp-transport
context=from-trunk
disallow=all
allow=ulaw
outbound_auth=siptrunk
aors=siptrunk
identify_by=uri
</pre>
<br>
Registration section has option "contact_user". Incoming call from
this registration will be INVITE sip:siptrunk-in@....<br>
I offer to change res_pjsip_endpoint_identifier_user to realize
endpoint identification by sip uri.<br>
<br>
I think it will be usefull.<br>
<br>
P.S. i hope issues will be rejected:
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-22306" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-22306</a> and SWP-6069
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:20px;text-align:start;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;display:inline!important;float:none;background-color:rgb(230,230,230)"><span></span></span><span title="SWP-6069 res_pjsip endpoint config object's 'identify_by'
option needs cleanup, removal or other modification" style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:20px;text-align:start;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(230,230,230)"><br><span class=""><font color="#888888">
<br>
<br>
</font></span></span><span class=""><font color="#888888">Dmitriy Serov
</font></span></div>
<br>-<br clear="all"></blockquote></div><br></div><div class="gmail_extra">I believe what you are looking for is already available. See the "identify" type (type=identify) section that is in the pjsip.conf file and the "identify" option for endpoints. These allow you to identify and endpoint by IP address. <br><br>For more information see the pjsip.conf.sample file. Also take a look at configuring Asterisk for res_pjsip [1] specifically the part about configuring endpoint identification by IP address [2]. If you run into problems more information can also be found in the res_pjsip troubleshooting guide [3], specifically the section on "identify by IP address"<br><br>[1] <a href="https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip">https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip</a><br>[2] <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip_endpoint_identifier_ip">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip_endpoint_identifier_ip</a><br>[3] <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+PJSIP+Troubleshooting+Guide">https://wiki.asterisk.org/wiki/display/AST/Asterisk+PJSIP+Troubleshooting+Guide</a><br><br></div><div class="gmail_extra">Hope that helps,<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature"><div dir="ltr"><pre style="padding:2px;border:1px solid rgb(114,99,77);background-color:rgb(238,238,238);color:rgb(0,0,0);overflow:auto">Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></pre></div></div>
</div></div>