[asterisk-dev] [Code Review] SIP uri parsing cleanup

Nick Lewis Nick.Lewis at atltelecom.com
Thu Aug 27 08:42:05 CDT 2009



>SIP in fact is open to *any* URI scheme. There are platforms using  
>tel: today, and I've been working with solutions using XMPP:

>Locking URI's to sip or sips might become a poor solution, mostly  
>because of the tel: uri.

Yes I suppose tel: etc ought to be supported. I think the problem with
the parse_uri function is that it tries to dictate the scheme (in the
current version by using the input variable or in my proposal by
hardcoding it). A parser function should instead parse what scheme is
actually there in the uri and return it

- static int parse_uri(char *uri, char *scheme,
+ static int parse_uri(char *uri, char **scheme,
        char **ret_name, char **pass, char **domain, char **port, char
**options, char **transport)


There must be a way of determining the difference between a ":" for a
scheme and a ":" for a port or a password?

Nick_Lewis

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre.
_____________________________________________________________________
Disclaimer of Liability
ATL Telecom Ltd shall not be held liable for any improper or incorrect use of the  information described and/or contained herein and assumes no responsibility for anyones use  of the information. In no event shall ATL Telecom Ltd be liable for any direct, indirect,  incidental, special, exemplary, or consequential damages (including, but not limited to,  procurement or substitute goods or services; loss of use, data, or profits; or business  interruption) however caused and on any theory of liability, whether in contract, strict  liability, or tort (including negligence or otherwise) arising in any way out of the use of  this system, even if advised of the possibility of such damage.

Registered Office: ATL Telecom Ltd, Fountain Lane, St. Mellons Cardiff, CF3 0FB
Registered in Wales Number 4335781

All goods and services supplied by ATL Telecom Ltd are supplied subject to ATL Telecom Ltd standard terms and conditions, available upon request.



More information about the asterisk-dev mailing list