[asterisk-bugs] [JIRA] (ASTERISK-24811) asterisk-publication sorcery object does not use realtime
Matt Hoskins (JIRA)
noreply at issues.asterisk.org
Thu Feb 19 12:17:34 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225005#comment-225005 ]
Matt Hoskins edited comment on ASTERISK-24811 at 2/19/15 12:15 PM:
-------------------------------------------------------------------
Sure, no problem.
The intended configuration is this:
{code:title=/etc/asterisk/sorcery.conf}
[res_pjsip_publish_asterisk]
asterisk-publication=realtime,ps_asterisk_publication
{code}
{code:title=/etc/asterisk/extconfinf.conf}
ps_asterisk_publication => odbc,asterisk-realtime
{code}
{code:title=/etc/asterisk/res_odbc.conf}
[asterisk-realtime]
enabled => yes
dsn => asterisk-realtime-connector
pooling => yes
limit => 5
pre-connect => yes
{code}
With a mysql table with the following configuration:
{code:sql}
CREATE TABLE `ps_asterisk_publication` (
`id` varchar(80) NOT NULL,
`devicestate_publish` varchar(40) DEFAULT NULL,
`mailboxstate_publish` varchar(40) DEFAULT NULL,
`device_state` enum('yes','no') DEFAULT 'no',
`mailbox_state` enum('yes','no') NOT NULL DEFAULT 'no',
`device_state_filter` varchar(80) DEFAULT NULL,
`mailbox_state_filter` varchar(80) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
{code}
With that configuration, When a SIP PUBLISH command is sent, asterisk responds with a 404 NOT FOUND:
<--- Received SIP request (582 bytes) from UDP:10.160.212.103:5060 --->
PUBLISH sip:dev-ast-voicemail at dev-ast-ep1.npgco.com SIP/2.0
Via: SIP/2.0/UDP 10.160.212.103:5060;rport;branch=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
From: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=2a727827-f518-408c-b6e5-809cc1ef4cab
To: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>
Call-ID: 5e11ae28-7cfd-4e8d-8d4e-970cfcb843a0
CSeq: 55987 PUBLISH
Event: asterisk-devicestate
Expires: 3600
Content-Type: application/json
Content-Length: 110
{"cachable":1,"device":"PJSIP/dev-ast-ep1","type":"devicestate","state":"NOT_INUSE","eid":"08:00:27:06:97:2c"}
<--- Transmitting SIP response (434 bytes) to UDP:10.160.212.103:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.160.212.103:5060;rport=5060;received=10.160.212.103;branch=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
Call-ID: 5e11ae28-7cfd-4e8d-8d4e-970cfcb843a0
From: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=2a727827-f518-408c-b6e5-809cc1ef4cab
To: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
CSeq: 55987 PUBLISH
Content-Length: 0
However, if I use the attached patch, I receive a 200 OK and the devicestate and mwi are processed properly
was (Author: mhoskins):
Sure, no problem.
The intended configuration is this:
{code:title=/etc/asterisk/sorcery.conf}
[res_pjsip_outbound_publish]
outbound-publish=realtime,ps_outbound_publish}}
{code}
{code:title=/etc/asterisk/extconfinf.conf}
ps_asterisk_publication => odbc,asterisk-realtime
{code}
{code:title=/etc/asterisk/res_odbc.conf}
[asterisk-realtime]
enabled => yes
dsn => asterisk-realtime-connector
pooling => yes
limit => 5
pre-connect => yes
{code}
With a mysql table with the following configuration:
{code:sql}
CREATE TABLE `ps_asterisk_publication` (
`id` varchar(80) NOT NULL,
`devicestate_publish` varchar(40) DEFAULT NULL,
`mailboxstate_publish` varchar(40) DEFAULT NULL,
`device_state` enum('yes','no') DEFAULT 'no',
`mailbox_state` enum('yes','no') NOT NULL DEFAULT 'no',
`device_state_filter` varchar(80) DEFAULT NULL,
`mailbox_state_filter` varchar(80) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
{code}
With that configuration, When a SIP PUBLISH command is sent, asterisk responds with a 404 NOT FOUND:
<--- Received SIP request (582 bytes) from UDP:10.160.212.103:5060 --->
PUBLISH sip:dev-ast-voicemail at dev-ast-ep1.npgco.com SIP/2.0
Via: SIP/2.0/UDP 10.160.212.103:5060;rport;branch=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
From: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=2a727827-f518-408c-b6e5-809cc1ef4cab
To: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>
Call-ID: 5e11ae28-7cfd-4e8d-8d4e-970cfcb843a0
CSeq: 55987 PUBLISH
Event: asterisk-devicestate
Expires: 3600
Content-Type: application/json
Content-Length: 110
{"cachable":1,"device":"PJSIP/dev-ast-ep1","type":"devicestate","state":"NOT_INUSE","eid":"08:00:27:06:97:2c"}
<--- Transmitting SIP response (434 bytes) to UDP:10.160.212.103:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.160.212.103:5060;rport=5060;received=10.160.212.103;branch=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
Call-ID: 5e11ae28-7cfd-4e8d-8d4e-970cfcb843a0
From: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=2a727827-f518-408c-b6e5-809cc1ef4cab
To: <sip:dev-ast-voicemail at dev-ast-ep1.npgco.com>;tag=z9hG4bKPj97dca5b7-d4cf-46eb-9a3e-f8f66396adcb
CSeq: 55987 PUBLISH
Content-Length: 0
However, if I use the attached patch, I receive a 200 OK and the devicestate and mwi are processed properly
> asterisk-publication sorcery object does not use realtime
> ---------------------------------------------------------
>
> Key: ASTERISK-24811
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24811
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Resources/res_pjsip_publish_asterisk
> Affects Versions: 13.2.0
> Environment: ubuntu64 14.04
> Reporter: Matt Hoskins
> Assignee: Matt Hoskins
> Attachments: res_pjsip_publish_asterisk.c.patch
>
>
> When configuring res_pjsip_publish_asterisk to use realtime in sorcery.conf, the module continues to use pjsip.conf. The expected behavior is to use the realtime system, defined in extconfig.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list