[asterisk-bugs] [JIRA] (ASTERISK-20589) eswitch not substitute variables

sybasesql (JIRA) noreply at issues.asterisk.org
Wed Nov 7 00:57:21 CST 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199313#comment-199313 ] 

sybasesql commented on ASTERISK-20589:
--------------------------------------

This is SIP channel.
It's hard to capture because this is production server with high load.
There are what I can get with verbose/debug level 5:

---good call 100 -> 101 (with noop first)
[Nov  7 05:48:01] DEBUG[17712] pbx.c: Launching 'NoOp'
[Nov  7 05:48:01] VERBOSE[17712] pbx.c:     -- Executing [101 at out:1] NoOp("SIP/100-0000a16d", "Out") in new stack
[Nov  7 05:48:01] DEBUG[17712] pbx.c: Function result is '100'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten = ? AND context = ? AND priority = ?
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 1 ('exten') = '101'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 2 ('context') = '100-out'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 3 ('priority') = '2'
[Nov  7 05:48:01] DEBUG[17712] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten LIKE ? AND context = ? AND priority = ? ORDER BY exten
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 1 ('exten LIKE') = '\_%'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 2 ('context') = '100-out'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 3 ('priority') = '2'
[Nov  7 05:48:01] DEBUG[17712] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:48:01] VERBOSE[17712] pbx.c:     -- Auto fallthrough, channel 'SIP/100-0000a16d' status is 'UNKNOWN'
[Nov  7 05:48:01] DEBUG[17712] channel.c: Soft-Hanging up channel 'SIP/100-0000a16d'
[Nov  7 05:48:01] DEBUG[17712] pbx.c: Function result is '100'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten = ? AND context = ? AND priority = ?
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 1 ('exten') = 'h'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 2 ('context') = '100-out'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:48:01] DEBUG[17712] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten LIKE ? AND context = ? AND priority = ? ORDER BY exten
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 1 ('exten LIKE') = '\_%'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 2 ('context') = '100-out'
[Nov  7 05:48:01] DEBUG[17712] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:48:01] DEBUG[17712] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
---bad call 100 -> 101 (with eswitch first)
[Nov  7 05:46:47] DEBUG[28126] pbx.c: Function result is '(null)'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten = ? AND context = ? AND priority = ?
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 1 ('exten') = '101'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 2 ('context') = '-out'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:46:47] DEBUG[28126] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten LIKE ? AND context = ? AND priority = ? ORDER BY exten
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 1 ('exten LIKE') = '\_%'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 2 ('context') = '-out'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:46:47] DEBUG[28126] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:46:47] DEBUG[28126] pbx.c: Function result is '(null)'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten = ? AND context = ? AND priority = ?
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 1 ('exten') = '101'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 2 ('context') = '-out'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:46:47] DEBUG[28126] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM asterisk.extensions WHERE exten LIKE ? AND context = ? AND priority = ? ORDER BY exten
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 1 ('exten LIKE') = '\_%'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 2 ('context') = '-out'
[Nov  7 05:46:47] DEBUG[28126] res_config_odbc.c: Parameter 3 ('priority') = '1'
[Nov  7 05:46:47] DEBUG[28126] res_odbc.c: odbc_release_obj2(0x2ac6fc00aea8) called (obj->txf = (nil))
                
> eswitch not substitute variables
> --------------------------------
>
>                 Key: ASTERISK-20589
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20589
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: PBX/General
>    Affects Versions: 1.8.16.0
>         Environment: OS: CentOS 5.5 x86_64
> Asterisk: Asterisk 1.8.16.0 x86_64
>            Reporter: sybasesql
>            Assignee: sybasesql
>
> eswitch not substitute variables (${CDR(accountcode)}=100 in this example):
> [out]
> eswitch => Realtime/${CDR(accountcode)}-out@
> and when I dialed 101 extension I got INCORRECT SQL in PostgreSQL (through odbc):
> LOG:  statement: SELECT * FROM asterisk.extensions WHERE exten = E'101' AND context = E'-out' AND priority = E'1'
> but if I add any function before eswitch calling variables substitution occured:
> [out]
> exten => _X.,1,NoOp(out)
> eswitch => Realtime/${CDR(accountcode)}-out@
> and when I dialed 101 extension I got CORRECT SQL in PostgreSQL (through odbc):
> LOG:  statement: SELECT * FROM asterisk.extensions WHERE exten = E'101' AND context = E'100-out' AND priority = E'2'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list