I have a problem with save node in cascade. I have a 3 #NodeEntity: Event, Tag, UserNeo. When I save next event, the previous relationship was deleted between user and events, and also between events and tag. Sometimes this relations are saved. I don't know what I doing wrong.
Neo4j dependency
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>4.2.0.BUILD-SNAPSHOT</version>
</dependency>
Event.java
#NodeEntity(label = "Event")
public class Event {
#GraphId
private Long id;
#Property(name = "title")
private String title;
#Property(name = "short_description")
private String shortDescription;
#Property(name = "long_description")
private String longDescription;
#Property(name = "address")
private String address;
#Property(name = "lat")
private double lat;
#Property(name = "lon")
private double lon;
#Property(name = "time")
#DateLong
private Date time;
#Property(name = "nuts")
private int nuts;
#Property(name = "created_by")
private String createdBy;
#Property(name = "created_date")
#DateLong
private Date createdDate;
#Property(name = "modified_by")
private String modifiedBy;
#Property(name = "modified_date")
#DateLong
private Date modifiedDate;
#Property(name = "deleted_date")
#DateLong
private Date deletedDate = null;
#Relationship(type = "TAGGED", direction = Relationship.OUTGOING)
private Set<Tag> tagSet = new HashSet<>();
#Relationship(type = "JOINED_IN", direction = Relationship.INCOMING)
private Set<UserNeo> joinedUsers = new HashSet<>();
#Relationship(type = "ORGANIZED", direction = Relationship.INCOMING)
private Set<UserNeo> organizedUsers;
// getters and setters
UserNeo.java
#NodeEntity(label = "User")
public class UserNeo {
#GraphId
private Long id;
#Property(name = "first_name")
private String firstName;
#Property(name = "last_name")
private String lastName;
#Property(name = "email")
private String email;
#Property(name = "vip")
private boolean vip;
#Property(name = "nuts")
private int nuts;
#Property(name = "current_lat")
private double currentLat;
#Property(name = "current_lon")
private double currentLon;
#Property(name = "created_date")
#DateLong
private Date createdDate;
#Property(name = "deleted_date")
#DateLong
private Date deletedDate;
#Relationship(type = "JOINED_IN", direction = Relationship.OUTGOING)
private List<Event> joinEvents;
#Relationship(type = "ORGANIZED", direction = Relationship.OUTGOING)
private List<Event> organizeEvents;
// getters and setters
Tag.java
#NodeEntity(label = "Tag")
public class Tag {
#GraphId
private Long id;
#Property(name = "tag")
private String tag;
#Relationship(type = "TAGGED", direction = Relationship.INCOMING)
private Set<Event> events = new HashSet<>();
// getters and setters
My service method to save nodes
public Event createEvent(EventDTO event){
Set<Tag> tags = new HashSet<>(event.getTagSet().size());
Iterator it = event.getTagSet().iterator();
while(it.hasNext()){
String tag = it.next().toString();
Tag resultTag = tagRepository.findByName(tag);
if(resultTag != null){
tags.add(resultTag);
}else {
Tag newTag = new Tag(tag);
newTag = tagRepository.save(newTag);
tags.add(newTag);
}
}
UserNeo userNeo = userNeoRepository.findByEmail("sunday1601#gmail.com");
Set<UserNeo> userNeos = new HashSet<>();
userNeos.add(userNeo);
Event createEvent = new `Event(event.getTitle(),event.getShortDescription(),event.getLongDescription(),`
event.getAddress(),event.getLat(),event.getLon(),event.getTime(),event.getNuts(),
event.getCreatedBy(), new Timestamp(new Date().getTime()),null,null);
createEvent.setTagSet(tags);
createEvent.setOrganizedUsers(userNeos);
Event save = eventRepository.save(createEvent);
return save;
}
When I save in short time, then delete previous relationship. And when I watch in neo4j browser I have a two the same event node.
This is log from jhipster
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : looking for concrete class to resolve label: User
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : concrete class found: com.mycompany.myapp.domain.UserNeo. comparing with what's already been found previously...
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : User resolving class: com.mycompany.myapp.domain.UserNeo
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.GraphEntityMapper : Unable to find property: address on class: com.mycompany.myapp.domain.UserNeo for writing
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($2108)-[:TAGGED]->($2098)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($2108)-[:TAGGED]->($2100)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context initialised with 3 relationships
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} has changed
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=2100, tag='Rock'} in one direction
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=2100, tag='Rock'}, has not changed
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (2100)<-[:TAGGED]-()
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1950378672:TAGGED]->(2100)
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=2098, tag='Festiwal'} in one direction
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=2098, tag='Festiwal'}, has not changed
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (2098)<-[:TAGGED]-()
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1648969869:TAGGED]->(2098)
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=3231, tag='Plaża'} in one direction
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=3231, tag='Plaża'}, has not changed
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3231)<-[:TAGGED]-()
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1054618601:TAGGED]->(3231)
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: ORGANIZED
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null} in one direction
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}, has not changed
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3153)-[:JOINED_IN]->()
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3153)-[:ORGANIZED]->()
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (3153)-[-1646367736:ORGANIZED]->(-250914077)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: JOINED_IN
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($3153)-[null:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing start node of: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($2108)-[null:TAGGED]->($2098)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($2108)-[:TAGGED]->($2098)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($2108)-[:TAGGED]->($2100)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($2108)-[null:TAGGED]->($2100)
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: beginTransaction()
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: Neo4jSession identity: org.neo4j.ogm.session.delegates.TransactionsDelegate#32786293
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: POST http://localhost:7474/db/data/transaction
2016-07-14 22:04:42.875 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction HTTP/1.1
2016-07-14 22:04:42.876 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 201 Created [Date: Thu, 14 Jul 2016 20:04:42 GMT, Location: http://localhost:7474/db/data/transaction/531, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 150, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 150,Chunked: false]}}
2016-07-14 22:04:42.881 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: {"commit":"http://localhost:7474/db/data/transaction/531/commit","results":[],"transaction":{"expires":"Thu, 14 Jul 2016 20:05:42 +0000"},"errors":[]}
2016-07-14 22:04:42.882 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: Connection released
2016-07-14 22:04:42.884 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: Transaction, tx id: org.neo4j.ogm.drivers.http.transaction.HttpTransaction#39e7461a
2016-07-14 22:04:42.884 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: request url http://localhost:7474/db/data/transaction/531
2016-07-14 22:04:42.884 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: request {"statements":[{"statement":"UNWIND {rows} as row CREATE (n:`Event`) SET n=row.props RETURN row.nodeRef as ref, ID(n) as id, row.type as type","parameters":{"rows":[{"nodeRef":-250914077,"type":"node","props":{"short_description":"Opis krotki short","deleted_date":0,"address":"address 5","nuts":17,"lon":20.957071,"created_date":1468526682863,"time":1497740854000,"long_description":"Opis długi long","title":"Event 47","created_by":"Michal Niedziela","lat":50.000452}}]},"resultDataContents":["row"],"includeStats":false}]}
2016-07-14 22:04:42.885 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531 HTTP/1.1
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 247, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 247,Chunked: false]}}
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.d.h.response.AbstractHttpResponse : Thread 41: Releasing HttpResponse
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to create: nodeEntity -250914077:2109
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: request url http://localhost:7474/db/data/transaction/531
2016-07-14 22:04:42.890 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: request {"statements":[{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MERGE (startNode)-[rel:`TAGGED`]->(endNode) RETURN row.relRef as ref, ID(rel) as id, row.type as type","parameters":{"rows":[{"startNodeId":2109,"relRef":-1054618601,"type":"rel","endNodeId":3231},{"startNodeId":2109,"relRef":-1648969869,"type":"rel","endNodeId":2098},{"startNodeId":2109,"relRef":-1950378672,"type":"rel","endNodeId":2100}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MERGE (startNode)-[rel:`ORGANIZED`]->(endNode) RETURN row.relRef as ref, ID(rel) as id, row.type as type","parameters":{"rows":[{"startNodeId":3153,"relRef":-1646367736,"type":"rel","endNodeId":2109}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MATCH (startNode)-[rel:`ORGANIZED`]->(endNode) DELETE rel","parameters":{"rows":[{"startNodeId":3153,"endNodeId":2108}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MATCH (startNode)-[rel:`TAGGED`]->(endNode) DELETE rel","parameters":{"rows":[{"startNodeId":2108,"endNodeId":2098},{"startNodeId":2108,"endNodeId":2100}]},"resultDataContents":["row"],"includeStats":false}]}
2016-07-14 22:04:42.891 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531 HTTP/1.1
2016-07-14 22:04:42.895 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 505, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 505,Chunked: false]}}
2016-07-14 22:04:42.895 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.d.h.response.AbstractHttpResponse : Thread 41: Releasing HttpResponse
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1054618601:461
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1648969869:462
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1950378672:463
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1646367736:464
2016-07-14 22:04:42.897 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531/commit HTTP/1.1
2016-07-14 22:04:42.908 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 26, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 26,Chunked: false]}}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: {"results":[],"errors":[]}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: Connection released
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.transaction.Transaction : Thread 41: Commit transaction extent: 0
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.transaction.Transaction : Thread 41: Committed
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : creating new node id: 2109
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] c.m.myapp.aop.logging.LoggingAspect : Exit: com.mycompany.myapp.service.EventService.createEvent() with result = Event{id=2109, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] c.m.myapp.aop.logging.LoggingAspect : Exit: com.mycompany.myapp.web.rest.EventResources.createEvent() with result = <200 OK,Event{id=2109, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]},{}>
When you add tags to the event, it looks like the Tag does not contain a reference back to the Event? This could be one of the reasons the event-tag relationships are deleted i.e. your object references inconsistent with what is expected in the graph.
In case you want to define relationship in only one of the entities, you may use Session.clear after saving of tag so that tag is not tracked by session and does not get automatically saved after change to event.
https://docs.spring.io/spring-data/neo4j/docs/5.0.0.M1/reference/html/#reference.architecture.session
I want to make app that let user to make calls over ip (VOIP).
I was following this tutorial http://www.xianwenchen.com/blog/2014/06/09/how-to-make-an-ios-voip-app-with-pjsip-part-1/
but now I want to register to global server like ekiga or linphone.org .
now this is my code written in C
#include "Pjsua.h"
#include <pjsua-lib/pjsua.h>
#define THIS_FILE "Pjsua.c"
static pjsua_acc_id acc_id;
const size_t MAX_SIP_ID_LENGTH = 50;
const size_t MAX_SIP_REG_URI_LENGTH = 50;
static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, pjsip_rx_data *rdata);
static void on_call_state(pjsua_call_id call_id, pjsip_event *e);
static void on_call_media_state(pjsua_call_id call_id);
static void error_exit(const char *title, pj_status_t status);
int startPjsip(char *sipUser, char* sipDomain)
{
pj_status_t status;
// Create pjsua first
status = pjsua_create();
if (status != PJ_SUCCESS) error_exit("Error in pjsua_create()", status);
// Init pjsua
{
// Init the config structure
pjsua_config cfg;
pjsua_config_default (&cfg);
cfg.cb.on_incoming_call = &on_incoming_call;
cfg.cb.on_call_media_state = &on_call_media_state;
cfg.cb.on_call_state = &on_call_state;
// Init the logging config structure
pjsua_logging_config log_cfg;
pjsua_logging_config_default(&log_cfg);
log_cfg.console_level = 5;
log_cfg.level = 5;
// Init the pjsua
status = pjsua_init(&cfg, &log_cfg, NULL);
if (status != PJ_SUCCESS) error_exit("Error in pjsua_init()", status);
}
// Add UDP transport.
{
// Init transport config structure
pjsua_transport_config cfg;
pjsua_transport_config_default(&cfg);
cfg.port = 5080;
// Add TCP transport.
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
if (status != PJ_SUCCESS) error_exit("Error creating transport udp", status);
}
// Add TCP transport.
{
// Init transport config structure
pjsua_transport_config cfg;
pjsua_transport_config_default(&cfg);
cfg.port = 5080;
// Add TCP transport.
status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, &cfg, NULL);
if (status != PJ_SUCCESS) error_exit("Error creating transport tcp", status);
}
// Initialization is done, now start pjsua
status = pjsua_start();
if (status != PJ_SUCCESS) error_exit("Error starting pjsua", status);
// Register the account on local sip server
{
pjsua_acc_config cfg;
pjsua_acc_config_default(&cfg);
cfg.id = pj_str((char *)"sip:exampleuser#sip.linphone.org");
cfg.reg_uri = pj_str((char *)"sip:sip.linphone.org");
cfg.proxy[0] = pj_str((char *)"sip:sip.linphone.org");
cfg.cred_count = 1;
cfg.cred_info[0].scheme = pj_str((char *)"digest");
cfg.cred_info[0].realm = pj_str((char *)"*");
cfg.cred_info[0].username = pj_str((char *)"exampleuser");
cfg.cred_info[0].data_type = 0;
cfg.cred_info[0].data = pj_str((char *)"examplepasswor");
status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);
if (status != PJ_SUCCESS) error_exit("Error adding account", status);
}
return 0;
}
/* Callback called by the library upon receiving incoming call */
static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
pjsip_rx_data *rdata)
{
pjsua_call_info ci;
PJ_UNUSED_ARG(acc_id);
PJ_UNUSED_ARG(rdata);
pjsua_call_get_info(call_id, &ci);
PJ_LOG(3,(THIS_FILE, "Incoming call from %.*s!!",
(int)ci.remote_info.slen,
ci.remote_info.ptr));
/* Automatically answer incoming calls with 200/OK */
pjsua_call_answer(call_id, 200, NULL, NULL);
}
/* Callback called by the library when call's state has changed */
static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
{
pjsua_call_info ci;
PJ_UNUSED_ARG(e);
pjsua_call_get_info(call_id, &ci);
PJ_LOG(3,(THIS_FILE, "Call %d state=%.*s", call_id,
(int)ci.state_text.slen,
ci.state_text.ptr));
}
/* Callback called by the library when call's media state has changed */
static void on_call_media_state(pjsua_call_id call_id)
{
pjsua_call_info ci;
pjsua_call_get_info(call_id, &ci);
if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
// When media is active, connect call to sound device.
pjsua_conf_connect(ci.conf_slot, 0);
pjsua_conf_connect(0, ci.conf_slot);
}
}
/* Display error and exit application */
static void error_exit(const char *title, pj_status_t status)
{
pjsua_perror(THIS_FILE, title, status);
pjsua_destroy();
exit(1);
}
void makeCall(char* destUri)
{
pj_status_t status;
pj_str_t uri = pj_str(destUri);
status = pjsua_call_make_call(acc_id, &uri, 0, NULL, NULL, NULL);
if (status != PJ_SUCCESS) error_exit("Error making call", status);
}
void endCall()
{
pjsua_call_hangup_all();
}
display request time out error .
12:41:02.521 os_core_unix.c !pjlib 2.3 for POSIX initialized
12:41:02.524 sip_endpoint.c .Creating endpoint instance...
12:41:02.528 pjlib .select() I/O Queue created (0x7db49148)
12:41:02.528 sip_endpoint.c .Module "mod-msg-print" registered
12:41:02.528 sip_transport. .Transport manager created.
12:41:02.528 pjsua_core.c .PJSUA state changed: NULL --> CREATED
12:41:02.531 sip_endpoint.c .Module "mod-pjsua-log" registered
12:41:02.531 sip_endpoint.c .Module "mod-tsx-layer" registered
12:41:02.532 sip_endpoint.c .Module "mod-stateful-util" registered
12:41:02.532 sip_endpoint.c .Module "mod-ua" registered
12:41:02.533 sip_endpoint.c .Module "mod-100rel" registered
12:41:02.533 sip_endpoint.c .Module "mod-pjsua" registered
12:41:02.533 sip_endpoint.c .Module "mod-invite" registered
12:41:02.584 coreaudio_dev. .. dev_id 0: iPhone IO device (in=1, out=1) 8000Hz
12:41:02.584 coreaudio_dev. ..core audio initialized
12:41:02.584 pjlib ..select() I/O Queue created (0x7cb38a14)
12:41:02.595 sip_endpoint.c .Module "mod-evsub" registered
12:41:02.595 sip_endpoint.c .Module "mod-presence" registered
12:41:02.595 sip_endpoint.c .Module "mod-mwi" registered
12:41:02.609 sip_endpoint.c .Module "mod-refer" registered
12:41:02.609 sip_endpoint.c .Module "mod-pjsua-pres" registered
12:41:02.609 sip_endpoint.c .Module "mod-pjsua-im" registered
12:41:02.609 sip_endpoint.c .Module "mod-pjsua-options" registered
12:41:02.609 pjsua_core.c .1 SIP worker threads created
12:41:02.609 pjsua_core.c .pjsua version 2.3 for Darwin-15.2/x86_64 initialized
12:41:02.609 pjsua_core.c .PJSUA state changed: CREATED --> INIT
12:41:02.610 pjsua_core.c SIP UDP socket reachable at 192.168.1.4:5080
12:41:02.610 udp0x7e33de00 SIP UDP transport started, published address is 192.168.1.4:5080
12:41:02.610 pjsua_core.c PJSUA state changed: INIT --> STARTING
12:41:02.610 sip_endpoint.c .Module "mod-unsolicited-mwi" registered
12:41:02.610 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING
12:41:02.610 pjsua_acc.c Adding account: id=sip:eslamhanafy#sip.linphone.org
12:41:02.610 pjsua_acc.c .Account sip:eslamhanafy#sip.linphone.org added with id 0
12:41:02.662 pjsua_acc.c .Acc 0: setting registration..
12:41:03.011 pjsua_core.c ...TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:03.012 pjsua_acc.c ..Acc 0: Registration sent
12:41:03.012 pjsua_call.c Making call with acc #0 to sip:485501406065403210#sip.linphone.org
12:41:03.013 pjsua_aud.c .Set sound device: capture=-1, playback=-2
12:41:03.014 pjsua_aud.c ..Opening sound device PCM#16000/1/20ms
12:41:03.014 coreaudio_dev. ...Using VoiceProcessingIO audio unit
12:41:03.082 coreaudio_dev. ...core audio stream started
12:41:03.082 pjsua_media.c .Call 0: initializing media..
12:41:03.083 pjsua_media.c ..RTP socket reachable at 192.168.1.4:4000
12:41:03.083 pjsua_media.c ..RTCP socket reachable at 192.168.1.4:4001
12:41:03.083 pjsua_media.c ..Media index 0 selected for audio call 0
12:41:03.084 pjsua_core.c ....TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
done
done
12:41:03.100 os_core_unix.c !Info: possibly re-registering existing thread
12:41:03.512 pjsua_core.c !.TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:03.585 pjsua_core.c .TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
12:41:04.513 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:04.585 pjsua_core.c .TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
12:41:06.515 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:10.515 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:10.585 pjsua_core.c .TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
12:41:14.515 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:18.518 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:18.588 pjsua_core.c .TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
12:41:22.520 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:26.520 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:30.524 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:34.525 pjsua_core.c .TX 513 bytes Request msg REGISTER/cseq=61350 (tdta0x7db55800) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjEqa4bpBzv-vnExngLtmsuk5iwICWQ6nq
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=6tsmpbE3RQMQYGV3V4umeMM.U78z5CLt
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: OMZHw0Zs5Yz7Yjn8qZGr3Oiy2ELIHUh2
CSeq: 61350 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
--end msg--
12:41:34.588 pjsua_core.c .TX 1079 bytes Request msg INVITE/cseq=5147 (tdta0x7db57000) to UDP 91.121.209.194:5060:
INVITE sip:485501406065403210#sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwaxGhboJCF8WhuS7G6UQqXVwps0Qo3na
Max-Forwards: 70
From: sip:eslamhanafy#sip.linphone.org;tag=yRJayafQCC9ApjtJuF8-NtAmY8PquMXt
To: sip:485501406065403210#sip.linphone.org
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Call-ID: FScQI.ot3zfH6qdPis4.zQUw4g.yzDun
CSeq: 5147 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 446
v=0
o=- 3662793663 3662793663 IN IP4 192.168.1.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 96
c=IN IP4 192.168.1.4
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.4
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
12:41:35.015 pjsua_acc.c ...SIP registration failed, status=408 (Request Timeout)
12:41:35.015 pjsua_acc.c ...Scheduling re-registration retry for acc 0 in 6 seconds..
12:41:35.086 pjsua_media.c ....Call 0: deinitializing media..
12:41:36.087 pjsua_aud.c Closing sound device after idle for 1 second(s)
12:41:36.088 pjsua_aud.c .Closing iPhone IO device sound playback device and iPhone IO device sound capture device
12:41:36.097 coreaudio_dev. .core audio stream stopped
12:41:41.818 pjsua_acc.c Acc 0: setting registration..
12:41:41.820 pjsua_core.c ..TX 513 bytes Request msg REGISTER/cseq=57441 (tdta0x7e343400) to UDP 91.121.209.194:5060:
REGISTER sip:sip.linphone.org SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5080;rport;branch=z9hG4bKPjwqokNHR5QxIsPICaadyURijMJCPYMq0s
Max-Forwards: 70
From: <sip:eslamhanafy#sip.linphone.org>;tag=j5fAFvbb3pMEy4jUSE8Mvx4OdSl0LR.I
To: <sip:eslamhanafy#sip.linphone.org>
Call-ID: J4IpT-HlM8wWISM6NHokczyuNpJBZ5i.
CSeq: 57441 REGISTER
Contact: <sip:eslamhanafy#192.168.1.4:5080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
please any help.
Checking your log I find that you already have an process running on your phone that is already bind at the target UDP port.
15:47:04.750 Pjsua.c : Error creating transport UDP: Address already in use [status=120048]
This line shows that your App cannot allocate the network resource.
Solution 1: Try to reboot your iOS and/or kill all apps related with SIP;
Solution 2: If possible change the UDP port cfg.port = 5080;