Hi there, we need to do next thing - integrate Asterisk certified/13.8-cert4 with kamailio 4.4 presence module.
What we need - to have actual state of all Asterisk’s extensions in database for easy access from external applications\services.
What we have - Asterisk certified/13.8-cert4 with PJSIP 2.3 and realtime config in PostgreSQL. And Kamailio server 4.4.5 with own MySQL db.
In Asterisk pjsip.conf :
[kamailio-devicestate]
type=outbound-publish
server_uri=sip:10.10.10.10
event=asterisk-devicestate
Here SIP message that actually send Asterisk towards kamailio:
The example config didn’t work at all. The only one working conf is in first message.
All required modules
res_pjsip.so: Core of PJSIP code in Asterisk.
res_pjsip_pubsub.so: The code that implements SUBSCRIBE/NOTIFY logic, on which individual event handlers are built.
res_pjsip_exten_state.so: Handles the “presence” and “dialog” events.
res_pjsip_pidf_body_generator.so: This module generates application/pidf+xml message bodies. Required for most subscriptions to the “presence” event.
res_pjsip_xpidf_body_generator.so: This module generates application/xpidf+xml message bodies. Required for some subscriptions to the “presence” event.
res_pjsip_dialog_info_body_generator.so: Required for subscriptions to the “dialog” event. This module generates application/dialog-info message bodies.
are loaded.
Main issue from my point of view- Asterisk sends PUBLISH message in only one format application/json and I can/t change this
Define “didn’t work at all”. Was anything output at startup? Did the configuration load? The exact configuration on the wiki is what I used against Kamailio when doing testing. Did you turn on auto hints? Did you specify any context/extension filtering?
ERROR[1066]: config_options.c:715 aco_process_var: Could not find option suitable for category 'test-esc' named 'multi_user' at line 150 of
ERROR[1066]: res_sorcery_config.c:318 sorcery_config_internal_load: Could not create an object of type 'outbound-publish' with id 'test-esc' from configuration file
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [5] in [-2147483648, 2147483647] gives [5](0)
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [3600] in [-2147483648, 2147483647] gives [3600](0)
ERROR[1066]: config_options.c:715 aco_process_var: Could not find option suitable for category 'test-esc2' named 'multi_user' at line 159 of
ERROR[1066]: res_sorcery_config.c:318 sorcery_config_internal_load: Could not create an object of type 'outbound-publish' with id 'test-esc2' from configuration file
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [5] in [-2147483648, 2147483647] gives [5](0)
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [3600] in [-2147483648, 2147483647] gives [3600](0)
ERROR[1066]: config_options.c:715 aco_process_var: Could not find option suitable for category 'test-esc3' named 'multi_user' at line 168 of
ERROR[1066]: res_sorcery_config.c:318 sorcery_config_internal_load: Could not create an object of type 'outbound-publish' with id 'test-esc3' from configuration file
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [5] in [-2147483648, 2147483647] gives [5](0)
DEBUG[1066]: config.c:3564 ast_parse_arg: extract int from [3600] in [-2147483648, 2147483647] gives [3600](0)
ERROR[1066]: config_options.c:715 aco_process_var: Could not find option suitable for category 'test-esc4' named 'multi_user' at line 177 of
ERROR[1066]: res_sorcery_config.c:318 sorcery_config_internal_load: Could not create an object of type 'outbound-publish' with id 'test-esc4' from configuration file
Auto hints is on in extensions.conf -both in [globals] and [from-internal] contexts.
Asterisk 13 allows the exchange of device state and MWI information between Asterisk instances using an Asterisk specific JSON payload that you saw previously. It doesn’t allow using the standard body types such as application/xpidf+xml.
hi, i just want a clarify with this: i connect phones to asterisk directly and phones show status BLF correclty but when i setup kamailio presence module does not work property! why?
@jcolp said that Asterisk 13 allows the exchange of device state and MWI information between Asterisk instances using an Asterisk specific JSON payload BUT that means i cannot do if i have kamailio integrated in realtime with asterisk 13? why then if i setup phones directly with asterisk the BLF works?