Index: apps/app_softhangup.c =================================================================== --- apps/app_softhangup.c (revision 215252) +++ apps/app_softhangup.c (working copy) @@ -79,11 +79,13 @@ /* XXX watch out, i think it is wrong to access c-> after unlocking! */ if (all) { /* CAPI is set up like CAPI[foo/bar]/clcnt */ - if (!strcmp(c->tech->type, "CAPI")) + if (!strcmp(c->tech->type, "CAPI")) { cut = strrchr(name,'/'); /* Basically everything else is Foo/Bar-Z */ - else - cut = strchr(name,'-'); + } else { + /* use strrchr() because Foo/Bar-Z could actually be Foo/B-a-r-Z */ + cut = strrchr(name,'-'); + } /* Get rid of what we've cut */ if (cut) *cut = 0;