[Freeswitch-dev] Need some info about FreeSWITCH

Евгений Золотов zolotov at altron.ua
Wed Aug 27 10:33:54 EDT 2008


We have one more problem:

Step1. FreeSWITCH is started on 192.168.2.108 at sip default profile 
/usr/local/freeswitch/conf/sip_profiles/default.xml
We remove mandatory registration of  UA: <param name="auth-calls" 
value="false"/>

Step 2. Creating at /usr/local/freeswitch/conf/dialplan/extensions
$ touch 2xxx.xml

and adding extension:

<extension name="20081">
  <condition field="destination_number" expression="^20081$" >
    <action application="set" data="bypass_media=true" />
    <action application="set" data="hangup_after_bridge=true" />
    <action application="set" data="call_timeout=100" />
    <action application="bridge" data="sofia/default/20081 at localhost:5062" 
/>
    <action application="sleep" data="1000" />
  </condition>
</extension>

<extension name="20082">
  <condition field="destination_number" expression="^20082$" >
    <action application="set" data="bypass_media=true" />
    <action application="set" data="hangup_after_bridge=true" />
    <action application="set" data="call_timeout=100" />
    <action application="bridge" 
data="sofia/default/20082 at 192.168.2.107:5062" />
    <action application="sleep" data="1000" />
  </condition>
</extension>


> reloadxml


Step 3.  We start two equal SIPp UA on 192.168.2.108 (with FreeSWITCH ) and 
on 192.168.2.107 in a server mode (waiting for SIP calls):
$ ./sipp -sn uas -p 5062

We'll start calling SIPp UA ( in a client mode ) to both waiting for call 
UAs on 192.168.2.107:
$ ./sipp -sn uac -s 20081 -m 1 -d 400 192.168.2.108
$ ./sipp -sn uac -s 20082 -m 1 -d 400 192.168.2.108


====================================================================

$ ./sipp -sn uac -s 20081 -m 1 -d 400 192.168.2.108
Resolving remote host '192.168.2.108'... Done.
------------------------------ Scenario Screen -------- [1-9]: Change 
Screen --
Call-rate(length)   Port   Total-time  Total-calls  Remote-host
10.0(400 ms)/1.000s   5061       0.68 s            1 
192.168.2.108:5060(UDP)

Call limit reached (-m 1), 0.683 s period  1 ms scheduler resolution
0 calls (limit 30)                     Peak was 1 calls, after 0 s
0 Running, 0 Paused, 0 Woken up
0 dead call msg (discarded)            0 out-of-call msg (discarded)
1 open sockets

                                         Messages  Retrans   Timeout 
Unexpected-Msg
 INVITE ---------->               1             0             0
    100 <----------                   1             0             0 
0
    180 <----------                   1             0             0 
0
    183 <----------                   0             0             0 
0
    200 <---------- E-RTD1     1             0             0 
0
 ACK ---------->                    1             0
 Pause [    400ms]                    1 
0
 BYE ---------->                     1             0             0
    200 <----------                    1            0             0 
0


    ------------------------------ Test 
Terminated --------------------------------

- there is a call to UA, which located on the host where is FreeSWITCH 
placed and the sequence of connection and disconnection is fulfilled.

$ ./sipp -sn uas -p 5062
------------------------------ Scenario Screen -------- [1-9]: Change 
Screen --
Port   Total-time  Total-calls  Transport
5062      23.86 s            1  UDP

0 new calls during 0.862 s period      1 ms scheduler resolution
0 calls                                Peak was 1 calls, after 7 s
0 Running, 1 Paused, 0 Woken up
0 dead call msg (discarded)
3 open sockets

                                                Messages  Retrans   Timeout 
Unexpected-Msg
 ----------> INVITE                      1             0             0 
0

    <---------- 180                          1             0
    <---------- 200                          1             0             0
    ----------> ACK      E-RTD1    1             0             0 
0

 ----------> BYE                           1              0             0 
0
    <---------- 200                         1               0
 [   4000ms] Pause                         1 
0
------------------------------ Test 
Terminated --------------------------------

- the called side, to which FreeSWITCH makes bridge, receives all sequence 
of SIP messages

====================================================================

And that's 2nd experiment - the same, but the called UA (20082) placed on 
another host:

