cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2455
Views
0
Helpful
7
Replies

Sandbox xsi-events subscription not found

aluxmore
Level 1
Level 1

When I use the sandbox to create a subscription such as uri:

 

http://broadsoftsandboxxsp.cisco.com/com.broadsoft.xsi-events/v2.0/user/<<user information>>

where <<user information>> is the actual information established when I created the lab with body:

<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
    <event>Advanced Call</event>
    <expires>3600</expires>
    <httpContact>
        <uri><<my active endpoint>></uri>
    </httpContact>
    <applicationId>MyApplicationName</applicationId>
</Subscription>

(where <<my active endpoint>> is an actual uri that is publicly accessible and listening for POST requests) I get a response very much like:

<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
    <subscriptionId><<my id>></subscriptionId>
    <expires>3600</expires>
</Subscription>

Where <<my id>> is an id.  However, not only does my endpoint never register a request, but further requests to uri:

http://broadsoftsandboxxsp.cisco.com/com.broadsoft.xsi-events/v2.0/subscription/<<my id>>

give me this result:

<?xml version="1.0" encoding="UTF-8"?>
<ErrorInfo xmlns="http://schema.broadsoft.com/xsi">
    <summary>Subscription id <<my id>> not found</summary>
    <summaryEnglish>Subscription id <<my id>> not found</summaryEnglish>
    <errorCode>110862</errorCode>
</ErrorInfo>

Is this a known problem with the sandbox, or am I doing something wrong?  All requests are made with basic auth using the users' information established when the sandbox was created.

1 Accepted Solution

Accepted Solutions

Thanks @simonbrinkmann you put me on the right track.  It appears that the subscription doesn't work if the httpContact uri does not have a path (ie just has a host).  For instance, I can get it to work when I specify https://12345abc.ngrok.io/api as the endpoint, but not https://12345abc.ngrok.io.  Not sure if this is intended behaviour, but at any rate it works now.  Thanks.

View solution in original post

7 Replies 7

simonbrinkmann
Level 1
Level 1

Hi. 

Looks like we're trying to achive som common goals here.

