On 07 Jan 2014, at 15:55, SVN commits to the Digium repositories 
<[email protected]> wrote:

> if (endpoint->nat.rewrite_contact && (contact = 
> pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL)) &&
> -             (PJSIP_URI_SCHEME_IS_SIP(contact->uri) || 
> PJSIP_URI_SCHEME_IS_SIPS(contact->uri))) {
> +             !contact->star && (PJSIP_URI_SCHEME_IS_SIP(contact->uri) || 
> PJSIP_URI_SCHEME_IS_SIPS(contact->uri))) {
>               pjsip_sip_uri *uri = pjsip_uri_get_uri(contact->uri);
> 
>               pj_cstr(&uri->host, rdata->pkt_info.src_name);
> 

Seems like this code assumes that SIP only have SIP: and SIPS: as URI's. We 
should actually be quite transparent in the schemas supported - especially 
proxys but also b2bua's like Asterisk. Tel: uri's are not unknown. In the 
security area we are discussing improved end-2-end security which may end up 
using a new SIP uri.

Instead of testing with two functions for two classes of schemas a table could 
be used? That would be more extensible. And please implement tel: support :-)

/O
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to