Hi. I've discovered a bug in the Dial() string processing (for Asterisk 13.14.1 at least).
According to the documentation in channels/chan_sip.c the Dial() string syntax is: * SIP/devicename * or SIP/username@domain (SIP uri) * or SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port] * or SIP/devicename/extension * or SIP/devicename/extension/IPorHost * or SIP/username@domain//IPorHost * * and there is an optional [!dnid] argument you can append to alter the * To: header. The bug is in the last part - the optional !dnid argument. This should parse for a ! *following* any of the above syntaxes and assign whatever follows it to dnid. If there is more than one ! in the entire string, dnid should follow the final one. Unfortunately, the string parsing checks *first* for a ! and assigns everything following the first occurrence to dnid, and then attempts to parse whatever preceded it according to the above possibilities. This means that if a SIP password, for example, contains a !, it is impossible to use the stated syntax SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port] Note that in this syntax, @host is non-optional, therefore parsing for a ! preceding the @host part and regarding what follows the ! as dnid is incorrect. Regards, Antony. -- +++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++ Please reply to the list; please *don't* CC me. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users