<div dir="ltr">hi Bill,<div>The json body you send has to correspond with your SIP SUBSCRIBE data (active_watchers table)</div><div>I'd be happy help out if you want to send me some data from your active_watchers table.</div><div>Thanks,</div><div>E</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2019 at 12:50 PM Henning Westerholt <<a href="mailto:hw@skalatan.de">hw@skalatan.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Bill,<br>
<br>
(please keep the list in CC)<br>
<br>
yes, this seems to be the case. Just looked briefly to the code, it does <br>
an assignment in some cases. E.g. if no Presentity* data is given it <br>
will just use the From* information. And then it should later output an <br>
error from pua_json_update_presentity(..) if there is not the necessary <br>
data. Do you see any error message like this?<br>
<br>
Another idea - does it works if you add more "missing" data in the curl <br>
requests?<br>
<br>
Cheers,<br>
<br>
Henning<br>
<br>
<br>
Am 28.08.19 um 21:16 schrieb <a href="mailto:bill@novatrope.us" target="_blank">bill@novatrope.us</a>:<br>
> Henning: Good point.<br>
><br>
> I do see a number of errors in the log. It looks like the json routine <br>
> is looking for data that is not in the http query as specified by the <br>
> author.<br>
><br>
><br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Event-Name: [update]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Event-Package: [dialog]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [Presentity]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Presentity: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [Presentity-User]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Presentity-User: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [Presentity-Realm]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Presentity-Realm: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): From: <br>
> [sip:1020101@<IP of phone>]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> From-User: [1020101]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> From-Realm: [<IP of phone>]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [From-URI]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> From-URI: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To: <br>
> [sip:1020108@<IP of server>:50060]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> To-User: [1020108]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [To-URI]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To-URI: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Call-ID: [1020101@<IP of phone>]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [From-Tag]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> From-Tag: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [To-Tag]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To-Tag: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c <br>
> error - failed to extract field [Direction]<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): <br>
> Direction: []<br>
> 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): State: <br>
> [Confirmed]<br>
> 17(125579) DEBUG: presence [event_list.c:348]: search_event(): start <br>
> event= [dialog/5]<br>
><br>
> On 8/28/19 12:00 PM, Henning Westerholt wrote:<br>
>> Hello Bill,<br>
>><br>
>> just giving some generic debug pointers here:<br>
>><br>
>> - do you see any errors in the kamailio log file?<br>
>><br>
>> - do you see any SIP traffic (e.g. by observing with ngrep, wireshark<br>
>> etc..) to the phone after your curl command?<br>
>><br>
>> Cheers,<br>
>><br>
>> Henning<br>
>><br>
>> Am 28.08.19 um 19:04 schrieb <a href="mailto:bill@novatrope.us" target="_blank">bill@novatrope.us</a>:<br>
>>> Hi all:<br>
>>><br>
>>> I am trying to use the procedure for setting BLF lights described in<br>
>>> <a href="https://blog.voipxswitch.com/2018/02/22/kamailio-controlling-presence-with-new-module-pua_json/#comment-587" rel="noreferrer" target="_blank">https://blog.voipxswitch.com/2018/02/22/kamailio-controlling-presence-with-new-module-pua_json/#comment-587</a> <br>
>>><br>
>>><br>
>>> WIthout success.<br>
>>><br>
>>> My configuration is 1 Grandstream GXP2130 phone behind a NAT on a<br>
>>> public IP. (IPP in example below)<br>
>>><br>
>>> Kamailio is running on public IP (IPK in example) listening on port <br>
>>> 50060<br>
>>><br>
>>> The command I am sending:<br>
>>><br>
>>> curl -d<br>
>>> '{"Call-ID":"1020101@<IPP>","Event-Category":"presence","Event-Name":"update","Event-Package":"dialog","Expires":"3600","To":"sip:1020108@<IPK>:50060","To-User":"1020108","To-Realm":"<IPK>:50060","From":"sip:1020101@<IPP>","From-User":"1020101","From-Realm":"<IPP>","State":"Confirmed"}' <br>
>>><br>
>>> <a href="http://localhost:8080/presence/" rel="noreferrer" target="_blank">http://localhost:8080/presence/</a><br>
>>> {"Call-ID":"1020101@<IPP>","Event-Category":"presence","Event-Name":"update","Event-Package":"dialog","Expires":"3600","To":"sip:1020108@<IPK>:50060","To-User":"1020108","To-Realm":"<IPK>:50060","From":"sip:1020101@<IPP>","From-User":"1020101","From-Realm":"<IPP>","State":"Confirmed"} <br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Kamailio appears to be processing the command OK, so I think I am just<br>
>>> not setting it up properly><br>
>>><br>
>>> Anybody having any luck with this procedure, let me know how you are<br>
>>> getting it to work.<br>
>>><br>
>>><br>
>>> Bill<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Kamailio (SER) - Users Mailing List<br>
>>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Henning Westerholt - <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
Kamailio services - <a href="https://skalatan.de/services" rel="noreferrer" target="_blank">https://skalatan.de/services</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>