[asterisk-dev] [Code Review] 4476: new res_pjsip module to identify endpoint for an incoming call with a trunk that has outbound registration.
Joshua Colp
reviewboard at asterisk.org
Tue Mar 24 06:39:51 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4476/#review14782
-----------------------------------------------------------
/trunk/res/res_pjsip_endpoint_identifier_request_user.c
<https://reviewboard.asterisk.org/r/4476/#comment25365>
We're in 2015, and the copyright is you.
/trunk/res/res_pjsip_endpoint_identifier_request_user.c
<https://reviewboard.asterisk.org/r/4476/#comment25364>
PJSIP Request URI Username Endpoint Identifier
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)
- Joshua Colp
On March 11, 2015, 4:30 p.m., Dmitriy Serov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4476/
> -----------------------------------------------------------
>
> (Updated March 11, 2015, 4:30 p.m.)
>
>
> Review request for Asterisk Developers, Matt Jordan and rnewton.
>
>
> Bugs: ASTERISK-24852
> https://issues.asterisk.org/jira/browse/ASTERISK-24852
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> 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 at 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 at 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 at sip.example.com calling to user2 at sip.example.com.
> External sip server redirect call to my server with packet:
> INVITE sip:trunk2-in at 8.8.8.8:5060 SIP/2.0
> From: "PhonerLite" <sip:admin at sip.example.com>;tag=5F39A540-782390-DE41886A_kmbdctn-8A47
> To: <sip:user2 at 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).
>
>
> Diffs
> -----
>
> /trunk/res/res_pjsip_endpoint_identifier_request_user.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/4476/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dmitriy Serov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150324/bee375ce/attachment-0001.html>
More information about the asterisk-dev
mailing list