2

I try to migrate my project from asterisk-ami to SIP protocol. However, I couldn't find any examples to create outgoing call via jain sip. Some documentation mentions project sip-communicator but he is outdated.

About project: it's notification system via phone. It calls a person and after 2-3 calls interrupts the call. So I just need to call via astersik from my java code and interrupt the call.

Vladislav Kysliy
  • 3,488
  • 3
  • 32
  • 44

1 Answers1

4

JAIN-SIP is not a functionally comparable to asterisk-ami. However if you really just want to make an outbound call you can use this example which originates a call from sip:127.0.0.1:5060 to sip:127.0.0.1:5070.

Vladimir Ralev
  • 1,371
  • 9
  • 18
  • Thanks for your answer, but i can't find where i can set phone number – Vladislav Kysliy Jan 25 '17 at 11:38
  • Typically you should put he target number in the "To" user here https://github.com/usnistgov/jsip/blob/master/src/examples/simplecallsetup/Shootist.java#L267 but you have to know how your destination interprets the numbers beforehand. Similarly the "From" user is the caller's number for caller id. – Vladimir Ralev Jan 26 '17 at 09:55