I managed to create a subscription for a user, receive the first xsi:event at the HttpContact and also successfully query the subscription endpoint. (Like you I've previously got 404 Not Found in return.) 

Problem: I only receive the initial event at the HttpContact. No further events are received at HttpContact-endpoint when I make some test-calls.

Hopefully some admin here will tell us if the system has been set up correctly and functionallity verified.

 

@ zowu & @skumar1 : Do you have any insight on this.

 

A summary of the partial success today:

Create Subscription

POST /com.broadsoft.xsi-events/v2.0/user/u123456789@broadsoftlab.com HTTP/1.1
Host: broadsoftsandboxxsp.cisco.com
Content-Type: application/xml; charset=UTF-8
Authorization: Basic cauthEyMw==

<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
	<event>Basic Call</event>
	<expires>3600</expires>
	<httpContact><uri>https://lskdjflksdj.ngrok.io/api/values</uri></httpContact>
	<applicationId>MyTestApplication1</applicationId>
</Subscription>

Response:
Create Subscription Response:
<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
    <subscriptionId>39c2a0b9-4d18-42a9-b556-71e8d09a97d3</subscriptionId>
    <expires>3600</expires>
</Subscription>
Received at HttpContact:

<?xml version="1.0" encoding="UTF-8"?>
<xsi:Event xmlns:xsi="http://schema.broadsoft.com/xsi" xmlns:xsi1="http://www.w3.org/2001/XMLSchema-instance" xsi1:type="xsi:SubscriptionEvent"> <xsi:eventID>a720c0cc-daeb-4ceb-b6c6-2afd1b8730e7</xsi:eventID> <xsi:sequenceNumber>1</xsi:sequenceNumber> <xsi:userId>u123456789@broadsoftlab.com</xsi:userId> <xsi:externalApplicationId>MyTestApplication1</xsi:externalApplicationId> <xsi:subscriptionId>39c2a0b9-4d18-42a9-b556-71e8d09a97d3</xsi:subscriptionId> <xsi:httpContact> <xsi:uri>https://djhgfjhgf.ngrok.io/api/values</xsi:uri> </xsi:httpContact> <xsi:eventData xsi1:type="xsi:CallSubscriptionEvent"> <xsi:hookStatus>On-Hook</xsi:hookStatus> </xsi:eventData> </xsi:Event>

Querying Subscription Request:

GET /com.broadsoft.xsi-events/v2.0/subscription/39c2a0b9-4d18-42a9-b556-71e8d09a97d3 HTTP/1.1
Host: broadsoftsandboxxsp.cisco.com
Content-Type: application/xml; charset=UTF-8
Authorization: Basic dauth=

Querying Subscription Response:

<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
    <subscriptionId>39c2a0b9-4d18-42a9-b556-71e8d09a97d3</subscriptionId>
    <subscriberId>u123456789@broadsoftlab.com</subscriberId>
    <targetIdType>User</targetIdType>
    <targetId>u123456789@broadsoftlab.com</targetId>
    <event>Basic Call</event>
    <expires>3380</expires>
    <httpContact>
        <uri>https://adsfs.ngrok.io/api/values</uri>
    </httpContact>
    <applicationId>MyTestApplication1</applicationId>
</Subscription>

 Requesting the active call using xsi-actions returns an empty list even though I have an active call

GET /com.broadsoft.xsi-actions/v2.0/user/u123456789@broadsoftlab.com/calls HTTP/1.1
Host: broadsoftsandboxxsp.cisco.com
Content-Type: application/xml; charset=UTF-8
Authorization: Basic auth=

Response:

<?xml version="1.0" encoding="UTF-8"?>
<Calls xmlns="http://schema.broadsoft.com/xsi"/>

 

I am investigating the reported issue, will keep you posted.

@skumar1I found the problem. 

 

The reason I was only receiving the initial request was because I had tried to add more services to the user I was subscribing to. I did this early in the process because I didn't get it to work and thought that I had to manually configure services to make call events work. 

When I re-tested with a user with default sandbox configuration I received the events.

 



 

@aluxmore : I experienced the problem with the missing subscription today because my httpcontact endpoint did not respond correctly. It seems like the subscription is immediately terminated in that case resulting in Not Found.

Thanks @simonbrinkmann you put me on the right track.  It appears that the subscription doesn't work if the httpContact uri does not have a path (ie just has a host).  For instance, I can get it to work when I specify https://12345abc.ngrok.io/api as the endpoint, but not https://12345abc.ngrok.io.  Not sure if this is intended behaviour, but at any rate it works now.  Thanks.

@aluxmore : I just testet and I find the same as you. I just didn't see this because I happened to have two path segments in my httpcontact. 

It looks like Jakarta compensates for our ignorance by inserting some helpfull nulls :-) This is probably going to save me some time later when we start deploying!

If you had appended a front-slash you would have seen the SubscriptionTerminatedEvent in the ngrok-inspect or whatever tool you use for webhooks.

 

Suggest you mark your own reply as answer to this thread.

 

POST /null/null HTTP/1.1
Host: localhost
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 634
Content-Type: application/xml; charset=UTF-8
X-Forwarded-For: 64.103.37.40
X-Forwarded-Proto: https
X-Original-Host: 377dbcc4.ngrok.io

 

Path segmentsResult subscription request
No front-slashNo event received
/
POST /null/null HTTP/1.1
/1st
POST /1st/null HTTP/1.1
/1st/2nd
POST /1st/2nd HTTP/1.1
/1st/2nd/3rd
POST /1st/2nd/3rd HTTP/1.1

 

It's a;ways recommended to assign the required services. Additional/services may interrupt the message flows.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: