All pastes #12736 Raw Edit

Someone

public text v1 · immutable
#12736 ·published 2005-05-26 20:53 UTC
rendered paste body
--- whee/asterisk-1.0.7/apps/app_dial.c 2005-02-26 17:40:43.000000000 -0800
+++ asterisk-1.0.7/apps/app_dial.c      2005-05-26 12:34:58.000000000 -0700
@@ -439,6 +439,7 @@
        struct varshead *headp, *newheadp;
        struct ast_var_t *newvar;
        int go_on=0;
+       int dont_hangup=0;
        unsigned int calldurationlimit=0;
        char *cdl;
        time_t now;
@@ -725,6 +726,8 @@
                        if(strchr(transfer, 'h'))
                                allowdisconnect_in = tmp->allowdisconnect_in = 1;
                        else    allowdisconnect_in = tmp->allowdisconnect_in = 0;
+                       if(strchr(transfer, 'G'))
+                               dont_hangup=1;
                        if(strchr(transfer, 'g'))
                                go_on=1;
                        if (strchr(transfer, 'f'))
@@ -1017,10 +1020,17 @@
                } else
                        res = -1;

+               if (dont_hangup>0) { res = AST_PBX_NO_HANGUP_PEER; }
                if (res != AST_PBX_NO_HANGUP_PEER) {
                        if (!chan->_softhangup)
                                chan->hangupcause = peer->hangupcause;
                        ast_hangup(peer);
+               } else {
+
+               strncpy(peer->context, 'agentdispo', sizeof(peer->context));
+               strncpy(peer->exten, 's', sizeof(peer->exten));
+               strncpy(peer->priority, '1', sizeof(peer->priority));
+               ast_pbx_start(peer);
                }
        }
 out:


## gdb bt output

Thread 19 (process 24590):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00dc5bfb in __read_nocancel () from /lib/tls/libpthread.so.0
#2  0x080b4d0f in read_char (el=0x82cf590, cp=0xbfe7707b "") at read.c:301
#3  0x080b4daf in el_getc (el=0x82cf590, cp=0xbfe7707b "") at read.c:347
#4  0x080b4c1e in read_getcmd (el=0x82cf590,
    cmdnum=0xfffffe00 <Address 0xfffffe00 out of bounds>, ch=0xbfe7707b "")
    at read.c:243
#5  0x080b4ede in el_gets (el=0x82cf590, nread=0xbfe770dc) at read.c:443
#6  0x0809d4fb in main (argc=137180680, argv=0x82cf590) at asterisk.c:1904

Thread 18 (process 24592):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x080a101f in listener (unused=0x0) at asterisk.c:333
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 17 (process 24593):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00dc5e08 in accept () from /lib/tls/libpthread.so.0
#2  0x08099ba6 in accept_thread (ignore=0x0) at manager.c:1287
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 16 (process 24594):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00bd9586 in __nanosleep_nocancel () from /lib/tls/libc.so.6
#2  0x00bd93af in sleep () from /lib/tls/libc.so.6
#3  0x001137f9 in monmp3thread (data=0x82d9210) at res_musiconhold.c:280
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 15 (process 24595):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c06b21 in ___newselect_nocancel () from /lib/tls/libc.so.6
#2  0x00565ca8 in do_parking_thread (ignore=0x0) at channel.h:843
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 14 (process 24596):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x080524e4 in ast_io_wait (ioc=0x82e60d0, howlong=-4) at io.c:254
#3  0x0012c1cc in do_monitor (data=0x0) at chan_sip.c:7944
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 13 (process 24597):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x080524e4 in ast_io_wait (ioc=0x82e5940, howlong=-4) at io.c:254
#3  0x0015744d in do_monitor (data=0x0) at chan_mgcp.c:3303
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 12 (process 24598):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x080524e4 in ast_io_wait (ioc=0x82eb528, howlong=-4) at io.c:254
#3  0x0070651e in network_thread (ignore=0x0) at chan_iax2.c:6385
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 11 (process 24599):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f77453 in pri_dchannel (vpri=0xf88020) at chan_zap.c:7374
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 10 (process 24600):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f77453 in pri_dchannel (vpri=0xf88c40) at chan_zap.c:7374
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 9 (process 24601):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f77453 in pri_dchannel (vpri=0xf89860) at chan_zap.c:7374
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 8 (process 24602):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f77453 in pri_dchannel (vpri=0xf8a480) at chan_zap.c:7374
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 7 (process 24603):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f692ee in do_monitor (data=0x0) at chan_zap.c:5792
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 6 (process 24604):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x00f41a23 in autodial (ignore=0x0) at pbx_wilcalu.c:83
#3  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#4  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 5 (process 24605):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00bd9586 in __nanosleep_nocancel () from /lib/tls/libc.so.6
#2  0x00bd93af in sleep () from /lib/tls/libc.so.6
#3  0x00cb325c in scan_thread (unused=0x0) at pbx_spool.c:325
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 4 (process 24606):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00bd9586 in __nanosleep_nocancel () from /lib/tls/libc.so.6
#2  0x00bd93af in sleep () from /lib/tls/libc.so.6
#3  0x001b70ae in qcall (ignore=0x0) at app_qcall.c:167
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 3 (process 24639):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x0809b8b7 in get_input (s=0x82d8918, output=0xbd72aa74 "Action: Login")
    at manager.c:1216
#3  0x0809a409 in session_do (data=0x82d8918) at manager.c:1243
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 2 (process 24661):
#0  0x00b1ac32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00c046f7 in poll () from /lib/tls/libc.so.6
#2  0x0809b8b7 in get_input (s=0x8382680, output=0xbd529a74 "Action: Command")
    at manager.c:1216
#3  0x0809a409 in session_do (data=0x8382680) at manager.c:1243
#4  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#5  0x00c0daba in clone () from /lib/tls/libc.so.6

Thread 1 (process 24666):
#0  0x00ba901b in strlen () from /lib/tls/libc.so.6
#1  0x00626acc in dial_exec (chan=0x8384b70, data=0xbd32d120)
#2  0x080749ef in pbx_exec (c=0x8384b70, app=0x835b348, data=0x8382930,
    newstack=1) at pbx.c:469
#3  0x08079dd4 in ast_pbx_outgoing_app (type=0x8383964 "Zap", format=64,
    data=0x8383a64, timeout=45000, app=0x8383b64 "Dial",
    appdata=0x8383c64 "Zap/g1/17029427753|60|G", reason=0x8382930, sync=2,
    callerid=0x8384b70 "Zap/36-1", variable=0x8384068 "", account=0x8384a68 "")
    at pbx.c:4173
#4  0x00cb4564 in attempt_thread (data=0x8383850) at pbx_spool.c:225
#5  0x00dc07fc in start_thread () from /lib/tls/libpthread.so.0
#6  0x00c0daba in clone () from /lib/tls/libc.so.6