some small conference jingle fixes
authorSuper User <root@isdn.jolly.ten>
Mon, 1 Oct 2007 07:54:51 +0000 (09:54 +0200)
committerSuper User <root@isdn.jolly.ten>
Mon, 1 Oct 2007 07:54:51 +0000 (09:54 +0200)
changed description of interface in settings.

apppbx.cpp
extension.c
genext.c
joinpbx.cpp

index b7a8357..6641b31 100644 (file)
@@ -3443,10 +3443,13 @@ void EndpointAppPBX::join_notify(struct port_list *portlist, int message_type, u
                                /* unhold if */
                                if (new_state!=NOTIFY_STATE_HOLD && new_state!=NOTIFY_STATE_SUSPEND)
                                {
                                /* unhold if */
                                if (new_state!=NOTIFY_STATE_HOLD && new_state!=NOTIFY_STATE_SUSPEND)
                                {
-                                       while(portlist)
+                                       if (!strcmp(e_tone, "hold")) // don't interrupt other tones
                                        {
                                        {
-                                               set_tone(portlist, "");
-                                               portlist = portlist->next;
+                                               while(portlist)
+                                               {
+                                                       set_tone(portlist, "");
+                                                       portlist = portlist->next;
+                                               }
                                        }
                                        portlist = ea_endpoint->ep_portlist;
                                        e_hold = 0;
                                        }
                                        portlist = ea_endpoint->ep_portlist;
                                        e_hold = 0;
index e19ec2a..f498438 100644 (file)
@@ -1026,8 +1026,10 @@ int write_extension(struct extension *ext, char *number)
 //     fprintf(fp,"# Set up alarm message after prefix is dialed and connection is established\n");
 //     fprintf(fp,"alarm           %s\n\n",ext->alarm);
 
 //     fprintf(fp,"# Set up alarm message after prefix is dialed and connection is established\n");
 //     fprintf(fp,"alarm           %s\n\n",ext->alarm);
 
-       fprintf(fp,"# Ports to ring on calls to extension (starting from 1)\n");
-       fprintf(fp,"# Seperate ports by using komma. (example: 1,3 would ring incoming calls on\n# port 1 and 3)\n");
+       fprintf(fp,"# Interface(s) to ring on calls to extension (as named in interface.conf)\n");
+       fprintf(fp,"# Seperate multiple interfaces by using komma without spaces\n");
+       fprintf(fp,"# Example: Int would ring on the interface with the name \"Int\"");
+       fprintf(fp,"#          Int1,Int2 would ring incoming calls on both interfaces Int1 and Int2.\n");
        fprintf(fp,"interfaces      %s\n\n",ext->interfaces);
 
        fprintf(fp,"# Call Forward Unconditional (CFU)\n");
        fprintf(fp,"interfaces      %s\n\n",ext->interfaces);
 
        fprintf(fp,"# Call Forward Unconditional (CFU)\n");
index cab89ad..447c675 100644 (file)
--- a/genext.c
+++ b/genext.c
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
        {
                printf("Usage: %s <extension> <interfaces> <callerid>\n\n", argv[0]);
                printf("extension: any number for the extension (e.g 200)\n");
        {
                printf("Usage: %s <extension> <interfaces> <callerid>\n\n", argv[0]);
                printf("extension: any number for the extension (e.g 200)\n");
-               printf("interfaces: internal interface(es) to reach extension (seperated by commas. e.g Int1,Int2)\n");
+               printf("interfaces: internal interface(s) to reach extension (seperated by commas. e.g Int1,Int2)\n");
                printf("callerid: normal undefined called is (use what your telco assigned you)\n");
                return(0);
        }
                printf("callerid: normal undefined called is (use what your telco assigned you)\n");
                return(0);
        }
index 76e547a..d0c8b1d 100644 (file)
@@ -418,7 +418,7 @@ void JoinPBX::bridge(void)
                relation->next->tx_state = notify_state_change(j_serial, relation->next->epoint_id, relation->next->tx_state, relation->rx_state);
        } else
        /* one member in a join, so we put her on hold */
                relation->next->tx_state = notify_state_change(j_serial, relation->next->epoint_id, relation->next->tx_state, relation->rx_state);
        } else
        /* one member in a join, so we put her on hold */
-       if ((relations==1 || numconnect==1) && !j_partyline_jingle)
+       if ((relations==1 || numconnect==1)/* && !j_partyline_jingle*/)
        {
                PDEBUG(DEBUG_JOIN, "join%d 1 member or only 1 connected, put on hold\n");
                relation = j_relation;
        {
                PDEBUG(DEBUG_JOIN, "join%d 1 member or only 1 connected, put on hold\n");
                relation = j_relation;
@@ -1045,6 +1045,12 @@ void JoinPBX::play_jingle(int in)
        struct message *message;
 
        relation = j_relation;
        struct message *message;
 
        relation = j_relation;
+
+       if (!relation)
+               return;
+       if (!relation->next)
+               return;
+
        while(relation)
        {
                message = message_create(j_serial, relation->epoint_id, JOIN_TO_EPOINT, MESSAGE_TONE);
        while(relation)
        {
                message = message_create(j_serial, relation->epoint_id, JOIN_TO_EPOINT, MESSAGE_TONE);