3

I develop a software using Microsoft Unified Communications and c#. I'm using a IMVoipSample as a code base. As a voip backend i'm using asterisk. Everything fine, i can register, make calls, accept/reject incoming calls. There is a one thing that i cannot resolve.

while i make a call to a 3rd party softphone there is an answer from it:

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.250.29:5060;branch=z9hG4bK786d156c;rport=5060
Contact: <sip:6011@192.168.246.203:45134;rinstance=7af05ded7e7e49e6>
To: <sip:6011@192.168.246.203:45134;rinstance=7af05ded7e7e49e6>;tag=9a00d038
From: "6012"<sip:6012@192.168.250.29>;tag=as66995cd4
Call-ID: 7cebe5d1060b11452571a22e0e2cb919@192.168.250.29
CSeq: 102 INVITE
User-Agent: X-Lite release 1002tx stamp 29712
Content-Length: 0

But when i make a call to my IMVoipSample phone there is an aswer:

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.246.203:45134;branch=z9hG4bK-d87543-71570d1c6127bc7a-1--d87543-;received=192.168.246.203;rport=45134
From: "6011"<sip:6011@192.168.250.29>;tag=18345648
To: "6012"<sip:6012@192.168.250.29>
Call-ID: fd7f305d6520cd53YjQ2ZDJmMDAwZDE0YmUwMjRlMGFmM2NmODg5OGM1ODQ.
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.9-2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:6012@192.168.250.29>
Content-Length: 0

I have a samsung officeserv pbx, it is connected to asterisk, i can make calls to softphones and vice verca. But the audio difference of making calls to softphone and my IMVoipSample phone is there is no normal connecting beeps, only silence. I suppose it is because of "sip 100 trying" instead of "180 rinning". So the question is: do I need setup additional signalling of ringing in client?

Yuriy Vikulov
  • 2,469
  • 5
  • 25
  • 32
  • Interesting. Do the _3rd party softphone_ and _IMVoipSample_ both run on the same machine, using the same account? Just curious. Asterisk will not proceed without 180 Ringing. Try to play with `progressinband` parameter in `sip.conf` and see how that works. – Assaf Levy Mar 22 '11 at 08:16
  • yes, they are working on the same machine, futhermore the are 2 3rd party softphones on one machine for testing purposes. They are using different accounts also. I also tried to play with progressinband parameter. it does not matter for me. – Yuriy Vikulov Mar 22 '11 at 08:56

2 Answers2

8

1xx responses are informational responses and in the case of 100 Trying are optional. SIP User Agent Servers (UAS) will generally respond with a 100 Trying response immediately when they receive an INVITE request to let the User Agent Client (UAC) know they are processing the request and to avoid retransmits. At some time later they will follow the 100 Trying response with a 180 Ringing or 183 Session Progress. Once someone or something answers the call a 2xx response needs to be sent, typically 200 Ok.

If your softphone software is only generating a 100 Trying response and not the subsequent 180 Ringing response then my guess is you have missed a step. At the very least if the softphone has a problem and can't generate a ringing response because there is nothing to ring it should generate a 4xx error response.

sipsorcery
  • 30,273
  • 24
  • 104
  • 155
  • Is "180 Ringing" just a header? does it need real transmission of beeps? – Yuriy Vikulov Mar 22 '11 at 05:38
  • 180 Ringing is a response status code. It is mandatory for a SIP response but is not a header. As far as the beeps go the SIP layer has no part in producing them. In the case of a 180 response the device that receives it is responsible for generating the progress tones. In the case of a 183 Session Progress response the called device initiates an early media RTP stream to the calling device with whatever audio it wants played to indicate progress. – sipsorcery Mar 22 '11 at 09:28
0

Well, i solved my issue by explitic adding ringing in sip.conf of asterisk

exten => _6.,1,Ringing
exten => _6.,n,Dial(SIP/${EXTEN:0}).

but @sipwiz gave a detailed description of the source of problem

Yuriy Vikulov
  • 2,469
  • 5
  • 25
  • 32
  • ${EXTEN:0} is the same as ${EXTEN}. Also you should be careful at using that approach as you'll get a ringing indication no matter how the called device responds. For example if the called device is not reachable or offline then the caller will still get a false ringing indication. Generally it's recommended not to use an artificial ringing indication with Asterisk. – sipsorcery Mar 22 '11 at 09:31
  • Well, thanks for pointing ${EXTEN}, i didn't know. I've made a call to not logged app and there was "SIP/2.0 503 Service Unavailable". So it seems ok – Yuriy Vikulov Mar 22 '11 at 09:40