[Freeswitch-dev] PRI/OZ Question: In-band Busy signal

Michael Collins mcollins at fcnetwork.com
Wed Jun 18 19:10:06 EDT 2008


Followup on this, I think that there's a booger in the logic for
determining whether or not a cause ie is present.  I think something is
making the macro Q931IsIEPresent always find a cause IE even if one
isn't present.  Consider this code I added in zap_isdn.c,
zap_isdn_931_34 func:

 

                              if (Q931IsIEPresent(gen->Cause)) {

                                    zap_log(ZAP_LOG_ERROR, "This message
has a cause ie\n");

                              }

                              if (Q931IsIEPresent(gen->BearerCap)) {

                                    zap_log(ZAP_LOG_ERROR, "This message
has a bearercap ie\n");

                              }

                              if (Q931IsIEPresent(gen->RedirNum)) {

                                    zap_log(ZAP_LOG_ERROR, "This message
has a redirnum ie\n");

                              }

 

This is inside a case statement for PROGRESS messages, i.e. it only does
this search when a progress msg comes in.  I get two progress messages
here, both of which say there is a cause ie when in fact only the second
one has a cause:

 

freeswitch at freeswitch2.fcnetwork.com> originate
{origination_caller_id_number=80

05409011,dname='Busy',dnum='5898832',dialednum='5597385544',agentinfo='5
898832.5

544',bcast='Mikey_test'}openzap/1/a/5597385544 825597385544

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:56 isdn_outgoing_call() Changing
state on

 1:1 from DOWN to DIALING

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:365
switch_core_session_

run() OpenZAP/1:1/5597385544 Running State Change CS_INIT

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:415
switch_core_session_

run() (OpenZAP/1:1/5597385544) State INIT

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:415
switch_core_session_

run() (OpenZAP/1:1/5597385544) State INIT going to sleep

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:365
switch_core_session_

run() OpenZAP/1:1/5597385544 Running State Change CS_ROUTING

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:420
switch_core_session_

run() (OpenZAP/1:1/5597385544) State ROUTING

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:420
switch_core_session_

run() (OpenZAP/1:1/5597385544) State ROUTING going to sleep

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:365
switch_core_session_

run() OpenZAP/1:1/5597385544 Running State Change CS_CONSUME_MEDIA

2008-06-18 15:55:56 [DEBUG] switch_core_state_machine.c:442
switch_core_session_

run() (OpenZAP/1:1/5597385544) State CONSUME_MEDIA

2008-06-18 15:55:56 [ERR] zap_isdn.c:584 state_advance() 1:1 STATE
[DIALING]

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:982 q931_rx_32() WRITE 58

------------------------------------------------------------------------
--------

[00 01 06 0c 08 02 00 03 05 04 03 80 90 a2 18 03 a1 83 81 28 0a 46 72 65
65 53 5

7 49 54 43 48 6c 0c 21 80 38 30 30 35 34 30 39 30 31 31 70 0b a1 35 35
39 37 33

38 35 35 34 34]

 

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:551 zap_isdn_921_23() READ 13

------------------------------------------------------------------------
--------

[08 02 80 03 7d 08 03 81 ab 28 14 01 01]

 

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:284 zap_isdn_931_34() Yay I got
an event!

 Type:[7d] Size:[114]

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:551 zap_isdn_921_23() READ 10

------------------------------------------------------------------------
--------

[08 02 80 03 02 18 03 a9 83 81]

 

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:284 zap_isdn_931_34() Yay I got
an event!

 Type:[02] Size:[137]

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:551 zap_isdn_921_23() READ 9

------------------------------------------------------------------------
--------

[08 02 80 03 03 1e 02 81 88]

 

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:284 zap_isdn_931_34() Yay I got
an event!

 Type:[03] Size:[108]

2008-06-18 15:55:56 [ERR] zap_isdn.c:417 zap_isdn_931_34() This message
has a ca

use ie

2008-06-18 15:55:56 [DEBUG] zap_isdn.c:435 zap_isdn_931_34() Changing
state on 1

:1 from DIALING to PROGRESS

2008-06-18 15:55:56 [ERR] zap_isdn.c:584 state_advance() 1:1 STATE
[PROGRESS]

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:551 zap_isdn_921_23() READ 13

------------------------------------------------------------------------
--------

[08 02 80 03 03 08 02 81 91 1e 02 81 88]

 

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:284 zap_isdn_931_34() Yay I got
an event!

 Type:[03] Size:[115]

2008-06-18 15:55:57 [ERR] zap_isdn.c:417 zap_isdn_931_34() This message
has a ca

use ie

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:432 zap_isdn_931_34() Changing
state on 1

:1 from PROGRESS to TERMINATING

2008-06-18 15:55:57 [ERR] zap_isdn.c:433 zap_isdn_931_34() This is a
PROGRESS me

ssage with a cause value of [17]

2008-06-18 15:55:57 [ERR] zap_isdn.c:584 state_advance() 1:1 STATE
[TERMINATING]

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:982 q931_rx_32() WRITE 21

------------------------------------------------------------------------
--------

[00 01 08 14 08 02 00 03 4d 28 0a 46 72 65 65 53 57 49 54 43 48]

 

API CALL
[originate({origination_caller_id_number=8005409011,dname='Busy',dnum='

5898832',dialednum='5597385544',agentinfo='5898832.5544',bcast='Mikey_te
st'}open

zap/1/a/5597385544 825597385544)] output:

-ERR USER_BUSY

 

2008-06-18 15:55:57 [DEBUG] switch_core_state_machine.c:442
switch_core_session_

run() (OpenZAP/1:1/5597385544) State CONSUME_MEDIA going to sleep

2008-06-18 15:55:57 [DEBUG] switch_core_state_machine.c:365
switch_core_session_

run() OpenZAP/1:1/5597385544 Running State Change CS_HANGUP

2008-06-18 15:55:57 [DEBUG] switch_core_state_machine.c:393
switch_core_session_

run() (OpenZAP/1:1/5597385544) State HANGUP

freeswitch at freeswitch2.fcnetwork.com> 2008-06-18 15:55:57 [DEBUG]
switch_core_st

ate_machine.c:46 switch_core_standard_on_hangup() Standard HANGUP
OpenZAP/1:1/55

97385544, cause: USER_BUSY

2008-06-18 15:55:57 [DEBUG] switch_core_state_machine.c:393
switch_core_session_

run() (OpenZAP/1:1/5597385544) State HANGUP going to sleep

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:551 zap_isdn_921_23() READ 10

------------------------------------------------------------------------
--------

[08 02 80 03 5a 08 03 81 e0 08]

 

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:284 zap_isdn_931_34() Yay I got
an event!

 Type:[5a] Size:[110]

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:380 zap_isdn_931_34() Changing
state on 1

:1 from TERMINATING to HANGUP_COMPLETE

2008-06-18 15:55:57 [ERR] zap_isdn.c:584 state_advance() 1:1 STATE
[HANGUP_COMPL

ETE]

2008-06-18 15:55:57 [DEBUG] zap_isdn.c:756 state_advance() Changing
state on 1:1

 from HANGUP_COMPLETE to DOWN

2008-06-18 15:55:57 [ERR] zap_isdn.c:584 state_advance() 1:1 STATE
[DOWN]

2008-06-18 15:55:57 [DEBUG] zap_io.c:1071 zap_channel_done() channel
done 1:1

 

 

Anyway, I'm available for tinkering or testing if anyone has thoughts on
how to proceed...

-MC

 

________________________________

From: freeswitch-dev-bounces at lists.freeswitch.org
[mailto:freeswitch-dev-bounces at lists.freeswitch.org] On Behalf Of
Michael Collins
Sent: Monday, June 16, 2008 7:59 PM
To: freeswitch-dev at lists.freeswitch.org
Subject: [Freeswitch-dev] PRI/OZ Question: In-band Busy signal

 

FYI,

 

I think possibly I found a case where the OZ/PRI needs to change from
PROGRESS to PROGRESS_MEDIA:

http://pastebin.freeswitch.org/4628

 

In this case I'm getting two PROGRESS messages in a row.  The raw Q931
messages are:

 [08 02 80 0c 03 1e 02 81 88]

 [08 02 80 0c 03 08 02 81 91 1e 02 81 88]

 

The second progress msg includes: 08 02 81 91 which means:

08 = Cause IE

02 = two octets/bytes

81 = 1000 0001 = pvt network serving local user

91 = 1001 0001 = Cause number 17 = user busy

 

I'm 99.9% sure that as soon as we get this PROGRESS info that we can act
on it.  MikeJ, is it possible that the result of the originate command
can be something like -ERR BUSY instead of -ERR NORMAL_CLEARING?  

 

-MC

 

P.S. - I think this case also shows that we don't need the warning
message:

2008-06-16 19:58:22 [WARNING] zap_isdn.c:411 zap_isdn_931_34() Why
bother changing state on 1:1 from PROGRESS to PROGRESS

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080618/be35f083/attachment-0001.html 


More information about the Freeswitch-dev mailing list