[Asterisk-Dev] Monitoring stops when channel redirected

Abhishek Tiwari abhitiwari at gmail.com
Tue Mar 15 18:00:06 MST 2005


Hi, 

I was facing the problem with redirecting channels, the monitoring
used to stop when the channel was redirected (using manager action).
I looked into the head and found that the problem exists in
'ast_do_masquerade'.

The 'monitor' was not copied from the clone and the zombie channel was
closing the monitoring. So, I just put these few lines in channel.c
and it worked.

*** channel.c (1.175)  Wed Mar 16 06:21:34 2005
--- channel.c.modified  Wed Mar 16 06:20:53 2005
***************
*** 2464,2469 ****
--- 2464,2473 ----
        snprintf(zombn, sizeof(zombn), "%s<ZOMBIE>", orig);
        /* Mangle the name of the clone channel */
        strncpy(clone->name, zombn, sizeof(clone->name) - 1);
+ 
+       original->monitor = clone->monitor;
+       clone->monitor = NULL;
+ 
        manager_event(EVENT_FLAG_CALL, "Rename", "Oldname:
%s\r\nNewname: %s\r\nUniqueid: %s\r\n", masqn, zombn,
clone->uniqueid);
  
        /* Update the type. */


Please review the fix and update if it is correct.

Thanks
Abhishek Tiwari

Drishti-Soft Solutions
India
www.drishti-soft.com



More information about the asterisk-dev mailing list