Summary: | ASTERISK-24852: [patch] new res_pjsip module to identify endpoint for an incoming call with a trunk that has outbound registration. | ||||
Reporter: | Dmitriy Serov (Demon) | Labels: | |||
Date Opened: | 2015-03-07 14:31:18.000-0600 | Date Closed: | 2015-04-09 08:09:37 | ||
Priority: | Major | Regression? | No | ||
Status: | Closed/Complete | Components: | Resources/res_pjsip | ||
Versions: | Frequency of Occurrence | ||||
Related Issues: |
| ||||
Environment: | Attachments: | ( 0) res_pjsip_endpoint_identifier_request_user.diff | |||
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@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). | ||||
Comments: | By: Dmitriy Serov (Demon) 2015-03-07 14:32:58.071-0600 Patch of new res_pjsip_endpoint_identifier_request_user.c to trunk By: Rusty Newton (rnewton) 2015-03-11 10:20:01.450-0500 Dmitriy, please post the patch on reviewboard for the peer review process. See the following page for the overall patch contribution process: https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process Link the Reviewboard review request URL from this issue once you have it. By: Joshua C. Colp (jcolp) 2015-04-09 08:09:37.572-0500 After code review and discussion with the reporter the best path forward is being tracked on ASTERISK-24949. |