$ ./sipp -sn uac -s 20082 -m 1 -d 400 192.168.2.108
Resolving remote host '192.168.2.108'... Done.
------------------------------ Scenario Screen -------- [1-9]: Change 
Screen --
Call-rate(length)   Port   Total-time  Total-calls  Remote-host
10.0(400 ms)/1.000s   5061       0.64 s            1 
192.168.2.108:5060(UDP)

Call limit reached (-m 1), 0.649 s period  1 ms scheduler resolution
0 calls (limit 30)                     Peak was 1 calls, after 0 s
0 Running, 0 Paused, 0 Woken up
0 dead call msg (discarded)            0 out-of-call msg (discarded)
1 open sockets

                                        Messages  Retrans   Timeout 
Unexpected-Msg
 INVITE ---------->               1             0            0
    100 <----------                   1             0            0 
0
    180 <----------                   1             0            0 
0
    183 <----------                   0             0            0 
0
    200 <----------  E-RTD1    1             0            0 
0
    ACK ---------->                 1             0
  Pause [    400ms]                   1 
0
    BYE ---------->                  1             0            0
    200 <----------                    1             0            0 
0

- the causing side see SIP sequence from the FreeSWITCH side. It's OK.
But the called side:

$ ./sipp -sn uas -p 5062
------------------------------ Scenario Screen -------- [1-9]: Change 
Screen --
Port   Total-time  Total-calls  Transport
5062     350.51 s            1  UDP

0 new calls during 0.509 s period      1 ms scheduler resolution
0 calls                                Peak was 1 calls, after 12 s
0 Running, 0 Paused, 0 Woken up
0 dead call msg (discarded)
3 open sockets

                                               Messages  Retrans   Timeout 
Unexpected-Msg
 ----------> INVITE                      1             0             0 
0

   <---------- 180                           1             0
   <---------- 200                           1             9             1
   ----------> ACK       E-RTD1     0             0             0 
0

 ----------> BYE                            0             0             0 
0
   <---------- 200                            0            0
 [   4000ms] Pause                          0 
0
------------------------------ Test 
Terminated --------------------------------

2008-08-27  15:45:48:982  1219841148.982687: Aborting call on UDP 
retransmission timeout for Call-ID 'd7bd5c78-eed8-122b-8895-00d0b7169f0d'.

- the called side repeats answer 200 (njrmal end of INVITE), but cann't 
receive ACK for it.
And here UA expecting on the same UDP port, but on one host with FreeSWITCH 
( i.e. another UA):

$ ./sipp -sn uas -p 5062
------------------------------ Scenario Screen -------- [1-9]: Change 
Screen --
Port   Total-time  Total-calls  Transport
5062     331.42 s            1  UDP

0 new calls during 0.412 s period      1 ms scheduler resolution
0 calls                                Peak was 1 calls, after 6 s
0 Running, 0 Paused, 0 Woken up
20 dead call msg (discarded)
3 open sockets

                                                Messages  Retrans    Timeout 
Unexpected-Msg
 ----------> INVITE                       0             0              0 
1

  <---------- 180                             0             0
  <---------- 200                             0             0              0
  ----------> ACK        E-RTD1     0             0              0 
0

 ----------> BYE                             0             0             0 
0
 <---------- 200                               0             0
 [   4000ms] Pause                           0 
0
------------------------------ Test 
Terminated --------------------------------

-  it receives Unexpected-Msg, and that's Unexpected-Msg BYE:

2008-08-27      15:45:49:349    1219841149.349801: Dead call 
d7bd5c78-eed8-122b-8895-00d0b7169f0d (aborted at index 0), received 'BYE 
sip:127.0.0.1:5062;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.2.105;rport;branch=z9hG4bKpgDZFDN8N99gF
Max-Forwards: 70
From: "sipp" <sip:sipp at 192.168.2.105>;tag=pavp9yj1NmH7a
To: <sip:20082 at 192.168.2.107:5062>;tag=24418SIPpTag011
Call-ID: d7bd5c78-eed8-122b-8895-00d0b7169f0d
CSeq: 103802223 BYE
Contact: <sip:mod_sofia at 192.168.2.105:5060>
User-Agent: FreeSWITCH-mod_sofia/1.0.rc4-exported
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, 
REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: 100rel, precondition, timer
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Content-Length: 0

What do we make wrong? Also do we misunderstand in configuration FreeSWITCH. 




More information about the Freeswitch-dev mailing list