[asterisk-dev] [svn-commits] mmichelson: branch 12 r399083 - in /branches/12: include/asterisk/ res/
Olle E. Johansson
oej at edvina.net
Fri Sep 13 10:05:34 CDT 2013
13 sep 2013 kl. 17:01 skrev Joshua Colp <jcolp at digium.com>:
> Olle E. Johansson wrote:
>>
>> 13 sep 2013 kl. 16:49 skrev SVN commits to the Digium repositories
>> <svn-commits at lists.digium.com <mailto:svn-commits at lists.digium.com>>:
>>
>>> +contact.slen = pj_ansi_snprintf(contact.ptr, PJSIP_MAX_URL_SIZE,
>>> +"<%s:%s%.*s%s:%d%s%s>",
>>> +(pjsip_transport_get_flag_from_type(type) & PJSIP_TRANSPORT_SECURE) ?
>>> "sips" : "sip",
>>> +(type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
>>> +(int)rdata->tp_info.transport->local_name.host.slen,
>>> +rdata->tp_info.transport->local_name.host.ptr,
>>> +(type & PJSIP_TRANSPORT_IPV6) ? "]" : "",
>>> +rdata->tp_info.transport->local_name.port,
>>> +(type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ?
>>> ";transport=" : "",
>>> +(type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ?
>>> pjsip_transport_get_type_name(type) : "");
>>> +
>>
>> Sorry for not being awake during the review. Obvious questions:
>>
>> - When do you add ;transport ?
>> - When do you use sips: ?
>
> I assume you mean the code since this can't be set by the user. Transports within pjsip have different properties about them - whether they are secure, whether they are TCP, UDP, TLS, etc. The code above uses these properties to know what to add and when. This code is based on code that already existed within the pjsua library itself.
>
Right. But you avoided to answer my questions, that are quite important to get right.
Can you show some examples?
/O
More information about the asterisk-dev
mailing list