[asterisk-bugs] [JIRA] (ASTERISK-21315) Asterisk Realtime using res_config_mysql not recognizing port field for SIP peers
Walter Doekes (JIRA)
noreply at issues.asterisk.org
Thu May 23 03:04:01 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-21315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=206732#comment-206732 ]
Walter Doekes commented on ASTERISK-21315:
------------------------------------------
I edited that. It's now uglier but less wrong.
The sipregs table is a good idea. Having a writable table separate from the readonly details is good.
Unfortunately due to the database abstraction layer in asterisk (no joins), a decent implementation is impossible. It caused lots of extra queries and complexity (and bugs).
Therefore it's usage is discouraged.
However, some people *do* have readonly details. In that case the recommended solution is to make a writable VIEW that joins the writable sipregs' and readonly sipusers' into a writable sipusers view. I.e. the database takes care of the necessary join and asterisk only needs to worry about a single table (sipusers).
> Asterisk Realtime using res_config_mysql not recognizing port field for SIP peers
> ---------------------------------------------------------------------------------
>
> Key: ASTERISK-21315
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-21315
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Addons/res_config_mysql, PBX/pbx_realtime
> Affects Versions: 1.8.20.1
> Environment: MySQL: Server version: 5.1.67-log Source distribution
> CentOS release 6.4 (Final)
> Asterisk 1.8.20.1 built by root @ distro-el6.asterroid.com on a x86_64 running Linux on 2013-03-13 10:10:51 UTC
> Reporter: Eugene Voityuk
> Severity: Minor
>
> So basicly, i have MySQL database to which my asterisk is connected, all works fine, for example i am creating trunk and it is workable, but the "port" option always load 5060(default value), even if i specify there another. from file everything works fine.
> [edit by Rusty Newton - adding reproduction info from reporters comment below]
> {quote}
> You need to have mysql table(sip_users), with all fields, in column port setup default value 5060, then create sip peer with port setuped to 5068(for example), in extconfig.conf write:
> sipusers => mysql,pbxconf,sip_users
> sippeers => mysql,pbxconf,sip_users
> reload configuration, peer will become visible, but the port will be set to 5060 not the one that you have for the peer.
> If i am using sip.conf instead of DB it's works just fine, but i need DB.
> No this is not the bindport in sip.conf
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list