i have an ivr script (enclosed) that answers, plays beep to caller and
then tries to call two callees every 3 seconds until one of them
answers.  this works fine in 1.5 branch.  first callee replies with 486,
second replies with 480, etc:

Oct 26 20:35:51 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: Entering test onInvite ...
Oct 26 20:35:52 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 100 Trying
Oct 26 20:35:52 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 180 Ringing
Oct 26 20:35:56 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 486 Rejected
Oct 26 20:35:59 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 100 Trying
Oct 26 20:35:59 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 480 Temporalily Unavailable
Oct 26 20:36:02 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 100 Trying
Oct 26 20:36:02 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78] INFO: 
Ivr-Python: test: got reply: 180 Ringing
Oct 26 20:36:07 siika sems[32013]: [#7f90b9a98700] [ivr_log, Ivr.cpp:78]
INFO: Ivr-Python: test: got reply: 486 Rejected
...

when i run the same app using master, sems ends the call with bye after
receiving 480 from the second callee:

Oct 26 20:50:09 siika sems[32724]: [#7f8a2fd71700] [ivr_log, Ivr.cpp:80] INFO: 
Ivr-Python: test: got reply: 100 Trying
Oct 26 20:50:09 siika sems[32724]: [#7f8a2fd71700] [ivr_log, Ivr.cpp:80] INFO: 
Ivr-Python: test: got reply: 180 Ringing
Oct 26 20:50:12 siika sems[32724]: [#7f8a2fd71700] [ivr_log, Ivr.cpp:80] INFO: 
Ivr-Python: test: got reply: 486 Rejected
Oct 26 20:50:15 siika sems[32724]: [#7f8a2fd71700] [ivr_log, Ivr.cpp:80] INFO: 
Ivr-Python: test: got reply: 100 Trying
Oct 26 20:50:15 siika sems[32724]: [#7f8a2fd71700] [ivr_log, Ivr.cpp:80] INFO: 
Ivr-Python: test: got reply: 480 Temporalily Unavailable

has ivr implementation changed from 1.5 to master in some manner that
would require updating the application or could there be a bug in master
branch?

-- juha

import time

from log import *
from ivr import *

beeping                   = 1
connecting                = 2
connected                 = 3

class IvrDialog(IvrDialogBase):

    def onInvite(self, hdrs):

        if self.dialog.status_str == "Connected":
            debug("test: received re-INVITE")
            return True

        info("Entering test onInvite ...")

        return True

    def onSessionStart(self):

        self.callee_list = \
            ['sip:[email protected]', 'sip:[email protected]']
        self.callee_index = 0
        self.setNoRelayonly()
        self.state = beeping
        self.audio_msg = IvrAudioFile()
        self.audio_msg.open("/var/lib/sems/audio/general/beep_snd.wav",
                            AUDIO_READ)
        self.enqueue(self.audio_msg, None)

    def onBye(self):

        self.stopSession()

    def onEmptyQueue(self):

        if self.state == beeping:
            self.state = connecting
            self.connectTry()
            return

        return
    
    def onOtherReply(self, code, reason):

        info("test: got reply: " + str(code) + " " + reason)

        if self.state == connecting:

            if code < 200:
                return 0
            if code >= 200 and code < 300:
                self.flush()
                self.disconnectMedia()
                self.setRelayonly()
                self.state = connected
                info('test: connected to ' + self.callee_uri)
                return 0
            if code >= 300:
                time.sleep(3)
                self.connectTry()
                return 0

        else:

            return 1

    def connectTry(self):

            self.callee_uri = self.callee_list[self.callee_index]
            self.callee_index = (self.callee_index + 1) % 2
            self.connectCallee(self.callee_uri, self.callee_uri)
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [run, udp_trsp.cpp:352] 
DEBUG: vv M [|] u recvd msg via UDP from 127.0.0.1:5070 vv.--++--.SIP/2.0 480 
Temporalily Unavailable..Via: SIP/2.0/UDP 
127.0.0.1:5090;branch=z9hG4bKGVU.Vard;rport=5090;received=127.0.0.1..From: 
<sip:[email protected]>;tag=0323F876-544D456A000EA219-2FD71700..To: 
sip:[email protected];tag=a7393417f396669b5dcacb2147836728.0a39..CSeq: 10 
INVITE..Call-ID: 411E4966-544D456A000EA226-2FD71700..Server: OpenXg SIP Proxy 
(4.2.0-0 (x86_64/linux))..Content-Length: 0....--++--
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [parse_via_params, 
parse_via.cpp:521] DEBUG:  parsed branch: z9hG4bKGVU.Vard
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [parse_via_params, 
parse_via.cpp:544] DEBUG:  has_rport: 1
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [process_rcvd_msg, 
trans_layer.cpp:1717] DEBUG:  Reply matched an existing transaction
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [update_uac_reply, 
trans_layer.cpp:1775] DEBUG:  update_uac_reply(reply code = 480, 
trans=0x2323ce0)
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [reset_timer, 
sip_trans.cpp:188] DEBUG:  Clearing old timer of type C (this=0x2324780)
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [send_non_200_ack, 
trans_layer.cpp:2305] DEBUG:  About to send ACK
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [send, udp_trsp.cpp:259] 
DEBUG: send  msg to 127.0.0.1:5070.--++--.ACK sip:[email protected] 
SIP/2.0..Via: SIP/2.0/UDP 127.0.0.1:5090;branch=z9hG4bKGVU.Vard;rport..From: 
<sip:[email protected]>;tag=0323F876-544D456A000EA219-2FD71700..To: 
sip:[email protected];tag=a7393417f396669b5dcacb2147836728.0a39..Call-ID: 
411E4966-544D456A000EA226-2FD71700..CSeq: 10 ACK..Content-Length: 0....--++--
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [reset_timer, 
sip_trans.cpp:246] DEBUG:  New timer of type D at time=40827 (repeated=0)
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:813] DEBUG:  Received reply: 480 Temporalily Unavailable
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:814] DEBUG:  reply.callid = 
<411E4966-544D456A000EA226-2FD71700>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:815] DEBUG:  reply.from_tag = 
<0323F876-544D456A000EA219-2FD71700>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:816] DEBUG:  reply.to_tag = 
<a7393417f396669b5dcacb2147836728.0a39>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:817] DEBUG:  reply.contact = <>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:818] DEBUG:  reply.to_uri = <>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:819] DEBUG:  cseq = <10>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:820] DEBUG:  reply.route = <>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:821] DEBUG:  hdrs = <Server: OpenXg SIP Proxy (4.2.0-0 
(x86_64/linux))..>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:822] DEBUG:  body-ct = <>
Oct 26 21:03:06 siika sems[32724]: [#7f8a3067a700] [handle_sip_reply, 
SipCtrlInterface.cpp:828] DEBUG:  ^^ M 
[411E4966-544D456A000EA226-2FD71700|0323F876-544D456A000EA219-2FD71700] ru SIP 
reply 480 Temporalily Unavailable handled ^^
Oct 26 21:03:06 siika sems[32724]: [#7f8a2fb6f700] [process, AmSession.cpp:659] 
DEBUG:  AmSession processing event
Oct 26 21:03:06 siika sems[32724]: [#7f8a2fb6f700] [onRxReply, 
AmBasicSipDialog.cpp:449] DEBUG:  onRxReply(rep = 480 Temporalily Unavailable): 
transaction found!
Oct 26 21:03:06 siika sems[32724]: [#7f8a2fb6f700] [setStatus, 
AmBasicSipDialog.cpp:84] DEBUG:  setting SIP dialog status: 
Proceeding->Disconnected
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fb6f700] [onReplyIn, 
AmOfferAnswer.cpp:198] DEBUG:  after 480 reply to INVITE: resetting OA state
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fb6f700] [setState, 
AmOfferAnswer.cpp:69] DEBUG:  setting SIP dialog O/A status: OfferSent->None
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fb6f700] [onRemoteDisappeared, 
AmB2BSession.cpp:641] DEBUG:  remote unreachable, ending other leg
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fb6f700] [relayEvent, 
AmB2BSession.cpp:587] DEBUG:  AmB2BSession::relayEvent: to 
other_id='3D4B077C-544D456500059023-30478700'
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [processingCycle, 
AmSession.cpp:373] DEBUG:  vv S 
[801ddf54a4664425|3D4B077C-544D456500059023-30478700] Connected, running, 0 
UACTransPending, 0 usages vv
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [process, Ivr.cpp:760] 
DEBUG:  IvrDialog::process
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [onB2BEvent, 
AmB2BSession.cpp:176] DEBUG:  AmB2BSession::onB2BEvent
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [onB2BEvent, 
AmB2BSession.cpp:301] DEBUG:  terminateLeg()
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [setStatus, 
AmBasicSipDialog.cpp:84] DEBUG:  setting SIP dialog status: 
Connected->Disconnected
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [setStatus, 
AmBasicSipDialog.cpp:84] DEBUG:  setting SIP dialog status: 
Disconnected->Disconnecting
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [parse_sip_uri, 
parse_uri.cpp:338] DEBUG:  Converted URI port (5070) to int (5070)
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [set_next_hop, 
trans_layer.cpp:924] DEBUG:  no transport specified, setting default one (udp)
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [set_next_hop, 
trans_layer.cpp:931] DEBUG:  next_hop:next_port is <127.0.0.1:5070/udp>
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [resolve_targets, 
resolver.cpp:1080] DEBUG:  sip_destination: 127.0.0.1:5070/udp
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [set_destination_ip, 
resolver.cpp:1005] DEBUG:  checking whether '127.0.0.1' is IP address...
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [set_destination_ip, 
resolver.cpp:1063] DEBUG:  set destination to 127.0.0.1:5070
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [debug, resolver.cpp:794] 
DEBUG:  target list:
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [debug, resolver.cpp:801] 
DEBUG:  #011127.0.0.1:5070/udp to target list
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [send_request, 
trans_layer.cpp:1267] DEBUG:  send_request to R-URI 
<sip:[email protected];gr=urn:uuid:c9a3fff2-15f1-4b85-84b3-99598e3b8860>
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [parse_sip_uri, 
parse_uri.cpp:338] DEBUG:  Converted URI port () to int (5060)
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [parse_via_params, 
parse_via.cpp:521] DEBUG:  parsed branch: z9hG4bKfwzCDaWn
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [parse_via_params, 
parse_via.cpp:544] DEBUG:  has_rport: 1
Oct 26 21:03:07 siika sems[32724]: [#7f8a2fd71700] [send_request, 
trans_layer.cpp:1303] DEBUG:  Sending to 127.0.0.1:5070 <BYE 
sip:[email protected];gr=urn:uuid:c9a3fff2-15f1-4b85-84b3-99598e3b8860 
SIP/2.0..Via: SIP/2.0/UDP 127.0.0.1:5090;branch=z9hG4bKfwzCDaWn;rport..From: 
<sip:[email protected]>;tag=3D4B077C-544D456500059023-30478700..To: 
<sip:[email protected]>;tag=c8a2c61540300dbe..CSeq: 10 BYE..Call-ID: 
801ddf54a4664425..Route: <sip:127.0.0.1:5070;r2=on;lr>, 
<sip:192.98.102.30;transport=tcp;r2=on;lr>..Max-Forwards: 70..Content-Length: 
0.......>
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to