res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictions

ast_bind to a port reserved for another program by SELinux causes
errno == EACCES.  This caused random failures when binding rtp or
udptl sockets.  Treat EACCES as a non-fatal error, try next port.

(closes issue ASTERISK-23134)
Reported by: Corey Farrell
........

Merged revisions 406933 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@406934 f38db490-d61c-443f-a65b-d21fe96a405b
app_dial: Allow macro/gosub pre-bridge execution to occur on priorities

The parsing for the destination of the macro/gosub uses the '^' character to
separate out context, extension, and priority. However, the logic for the
macro/gosub execution was written such that it would only do the actual
macro/gosub jump if a '^' character existed. This doesn't apply when the
macro/gosub jump occurs in a priority/priority label. This patch changes
the logic so that the parsing still occurs, but the jump will occur even
for priorities/priority labels.

(issue ASTERISK-23164)

Review: https://reviewboard.asterisk.org/r/3154
........

Merged revisions 407041 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@407074 f38db490-d61c-443f-a65b-d21fe96a405b
app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK

STACK_PEEK requires 2 parameters and LOCAL_PEEK requires 1 parameter.  This
protects against situations where those parameters are blank or missing by
logging an error and returning.

(closes issue ASTERISK-23220)
Reported by: James Sharp
........

Merged revisions 407100 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@407103 f38db490-d61c-443f-a65b-d21fe96a405b